Definition:Variance/Discrete/Definition 2

Definition
Let $X$ be a discrete random variable.

Then the variance of $X$, written $\operatorname{var} \left({X}\right)$, is defined as:
 * $\displaystyle \operatorname{var} \left({X}\right) := \sum_{x \mathop \in \Omega_X} \left({x - \mu}\right)^2 \Pr \left({X = x}\right)$

where:
 * $\mu := E \left({X}\right)$ is the expectation of $X$
 * $\Omega_X$ is the image of $X$
 * $\Pr \left({X = x}\right)$ is the probability mass function of $X$.

Also see

 * Equivalence of Definitions of Variance of Discrete Random Variable