(Expectation of a Normal Random Variable) Calculate E[X] when X is normally distributed with parameters μ and σ².
Writing x as (x − μ) + μ yields
E[X]={\frac{1}{\sqrt{2\pi}\sigma}}\int_{-\infty}^{\infty}(x-\mu)e^{-(x-\mu)^{2}/2\sigma^{2}}\,d x+\,\mu\frac{1}{\sqrt{2\pi}\sigma}\int_{-\infty}^{\infty}e^{-(x-\mu)^{2}/2\sigma^{2}}\,d xLetting y = x − μ leads to
E[X]={\frac{1}{\sqrt{2\pi}\sigma}}\int_{-\infty}^{\infty}y e^{-y^{2}/2\sigma^{2}}d y+\mu\int_{-\infty}^{\infty}f(x)\,d xwhere f(x) is the normal density. By symmetry, the first integral must be 0, and so
E[X]=\mu\int_{-\infty}^{\infty}f(x)\,d x=\mu