# MLE of a Gamma Distribution

#### Halfpixel

##### New Member
Hello everyone,
I'm having quite some trouble with a question about the maximum likelihood estimator of a gamma distribution. The question is as follows:

"An electronic component has a lifetime Y (in hours) with a probability density function

f(y) = { y*exp(-y/θ)/(θ^2), y > 0
{ 0, elsewhere

[That is, a gamma distribution with parameters a = 2 and θ.] Suppose that three such components tested independently had lifetimes of 120, 130 and 128 hours.

a) Find the maximum likelihood estimator of θ.

b) Find E(MLE(θ)) and V(MLE(θ)).

c) Suppose that θ = 130. Give an approximate bound for the error of estimation."

This seems to be a popular exam practice question so some of you may have seen it before. Anywhere, here's what I've got so far.

a) Since f(y) is a gamma distribution, the likelihood function is:

L(θ) = (1/θ^2n)(product of each y)*exp(-(sum of each y/θ^2))

Then the log-likelihood function is: lnL(θ) = -2n*ln(θ) + ln(product of each y) - (sum of each y/θ)

The derivative of which is -2n/θ + (sum of each y/θ^2)

Setting this to zero and solving for θ we get:

MLE(θ) = 1/2n * (sum of each y) = (1/2)*(average of all y)

Unfortunately, that's about as far as I've progressed. I'm not sure how to go about finding the expected value or variance of the MLE, and I don't even fully understand what part c) is asking.

Any help would be greatly appreciated.

#### jahred

##### New Member
Hello everyone,
[That is, a gamma distribution with parameters a = 2 and θ.] Suppose that three such components tested independently had lifetimes of 120, 130 and 128 hours.

a) Find the maximum likelihood estimator of θ.
b) Find E(MLE(θ)) and V(MLE(θ)).
c) Suppose that θ = 130. Give an approximate bound for the error of estimation."
...

MLE(θ) = 1/2n * (sum of each y) = (1/2)*(average of all y)

Unfortunately, that's about as far as I've progressed. I'm not sure how to go about finding the expected value or variance of the MLE, and I don't even fully understand what part c) is asking.
the expected value of the MLE;

Y ~ gamma(2, θ), so E[Yi] = 2θ

E(MLE(θ))
= E(sum(Yi)/2n)
= (1/2n)sum(E[Yi])
= 2θn/2n
= θ; (so the MLE is unbiased)

similarly, var[Yi] = 2θ^2

var(MLE(θ))
= var(sum(Yi)/2n)
= (1/4n^2)sum(var(Yi)); (via independence)
= n2θ^2 / 4n^2
= θ^2 / 2n

for a hint on c, consider a 2 standard deviation bound on the estimator (you now have an estimate of θ - 63 - and the standard deviation of the estimator for any true θ and n). think in terms of a confidence interval.

#### Halfpixel

##### New Member
Thank you very much. That's exactly what I needed.