# How to calculate MEAN of exponential distribution?

$f(x) = \begin{cases} \frac15 e^{(-\frac15x)}, x>0 \\ 0, \text{elsewhere}\\ \end{cases}$

How to calculate $E[(X+5)]$ and $E[(X+5)^2]$ ?

Thanks a lot.

-
Do you know what $E[X]$ is? –  Nikita Evseev Oct 22 '12 at 13:38
$$\displaystyle \int_0^{\infty} \dfrac{(x+5)\exp(\frac{-x}{5})}{5}$$ –  Inquest Oct 22 '12 at 13:44
What did you try and what is STOPPING you? –  Did Oct 22 '12 at 13:50
I know $E[X]$ means the mean/expected value of $f(x)$ –  Rick Oct 22 '12 at 13:52
I know $E[X]$ = 5 but I've no idea about $E[(X+5)^2]$ –  Rick Oct 22 '12 at 13:54

Hints: for $E[X+5]$ use the linearity of expectation. What is $E[5]$?

For $E[(X+5)^2]$ you can go back to the definition $$E[(X+5)^2]=\displaystyle \int_0^{\infty} \dfrac{(x+5)^2\exp(\frac{-x}{5})\; dx}{5}$$ or you can expand out $E[(X+5)^2]=E[X^2]+2E[X]E[5]+E[5^2]$

-
Is $E[X] = \frac1\lambda$? Then $E[X] = 5$. Can we use the similar method to find out $E[(x+5)^2]$ ? –  Rick Oct 22 '12 at 14:28
Yes, $E[X]=5$ The way you find that (if you don't look it up) is the integral Inquest gave without the +5. The integral in my answer is the same method for $E[(X+5)^2]$ Can you do it? –  Ross Millikan Oct 22 '12 at 14:44
Sorry. Can you show the steps why $E[(X+5)^2]=E[X^2]+2E[X]+E[5^2]$? –  Rick Oct 23 '12 at 5:14
Why it's not $E[(X+5)^2]=E[X^2]+10E[X]+E[5^2]$ but $+2E[X]$? –  Rick Oct 23 '12 at 6:15
@Rick: You are right, I dropped the $E[5]$. Fixed. –  Ross Millikan Oct 23 '12 at 12:56

If you know that $$\int_0^\infty u^2 e^{-u} \, du = 2,$$ then you can write $$\int_0^\infty x^2 e^{-x/5}\, \frac{dx}{5} = 5^2 \int_0^\infty \left(\frac x 5\right)^2 e^{-x/5} \, \frac{dx}{5} = 5^2\int_0^\infty u^2 e^{-u} \, du = 5^2\cdot 2.$$ That gets you $E(X^2)$. And $E((X+5)^2) = E(X^2) + 10E(X) + 5^2$, etc.

-
Can you explain a little bit more on $E((X+5)2)=E(X2)+10E(X)+5$? I'm quite confused. –  Rick Oct 22 '12 at 16:41
Why it's not $E[(X+5)^2]=E[X^2]+10E[X]+E[5^2]$ but $+5$? –  Rick Oct 23 '12 at 6:16
Sorry --- typo: It's $5^2$. –  Michael Hardy Oct 23 '12 at 19:26