I would like to learn how to calculate the expected value of a continuous random variable. It appears that the expected value is E[X]=∫∞−∞xf(x)dx where f(x) is the probability density function of X.
Suppose the probability density function of X is f(x)=1√2πe−x22 which is the density of the standard normal distribution.
So, I would first plug in the PDF and get
which is a rather messy looking equation. The constant 1√2π can be moved outside the integral, giving
I get stuck here. How do I calculate integral? Am I doing this correctly this far? Is the simplest way to get the expected value?
You are almost there,
follow your last step:
Or you can directly use the fact that xe−x2/2 is an odd function and the limits of the integral are symmetry.