Variance as Expectation of Square minus Square of Expectation/Discrete

Theorem
Let $X$ be a discrete random variable.

Then the variance of $X$ can be expressed as:
 * $\var X = \expect {X^2} - \paren {\expect X}^2$

That is, it is the expectation of the square of $X$ minus the square of the expectation of $X$.

Proof
We let $\mu = \expect X$, and take the expression for variance:
 * $\var X := \ds \sum_{x \mathop \in \Img X} \paren {x - \mu}^2 \map \Pr {X = x}$

Then:

Hence the result, from $\mu = \expect X$.