# Confidence Interval for a Random Sample Selected from Gamma Distribution

Working on a homework question and having some trouble... Any help would be greatly appreciated.

Based on a sample 1.23, 0.36, 2.13, 0.91, 0.16, 0.12 from the GAM$(2,\theta)$ distribution, find an exact 95% CI for parameter $\theta$.

So we know GAM$(\alpha, \lambda)$ has the pdf $f(x)= \dfrac{\lambda^{\alpha}}{\Gamma{(\alpha)}} x^{\alpha - 1} \ e^{-\lambda x}$.

Therefore our random sample is distributed with pdf $f(x)=\theta^{2} x e^{-\theta x}$.

I understand that because the question asks for an "exact" confidence interval, that I need to find the pivotal variable.

The problem I am having is that most examples I find are along the lines of a random sample... $X_1,...,X_n \sim N(\theta, \sigma^{2})$ if $\sigma$ is known then $Z= \dfrac{\bar{X}-\theta}{\frac{\sigma}{\sqrt{n}}}\sim N(0,1)$, is pivotal. And from there finding the CI is relatively simple.

I guess I am at a loss as to how one would go about finding the pivotal variable when things are not normally distributed.

Thank you for your help, any suggestions would be appreciated.

Edit: Time to add details, I think. The OP has long since worked it out but hasn't taken the invitation to write up a more complete solution, so I shall, in the interest of having a full answer to the question.

A pivot is a function of the data and the statistic whose distribution doesn't depend on the value of the statistic.

So consider:

(1) what would the distribution of a statistic consisting of the sum of the observations ($$T=\sum_i x_i$$) be?

A sum of $$n$$ i.i.d. $$\text{gamma}(\alpha,\theta)$$ random variables has the $$\text{gamma}(n\alpha,\theta)$$ distribution (for the shape-rate form of the gamma).

Here $$n=6$$ and $$\alpha=2$$, so the sum, $$T$$ has a $$\text{gamma}(12,\theta)$$ distribution.

(2) Note that the distribution in (1) does depend on $$\theta$$ and the form of the statistic doesn't. You need to modify the statistic ($$Q=f(T,\theta)$$) in such a way that both of those change. (This part is trivial!)

Let $$Q=T/\theta$$. Then $$Q\sim \text{gamma}(12,1)$$.

$$Q$$ satisfies the conditions required for a pivotal quantity.

(3) Once you have a pivotal quantity (i.e. $$Q$$), write down an interval for the pivotal quantity (in the form of a pair of inequalities, $$a< Q< b$$) with the given coverage. Since the distribution doesn't depend on the parameter, this interval is always the same (at a given sample size) no matter what the value of $$\theta$$.

One such interval is $$(a,b)$$, where $$P(a, when $$a$$ is the 0.025 point of the $$\text{gamma}(12,1)$$ distribution and $$b$$ is the 0.975 point.

(4) Now write the interval involving the pivotal quantity back in terms of the data and $$\theta$$. Back out an interval for the parameter, for which the corresponding probability statement must still hold (keeping in mind that the random quantity is not $$\theta$$ but the interval).

$$P(a implies $$P(1/b < \theta/T < 1/a)=0.95$$, so $$P(T/b < \theta < T/a)=0.95$$. Therefore $$(T/b,T/a)$$ is a 95% interval for $$\theta$$.

Our observed total, $$t = 4.91$$. The 0.025 point of a gamma(12,1) is 6.2006 and the 0.975 point is 19.682. Hence a 95% interval for $$\theta$$ is (4.91/19.682,4.91/6.200)
= $$(0.249, 0.792)$$.

• If $Y_1$ and $Y_2$ are both $\sim Gamma(\alpha, \beta)$, what's the distribution of $Y_1+Y_2$? I expect you've done it before, so this may be a result you already know. Commented Mar 8, 2014 at 0:43
• Yes. As long as the scale parameter is the same, you can sum the shape parameters. Commented Mar 8, 2014 at 22:00
• k6adams - Consider exactly the same statement as you wrote about $Y_1$ and $Y_2$ but with $Y_3$ and $Y_4$ in terms of $\alpha_3$ and $\alpha_4$ (that is, the exact same thing with merely a change of dummy variables). Now take your statement about $Y_1$ and $Y_2$ and let $Y_4=Y_1+Y_2$ and $\alpha_4=\alpha_1+\alpha_2$ and substitute those into the statement about $Y_3$ and $Y_4$. Do you see that as soon as you can do it for two, it must be true for as many as you like? Commented Mar 8, 2014 at 22:05
• @k6adams: I made edits. Does it look better now? Commented Mar 9, 2014 at 22:07
• @Glen_b Since $\sum{x_i}=T\sim GAM(12,\theta)$, $\theta T\sim GAM(12, 1)$. So, $2\theta T \sim \chi^{2}(24)$. From there one can find upper and lower bounds ($c_1$ and $c_2$ respectively) on a $\chi^{2}$ table, and solve $P(c_1<T<c_2)=0.95$. I think that is it... just leaving this comment as to not leave others hanging. Thanks for the help everyone. Commented Mar 12, 2014 at 0:27