Equivalence of Definitions of Variance of Discrete Random Variable

Theorem
Let $X$ be a discrete random variable.

Let $\mu = E \left({X}\right)$ be the expectation of $X$.

The following definitions of variance are equivalent:

Definition 1 equivalent to Definition 2
Let $\operatorname{var} \left({X}\right)$ be defined as:


 * $\operatorname{var} \left({X}\right) := E \left({\left({X - E \left({X}\right)}\right)^2}\right)$

Let $\mu = E \left({X}\right)$.

Let $f \left({X}\right) = \left({X - \mu}\right)^2$ be considered as a function of $X$.

Then by applying Expectation of Function of Discrete Random Variable:
 * $\displaystyle E \left({f \left({X}\right)}\right) = \sum_{x \mathop \in \Omega_X} f \left({x}\right) \Pr \left({X = x}\right)$

which leads to:
 * $\displaystyle E \left({\left({X - \mu}\right)^2}\right) = \sum_{x \mathop \in \Omega_X} \left({\left({X - \mu}\right)^2}\right) \Pr \left({X = x}\right)$

thus demonstrating the equality of Definition 1 to Definition 2.

Definition 2 equivalent to Definition 3
Let $\mu = E \left({X}\right)$, and take the expression for variance:
 * $\displaystyle \operatorname{var} \left({X}\right) := \sum_{x \mathop \in \operatorname{Im} \left({X}\right)} \left({x - \mu}\right)^2 \Pr \left({X = x}\right)$

Then from Variance as Expectation of Square minus Square of Expectation:
 * $\operatorname{var} \left({X}\right) = E \left({X^2}\right) - \left({E \left({X}\right)}\right)^2$