For $$f(x|\theta)=\frac{1}{24}x^4\theta^{-5}\exp^{-\frac{x}{\theta}}I_{(0,\infty)}(x)\hspace{0.5cm}\theta\in\mathbb{R}^+$$

I want to find a $100(1-\alpha)\%$ confidence interval.

I know $T(X_1,\dots,X_n)=\sum\limits_{i=1}^nX_i\sim\text{Gamma}(5n,\theta)$ and T is sufficient

So $$f_T(t)=\frac{t^{5n-1}e^{-t/\theta}}{\Gamma(5n)\theta^{5n}}$$ Then I used $t=y\theta$ so

$$f_Y(y)=\frac{y^{5n-1}e^{-y}}{\Gamma(5n-1)}$$ Then I should find $\gamma_1,\gamma_2$ such that $$P(\gamma_1<T/\theta<\gamma_2)=1-\alpha $$ So I need $F_Y(\gamma_1)$ and $F_Y(\gamma_2)$ and solve for $\gamma_1$ and $\gamma_2$ but I can't do it.

  • 1
    $\begingroup$ Add the self-study tag if this is homework. $\endgroup$ Commented May 23, 2020 at 18:36

1 Answer 1


You have a random sample of $n$ observations $X_1, X_2, \dots, X_n$ from a population with distribution $\mathsf{Gam}(\mathrm{shape}=5, \mathrm{scale}=\theta),$ where $\theta$ is unknown.

Suppose you wish to use these data to make a 95% confidence interval for $\theta.$ Let $T = \sum_{i=1}^n X_i,$ which has $E(T) = 5n\theta.$

You propose using the pivotal quantity $Y = T/\theta,$ which has distribution $\mathsf{Gam}(\mathrm{shape}=5n, \mathrm{scale}=1)$ and $E(Y) = 5n.$ [Note: Your density function for the distribution of $Y$ needs to have denominator $\Gamma(5n),$ not $\Gamma(5n-1).]$

If $L$ and $U$ cut probability 0.025 from the lower and upper tails, respectively, of $\mathsf{Gam}(5n,1),$ then with $n = 30,$ we can use R statistical software to find that $L=126.9562, U= 174.9372.$ [Note: In R, the second parameter is the rate $\lambda$, which is the reciprocal of the scale. But here both rate and scale are $1.]$

a = 5; n = 30
LU = qgamma(c(.025,.975), a*n, 1);  LU
[1] 126.9562 174.9372


$$ 0.95 = P(L < Y = T/\theta < U) = P(T/U < \theta < T/L),$$

so that a 95% confidence interval of $\theta$ is $(T/U,\, T/L).$

Example: As an example, we let $\theta = 9$ and use R to get a random sample of size $n = 30$ from $\mathsf{Gam}(\mathrm{shape} = \alpha = 5, \mathrm{scale} = 9).$

a = 5;  th = 9
x = rgamma(n, a, 1/th)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  11.92   28.20   45.19   46.48   58.94   99.61 
t = sum(x);  t
[1] 1394.351

The resulting 95% CI for $\theta$ is $(7.97, 10.98).$

t/qgamma(c(.975,.025), a*n, 1)
[1]  7.970578 10.982932

So my random sample was among the 'lucky' 95% of samples that produces a CI covering $\theta = 8.$

Note: If you're allergic to software, you can express the distribution $\mathsf{Gam}(5n, 1)$ as an equivalent chi-squared distribution and use printed chi-squared tables to find lower and upper boundaries.

qchisq(c(.025,.975), 300)/2
[1] 126.9562 174.9372
qgamma(c(.025,.975), 150, 1)
[1] 126.9562 174.9372
  • $\begingroup$ Thank you for your answer and how can I can express the distribution Gam(5n,1) as an equivalent chi-squared distribution? $\endgroup$
    – Jhon Knows
    Commented May 23, 2020 at 18:20
  • $\begingroup$ I will leave that for you. If it isn't clear from your text, you can look at Wikipedia articles on gamma and chi-squared under Related distributions. (Erlang is a Gamma with integer shape parameter.) ) $\endgroup$
    – BruceET
    Commented May 23, 2020 at 18:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.