1. ## Confidence interval

Suppose that a random variable Y has a gamma distribution w. parameters $\displaystyle \alpha = 2$ and an unknown $\displaystyle \beta$. We have earlier proved that $\displaystyle 2Y/\beta$ has a chi-square distribution w. 4 df. Using $\displaystyle 2Y/\beta$ as a pivotal quantity. derive a 90% confidence interval for \beta.

I don't know if I'm on the right way. I create a new random variable $\displaystyle U = 2Y/\beta$ and look for $\displaystyle P(a\leq U\leq b) = 0.90$

=

$\displaystyle P(a\leq 2Y/\beta\leq b) = 0.90$

I then have a similar example in the book that tells me to set it up like this:

$\displaystyle P(U<a) = \int_{0}^{a}{} f(u) du = 0.05$

$\displaystyle P(U>b) = \int_b^\infty f(u) du = 0.05$

Must I derive the pdf of U manually or can I use that $\displaystyle 2Y/\beta$ is chi-square distributed and put in the pdf of a chi-square distribution?

That would be:
$\displaystyle (y)^{(\upsilon /2)-1}e^{-y/2}/2^{\upsilon/2}\Gamma (\upsilon /2)$ but with y=u and $\displaystyle \upsilon$ = 4
I've tried to do that but I don't get the right answer, which is $\displaystyle 2Y/9.49, 2Y/.711$.

2. Originally Posted by approx
Suppose that a random variable Y has a gamma distribution w. parameters $\displaystyle \alpha = 2$ and an unknown $\displaystyle \beta$. We have earlier proved that $\displaystyle 2Y/\beta$ has a chi-square distribution w. 4 df. Using $\displaystyle 2Y/\beta$ as a pivotal quantity. derive a 90% confidence interval for \beta.

I don't know if I'm on the right way. I create a new random variable $\displaystyle U = 2Y/\beta$ and look for $\displaystyle P(a\leq U\leq b) = 0.90$

=

$\displaystyle P(a\leq 2Y/\beta\leq b) = 0.90$

I then have a similar example in the book that tells me to set it up like this:

$\displaystyle P(U<a) = \int_{0}^{a}{} f(u) du = 0.05$

$\displaystyle P(U>b) = \int_b^\infty f(u) du = 0.05$

Must I derive the pdf of U manually or can I use that $\displaystyle 2Y/\beta$ is chi-square distributed and put in the pdf of a chi-square distribution?

That would be:
$\displaystyle (y)^{(\upsilon /2)-1}e^{-y/2}/2^{\upsilon/2}\Gamma (\upsilon /2)$ but with y=u and $\displaystyle \upsilon$ = 4
I've tried to do that but I don't get the right answer, which is $\displaystyle 2Y/9.49, 2Y/.711$.
The pdf of U is $\displaystyle f(u) = \frac{u e^{-u/2}}{4}$.

$\displaystyle \Pr(U < a) = \int_0^a \frac{u e^{-u/2}}{4} \, du$ for a. I get a = 0.710723.

$\displaystyle \Pr(U > b) = \int_b^{+\infty} \frac{u e^{-u/2}}{4} \, du$ for b. I get b = 9.48772.

So your trouble is calculus, not statistics. Now that you know that what you're trying to do is correct, I suggest you go back and re-check your calculations. Then:

$\displaystyle 0.9 = \Pr \left( 0.710723 \leq U \leq 9.48792 \right) = \Pr \left( 0.710723 \leq \frac{2Y}{\beta} \leq 9.48792 \right)$

$\displaystyle = \Pr \left( \frac{0.710723}{2Y} \leq \frac{1}{\beta} \leq \frac{9.48792}{2Y} \right)$

where the direction of the inequalities is maintained (that is, they are NOT reversed) because Y > 0. Y > 0 because Pr(Y > 0) = 1 (since Y has a gamma distribution)

$\displaystyle = \Pr \left( \frac{2Y}{9.48792} \leq \beta \leq \frac{2Y}{0.710723} \right)$.

3. Seems like I can't get the right answer after all. Can someone please check my calculations to see where I go wrong?

$\displaystyle P(U<a) = \int_0^a \frac{ue^{-u/2}}{4} du = 0.05$ =

