Equivalence of Definitions of Variance of Discrete Random Variable

Theorem
Let $X$ be a discrete random variable.

Let $\mu = \expect X$ be the expectation of $X$.

Definition 1 equivalent to Definition 2
Let $\var X$ be defined as:


 * $\var X := \expect {\paren {X - \expect X}^2}$

Let $\mu = \expect X$.

Let $\map f X = \paren {X - \mu}^2$ be considered as a function of $X$.

Then by applying Expectation of Function of Discrete Random Variable:
 * $\displaystyle \expect {\map f X} = \sum_{x \mathop \in \Omega_X} \map f x \, \map \Pr {X = x}$

which leads to:
 * $\displaystyle \expect {\paren {X - \mu}^2} = \sum_{x \mathop \in \Omega_X} \paren {\paren {X - \mu}^2} \map \Pr {X = x}$

thus demonstrating the equality of Definition 1 to Definition 2.

Definition 2 equivalent to Definition 3
Let $\mu = \expect X$, and take the expression for variance:
 * $\displaystyle \var X := \sum_{x \mathop \in \Img X} \paren {x - \mu}^2 \map \Pr {X = x}$

Then from Variance as Expectation of Square minus Square of Expectation:
 * $\var X = \expect {X^2} - \paren {\expect X}^2$