# Maximum Likelihood Estimation with a Gamma distribution

I have this problem that I stumbled upon. Suppose the random variable $X$ follows a Gamma distribution with parameters $\alpha$ and $\beta$ with the probability density function for $x>0$ as

$$f(x)= \frac{\beta^\alpha}{\Gamma(\alpha)} x^{\alpha-1} \exp(-\beta x)$$

where $\Gamma(\alpha)$ represents the Gamma function with $\Gamma(\alpha)=(\alpha-1)!$ when $\alpha$ is a natural number.

Further suppose we know that for the random variable $X$, the parameter $\alpha=4$. We record the independent observations $X_1,X_2,\ldots,X_n$ as a random sample from the distribution.

And I must find the likelihood function for $\beta$, $L(\beta)$, given $\alpha=4$, the maximum likelihood estimator $β$ and show that this indeed is a maximum.

I found that the Maximum Likelihood is: $\beta= 4n/\sum x_i$ but i am not sure if my way of thinking is correct. Any help will be much appreciated

• What is your argument? – Hans Engler Dec 12 '14 at 0:39
• I found that likelihood function is: L(β)= Π (β^4 * xi^3 * exp(-βxi)/(3!), then worked out the log likelihood, differentiated it and equaled it to zero and found the Maximum Likelihood β as showed above. Hope this helps – rogerdom Dec 12 '14 at 0:43
• That's the right approach, and the answer is correct. – Hans Engler Dec 12 '14 at 0:44
• The fact that the derivative is zero at a certain point is not enough to prove that there is a maximum there. But see my answer below. – Michael Hardy Dec 12 '14 at 1:01
• In order to show that there is a maximum i found the second derivative which is -4n/β^2 which is less than 0 thus is a maximum. Is that the full log-likelihood mentioned in your comment? I found the same but + 3Σ log xi - nlog3!. – rogerdom Dec 12 '14 at 1:08

\begin{align} L(\beta) & = \prod_{i=1}^n \frac{\beta^4}{\Gamma(4)} x_i^{4-1} \exp(-\beta x_i) \\[8pt] & \propto \beta^{4n} \exp\left(-\beta\sum_{i=1}^n x_i\right) \end{align} (The factor $\prod_{i=1}^n x_i$ does not depend on $\beta$ and so is a part of the constant of proportionality, as is $(\Gamma(4))^n$.) $$\ell(\beta) = \log L(\beta) = C + 4n\log\beta -\beta\sum_{i=1}^n x_i$$ $$\ell'(\beta) = \frac{4n} \beta -\sum_{i=1}^n x_i \quad \begin{cases} >0 & \text{if } 0<\beta<\dfrac{4n}{\sum_{i=1}^n x_i}, \\[6pt] = 0 & \text{if } \beta=\dfrac{4n}{\sum_{i=1}^n x_i}, \\[6pt] <0 & \text{if } \beta>\dfrac{4n}{\sum_{i=1}^n x_i}. \end{cases}$$