How does E[(X-mu)^2] = E[X^2]-(E[X])^2 ?
Follow Math Help Forum on Facebook and Google+
If we factor the first component of the equation, we get: X^2 - 2muX + mu^2
$\begin{align*} &E[(X-\mu)^2] = \\ &E[X^2 - 2 X \mu + \mu^2] = \\ &E[X^2] - 2\mu E[X] + \mu^2 = \\ &E[X^2] - 2 \mu^2 + \mu^2 = \\ &E[X^2] - \mu^2 = \\ &E[X^2] - \left(E[X]\right)^2 \end{align*}$