# Expected Value

• May 16th 2011, 11:33 AM
mechtoast
Expected Value
Hi
I'm trying to work out the expected value of the continuous random variable Y:

$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 $u=y^{n-1}$ and $v'=e^{-ny\lambda}$

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

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

$=\left[y^{n-1}\frac{-1}{n\lambda}e^{-ny\lambda}\right]_{0}^{\infty}-\int_{0}^{\infty}(n-1)$
• May 16th 2011, 11:49 AM
TheEmptySet
In the 2nd integral use the substitution

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

This gives

$\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
• May 16th 2011, 11:52 AM
TKHunny
You will have to get used to some functions (many!) being defined by their integral expressions.
• May 16th 2011, 12:37 PM
mechtoast
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)
$\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.

$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 !!!
• May 16th 2011, 03:47 PM
TKHunny
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.