1. ## Expected Value

Hi
I'm trying to work out the expected value of the continuous random variable Y:

$\displaystyle E[Y]=\int_{0}^{\infty}\frac{n{}^{n}\lambda{}^{n}}{\Gam ma(n)}y^{n-1}e^{-ny\lambda}\textrm{d}y=\frac{n{}^{n}\lambda{}^{n}}{ \Gamma(n)}\int_{0}^{\infty}y^{n-1}e^{-ny\lambda}$

note: in the denominator right after the first integral sign, it should read Gamma(n) not ma(n). not sure what happened to me TeX code.

where n is a positive integer constant, and lambda is a constant

so far i've tried integration by parts, but i got a recursion

Integration by parts

let $\displaystyle u=y^{n-1}$ and $\displaystyle v'=e^{-ny\lambda}$

$\displaystyle u'=(n-1)y^{n-2}$$\displaystyle and v=\frac{-1}{n\lambda}e^{-ny\lambda}$

$\displaystyle I=uv-\int vu'\textrm{d}y$

$\displaystyle =\left[y^{n-1}\frac{-1}{n\lambda}e^{-ny\lambda}\right]_{0}^{\infty}-\int_{0}^{\infty}(n-1)$

2. In the 2nd integral use the substitution

$\displaystyle y=\frac{u}{n \lambda} \iff u=ny\lambda \implies du=n \lambda dy$

This gives

$\displaystyle \frac{n^n \lambda^n}{\Gamma{(n)}} \int _{0}^{\infty} \left( \frac{u}{n \lambda} \right)^{n-1} e^{-u} \left( \frac{du}{n \lambda}\right) = \frac{1}{\Gamma{(n)}}\int_{0}^{\infty}u^{n-1}e^{-u}du=1$

The last integral is Gamma of n

3. You will have to get used to some functions (many!) being defined by their integral expressions.

4. ## confidence interval

ah thanks so much!!

hmm i wonder if you could help me with this too:
the reason i was trying to work out the expected value of Y was because i was trying to find a 95% confidence interval for lambda.

The distribution if Y is given by (y>0)
$\displaystyle \frac{n{}^{n}\lambda{}^{n}}{\Gamma(n)}y^{n-1}e^{-ny\lambda}$

my plan was to work out a 95% confidence interval for Y and then work out mu, the true mean, using the distribution function above - i was hoping for mu to be a function of lambda so i could rearrange the inequality. problem here is that E[Y] seems to have turned out to be equal to 1.

$\displaystyle P(\overline{X}-1.96\sqrt{\overline{X}/n}<\mu<\overline{X}+1.96\sqrt{\overline{X}/n})=0.95$

My friend suggested i try and find the confidence interval this way, but i was wondering if this approach is correct?

thanks a lot !!!

5. 1) The distribution you have indicated is not symmetric about the mean. You shoudl worry about this before you think you are done.

2) Are yousure that's the right variance? a) Calculated correctly for the distribution, and b) is it a reasonable estimate of the population variance.

3) Of course, a large enough sample size covereth a multitude of sins.