Likelihood function of the gamma distribution

In summary: Oh, here's what I've done.\frac{nr}{\hat{\lambda}}= \sum xSolving for \lambda:\hat{\lambda} = \frac{rn}{\sum x} = \frac{rn}{n \bar{x}} = \frac{rn}{n \frac{r}{\lambda}} = \lambda
  • #1
safina
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].
 
Physics news on Phys.org
  • #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
EnumaElish said:
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
safina said:
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
bpet said:
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
EnumaElish said:
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.
 

Related to Likelihood function of the gamma distribution

1. What is the likelihood function of the gamma distribution?

The likelihood function of the gamma distribution is a mathematical expression that represents the probability of obtaining a set of data given a specific set of parameters for the gamma distribution. It is used in statistical analysis to estimate the parameters of the gamma distribution that best fit the data.

2. How is the likelihood function of the gamma distribution calculated?

The likelihood function of the gamma distribution is calculated by multiplying the probability density function (PDF) of the gamma distribution for each data point. The PDF is determined by the shape and scale parameters of the gamma distribution, and the likelihood function is the product of all the PDF values for the given data set.

3. What is the relationship between the likelihood function and maximum likelihood estimation?

The likelihood function is an essential part of maximum likelihood estimation, which is a method used to determine the most likely values for the parameters of a probability distribution. The maximum likelihood estimate is the set of parameter values that maximizes the likelihood function for a given data set.

4. Can the likelihood function be used to compare different gamma distributions?

Yes, the likelihood function can be used to compare different gamma distributions. By calculating the likelihood function for each distribution and comparing the values, one can determine which distribution best fits the given data. The distribution with the highest likelihood function value is considered the best fit for the data.

5. How is the likelihood function of the gamma distribution used in hypothesis testing?

The likelihood function of the gamma distribution is used in hypothesis testing to determine the probability of obtaining a set of data if a specific hypothesis is true. This probability is compared to a pre-determined significance level to determine if the hypothesis should be accepted or rejected. A higher likelihood function value indicates stronger evidence in support of the hypothesis.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
961
  • Set Theory, Logic, Probability, Statistics
Replies
7
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
4K
  • Set Theory, Logic, Probability, Statistics
Replies
5
Views
3K
  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
16
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
2K
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
1K
Back
Top