Skip to content

Variance and Standard Deviation

Definition

Let XX be a random variable with E[X2]<∞\mathbb{E}[X^2]<\infty, and let μ=EX\mu=\mathbb{E}X. The variance of XX is

Var⁡(X)=E[(X−μ)2]=E[X2]−μ2,\operatorname{Var}(X)=\mathbb{E}[(X-\mu)^2]=\mathbb{E}[X^2]-\mu^2,

and the standard deviation is σX=Var⁡(X)\sigma_X=\sqrt{\operatorname{Var}(X)}.


Interpretation

Variance measures how far the values of XX typically lie from the mean μ=EX\mu=\mathbb{E}X: it is the probability-weighted average of the squared distance (X−μ)2(X-\mu)^2. The standard deviation, its square root, measures the same spread in the original units of XX.

Two normal densities with the same mean, a narrow one with standard deviation 1 and a wide one with standard deviation 2, with arrows showing one standard deviation for each.

The figure shows two bell-shaped distributions with the same mean μ\mu. The narrow curve has standard deviation 11 and the wide one standard deviation 22; the arrows run from μ\mu to μ+σ\mu+\sigma for each curve. Doubling the standard deviation multiplies the variance by four, from 11 to 44, because variance is measured in squared units.

Spread the mass out and the variance grows; shift the whole distribution and it hardly changes. Darker bars contribute more to E[(X−μ)2]\mathbb{E}[(X-\mu)^2].

Each part of E[(X−μ)2]\mathbb{E}[(X-\mu)^2] has a role. Centring at μ\mu makes the measure ignore location: adding a constant to XX moves μ\mu by the same amount, so Var⁡(a+X)=Var⁡(X)\operatorname{Var}(a+X)=\operatorname{Var}(X). Squaring makes deviations on both sides count as positive and weights large deviations heavily. The second formula in the definition, E[X2]−μ2\mathbb{E}[X^2]-\mu^2, is usually quicker: for a Bernoulli variable X2=XX^2=X, so E[X2]=p\mathbb{E}[X^2]=p and Var⁡(X)=p−p2=p(1−p)\operatorname{Var}(X)=p-p^2=p(1-p).

Scaling does not act linearly on variance: Var⁡(bX)=b2Var⁡(X)\operatorname{Var}(bX)=b^2\operatorname{Var}(X), while the standard deviation is multiplied by ∣b∣|b|, so −X-X has the same variance as XX. For independent variables the variances add, as on the page on sums of independent random variables, but the standard deviations do not. Dividing X−μX-\mu by the standard deviation gives a variable with mean 00 and variance 11, which returns later as standardization.


Key Results

  • Var⁡(a+bX)=b2Var⁡(X)\operatorname{Var}(a+bX)=b^2\operatorname{Var}(X).
  • Var⁡(X)=0\operatorname{Var}(X)=0 if and only if X=EXX=\mathbb{E}X almost surely, that is, P(X=EX)=1\mathbb{P}(X=\mathbb{E}X)=1.

Examples

  • For Bern⁡(0.3)\operatorname{Bern}(0.3), the variance is 0.3(0.7)=0.210.3(0.7)=0.21.
  • If Var⁡(X)=4\operatorname{Var}(X)=4, then Var⁡(5−3X)=36\operatorname{Var}(5-3X)=36 and its standard deviation is 66.

Prerequisites

Sources

Aliases: Var, SD, second central moment Keywords: variance, standard deviation Symbols: infinity, mu, sigma, square root

Last updated: 20 October 2026 19:41