Likelihood function of the gamma distribution

  • Thread starter safina
  • Start date
  • #1
28
0

Main Question or Discussion Point

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
EnumaElish
Science Advisor
Homework Helper
2,304
124
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
28
0
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
525
5
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
28
0
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
EnumaElish
Science Advisor
Homework Helper
2,304
124
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
28
0
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
EnumaElish
Science Advisor
Homework Helper
2,304
124
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.
 

Related Threads for: Likelihood function of the gamma distribution

Replies
0
Views
4K
Replies
2
Views
3K
  • Last Post
Replies
1
Views
2K
Replies
2
Views
3K
  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
2
Views
990
  • Last Post
Replies
3
Views
7K
Top