Likelihood function of the gamma distribution

  • #1
28
0
There is a random sample of size n from a gamma distribution, with known r. Please help me formulate the likelihood function of the gamma distribution.

I understand that the density function is the following:
[tex]f\left(y;r,\lambda\right)=\frac{\lambda}{\Gamma\left(r\right)}\left(\lambda x\right)^{r-1}e^{-\lambda x}[/tex]

I also understand that the likelihood function is the product of the individual density functions.
Assuming independence, I write it as:
[tex]L\left(\underline{y};r, \lambda\right)=\left[f\left(y;r,\lambda\right)\right]^{n}[/tex]
[tex]=\left[\frac{\lambda^{r}y^{r-1}e^{-\lambda y}}{\Gamma\left(r\right)}\right]^{n}[/tex]

I am now stuck with the product of the [tex]y^{r-1}[/tex] and [tex]\Gamma\left(r\right)[/tex].

Please help me what to do, since I need the answer to find the maximum likelihood estimator of [tex]\lambda[/tex].
 

Answers and Replies

  • #2
Take the log of both sides. The log function is monotonic so "[itex]\lambda[/itex] maximizes log L" iff "[itex]\lambda[/itex] maximizes L."
 
  • #3
Take the log of both sides. The log function is monotonic so "[itex]\lambda[/itex] maximizes log L" iff "[itex]\lambda[/itex] maximizes L."

Okay, thank for that. Can you help me further for the exact form of the likelihood function so that I can take the log on both sides afterwards?
 
  • #4
I also understand that the likelihood function is the product of the individual density functions.
Assuming independence, I write it as:
[tex]L\left(\underline{y};r, \lambda\right)=\left[f\left(y;r,\lambda\right)\right]^{n}[/tex]

Not quite - the likelihood function is
[tex]L\left(\underline{y};r, \lambda\right)=\prod_{i=1}^n f\left(y_i;r,\lambda\right)[/tex]
since it's for a sample of size n. After taking the log and differentiating with respect to [itex]\lambda[/itex] you'll find that terms like [itex]\Gamma(r)[/itex] disappear.
 
  • #5
Not quite - the likelihood function is
[tex]L\left(\underline{y};r, \lambda\right)=\prod_{i=1}^n f\left(y_i;r,\lambda\right)[/tex]
since it's for a sample of size n. After taking the log and differentiating with respect to [itex]\lambda[/itex] you'll find that terms like [itex]\Gamma(r)[/itex] disappear.

Alright, thank you for all your replies. I've tried figuring them out. Here are the outcomes. Kindly check if these are right.

[tex]\frac{d}{d\lambda} log L\left(\underline{y}; r, \lambda\right) = \frac{nr}{\lambda} - \sum y[/tex]
Equating the derivative above to zero results to:
[tex]\frac{nr}{\hat{\lambda}}= \sum y[/tex]
solving for [tex]\hat{\lambda}[/tex], I have replaced [tex]n\bar{y}[/tex] for [tex]\sum y[/tex], and were able to come up with an equation [tex]\hat{\lambda} = \lambda[/tex].

Is this the result am I suppose to have?

If this really is it, is this MLE unbiased?
 
  • #6
You may not assume sample average = distribution mean. The sample average is just a random variable, like y itself; it does not have a constant value.
 
Last edited:
  • #7
You may not assume sample average = distribution mean. The sample average is just a random variable, like y itself; it does not have a constant value.

Oh, here's what I've done.
[tex]\frac{nr}{\hat{\lambda}}= \sum x[/tex]
Solving for [tex]\lambda[/tex]:
[tex]\hat{\lambda} = \frac{rn}{\sum x} = \frac{rn}{n \bar{x}} = \frac{rn}{n \frac{r}{\lambda}} = \lambda[/tex]

Is this not right?
 
  • #8
I haven't checked your math, but assuming that you haven't made a mistake, you should stop at lambda hat = r n / Sum(x). That's your MLE of lambda.
 

Suggested for: Likelihood function of the gamma distribution

Replies
6
Views
755
Replies
1
Views
532
Replies
1
Views
585
Replies
16
Views
951
Replies
1
Views
534
Replies
2
Views
532
Replies
3
Views
885
Replies
1
Views
946
Back
Top