(Variance of the Normal Random Variable) Let X be normally distributed with parameters μ and σ². Find Var(X).
Recalling (see Example 2.22) that E[X] = μ, we have that
\operatorname{Var}(X)=E[(X-\mu)^{2}]={\frac{1}{{\sqrt{2\pi}\sigma}}}\int_{-\infty}^{\infty}(x-\mu)^{2}e^{-(x-\mu)^{2}/2\sigma^{2}}\,d x
Substituting y = (x − μ)/σ yields
\operatorname{Var}(X)={\frac{\sigma^{2}}{{\sqrt{2\pi}}}}\int_{-\infty}^{\infty}y^{2}e^{-y^{2}/2}\,d yIntegrating by parts (u=y,\;d v=y e^{-y^{2}/2}d y) gives
\operatorname{Var}(X)={\frac{\sigma^{2}}{{\sqrt{2\pi}}}}\left(-y e^{-y^{2}/2}\bigg|_{-\infty}^{\infty}+\int_{-\infty}^{\infty}e^{-y^{2}/2}\,d y\right)={\frac{\sigma^{2}}{\sqrt{2\pi}}}\int_{-\infty}^{\infty}e^{-y^{2}/2}\,d y
= σ²
Another derivation of Var(X) will be given in Example 2.42.