# Expected value of a random variable

Let us say that $P$ is a normal random variable having expected value $\mu$ and variance $\sigma^2$. I am asked to compute the expected value of the variable $Y = |P|$.

Could someone explain?

• You need to know more that the information given. Are you sure it wasn't $y = |p|^2$? – cardinal Jan 22 '12 at 21:51
• Jensen's inequality gives you a simple upper bound since $$\mathbb E Y = \mathbb E \sqrt{P^2} \leq \sqrt{\mathbb E P^2} = \sqrt{\mu^2 + \sigma^2} \> .$$ – cardinal Jan 22 '12 at 21:54
• I am sure about the question. it is to compute the expected value of variable Y=|P|. – Probabilityman Jan 22 '12 at 21:55
• Do you know something about the distribution of $P$? Perhaps it is normal? Or something else? Without further information a definitive answer is not possible. (Consider for example, if $\mathbb P(P=1) = \mathbb P(P=-1) = 1/2$ vs. the case where $P$ is standard normal. Both have mean zero and variance 1, but $\mathbb E |P|$ is different in the two cases.) – cardinal Jan 22 '12 at 21:57
• P is a normal random variable – Probabilityman Jan 22 '12 at 21:59

Hint:

By definition,

$$E(|P|)=\int_{-\infty}^\infty |x| P(x)dx=\frac{1}{\sqrt{2\pi\sigma^2}}\int_{-\infty}^\infty |x| e^{-\frac{(x-\mu)^2}{2\sigma^2}}dx$$

You can divide the integral into $$\int_{-\infty}^\infty=\int_{-\infty}^0+\int_0^\infty$$ Now you can calculate these integrals (hint: what is $|x|$ for $x<0$? and for $x>0$?)

• A hint to add to yohBS's answer. Do the following seemingly mindless exercise. Differentiate $e^{-(x-\mu)^2/2\sigma^2}$ and stare very hard at the result and at the integrands above. – Dilip Sarwate Jan 22 '12 at 22:33
• @DilipSarwate I get the answer as - (of the same value) as in -e^(-(x−μ)2/2σ2) – Probabilityman Jan 22 '12 at 23:22
• Is thsi the correct approach. I used |x| for x<0 as -x and |x| for x>0 as +x. also my final answer what i obtained is: – Probabilityman Jan 23 '12 at 0:23
• 1/(sqrt(2*pisigma sq) * (2e^-mu sq + root(pi)*mulog(e))/(4*sigma square *log(e)) – Probabilityman Jan 23 '12 at 0:24
• @cardinal if you could provide me your email id, i could email you a snap shot of the whole integration process. i am unable to type out the entire thing, i did it on paper – Probabilityman Jan 23 '12 at 0:26

Y has folded normal distribution, in the following link you can find its expected value using the expected value and variance of P. http://en.wikipedia.org/wiki/Folded_normal_distribution