$\displaystyle 1/4\int_0^a {ue^{-u/2}} du] = 0.05$ =

$\displaystyle 1/4[u*(-2e^{-u/2}]_0^a - \int_0^a 1*(-2e^{-u/2})\, du = 0.05$ =

$\displaystyle 1/4[[-u2e^{-u/2}]_0^a - \int_0^a -2e^{-u/2} du] = 0.05$

$\displaystyle 1/4[[-a2e^{-a/2}] - [4e^{-u/2}]_0^a] = 0.05$ =

$\displaystyle 1/4[-a2e^{-a/2} - [4(e^{-a/2}-e^{-0})] = 0.05$

$\displaystyle 1/4[-a2e^{-a/2} - [4(e^{-a/2}-1)] = 0.05$ =

$\displaystyle 1/4[-a2e^{-a/2} - 4e^{-a/2} + 4)] = 0.05$

4. Originally Posted by approx
Seems like I can't get the right answer after all. Can someone please check my calculations to see where I go wrong?

$\displaystyle P(U<a) = \int_0^a \frac{ue^{-u/2}}{4} du = 0.05$ =

$\displaystyle 1/4\int_0^a {ue^{-u/2}} du] = 0.05$ =

$\displaystyle 1/4[u*(-2e^{-u/2}]_0^a - \int_0^a 1*(-2e^{-u/2})\, du = 0.05$ =

$\displaystyle 1/4[[-u2e^{-u/2}]_0^a - \int_0^a -2e^{-u/2} du] = 0.05$

$\displaystyle 1/4[[-a2e^{-a/2}] - [4e^{-u/2}]_0^a] = 0.05$ =

$\displaystyle 1/4[-a2e^{-a/2} - [4(e^{-a/2}-e^{-0})] = 0.05$

$\displaystyle 1/4[-a2e^{-a/2} - [4(e^{-a/2}-1)] = 0.05$ =

$\displaystyle 1/4[-a2e^{-a/2} - 4e^{-a/2} + 4)] = 0.05$
Your calculations are correct. Now solve for a (numerically, I'd imagine) and get an answer to the required accuracy. (An exact answer in terms of the Lambert W-function is possible but neither useful nor required).

5. Sorry for going about this forever. I also posted this in the math part, but no one was able to help me out. I go on like this:

$\displaystyle 1/4[-a2e^{-a/2} - 4e^{-a/2} + 4)] = 0.05$

$\displaystyle 1/4(-a2e^{-a/2}) -e^{a/2} +1 = 0.05$

$\displaystyle -0.5a(e^{-a/2}) -e^{a/2} +1 = 0.05$

$\displaystyle -0.5a(e^{-a/2}) -e^{a/2} = -0.95$

$\displaystyle -e^{-a/2} (1+0.5a)= -0.95$

$\displaystyle -e^{-a/2} = \frac{-0.95}{(1+0.5a)}$

$\displaystyle e^{-a/2} = \frac{0.95}{-(1+0.5a)}$

But how do I solve for a from here? Thanks for your help.

6. Originally Posted by approx
Sorry for going about this forever. I also posted this in the math part, but no one was able to help me out. I go on like this:

$\displaystyle 1/4[-a2e^{-a/2} - 4e^{-a/2} + 4)] = 0.05$$\displaystyle \displaystyle \displaystyle 1/4(-a2e^{-a/2}) -e^{a/2} +1 = 0.05$$$\displaystyle
$\displaystyle -0.5a(e^{-a/2}) -e^{a/2} +1 = 0.05$$\displaystyle \displaystyle -0.5a(e^{-a/2}) -e^{a/2} = -0.95$$$\displaystyle
$\displaystyle -e^{-a/2} (1+0.5a)= -0.95$$\displaystyle \displaystyle -e^{-a/2} = \frac{-0.95}{(1+0.5a)}$$$\displaystyle
$\displaystyle e^{-a/2} = \frac{0.95}{-(1+0.5a)}$\$

But how do I solve for a from here? Thanks for your help.

As I said earlier, you will have to solve it numerically. That means you have to use technology to get an approximate solution. eg. I used a TI-89 calculator to get my answers.