# Estimate Gamma Distribution Parmaters Using MME and MLE

This post shows how to estimate gamma distribution parameters using (a) moment of estimation (MME) and (b) maximum likelihood estimate (MLE).

The probability density function of Gamma distribution is

The MME:

We can calculate the MLE of $\alpha$ using the Newton-Raphson method.

For $k =1,2,…,$

where

Use the MME for the initial value of $\alpha^{(0)}$, and stop the approximation when $\vert \hat{\alpha}^{(k)}-\hat{\alpha}^{(k-1)} \vert < 0.0000001$. The MLE of $\beta$ can be found by $\hat{\beta} = \bar{X} / \hat{\alpha}$.

Below is the R code.