Mathematics.

moment based statistics

Variance of a Random Variable

Probability25 minDifficulty3 out of 10

You should know: expectation

Overview

The variance of a random variable X measures how spread out its values are around its expected value. It is defined as the expected value of the squared deviation from the mean, Var(X) = E[(X − μ)²], where μ = E[X]. An equivalent and often more convenient computational form is Var(X) = E[X²] − (E[X])². Variance is always nonnegative, and it is zero exactly when X is constant (almost surely). Its square root, the standard deviation σ = √Var(X), expresses spread in the same units as X itself, which is why it is often reported alongside the mean.

Intuition

Think of variance as the average 'squared distance' between where a random variable actually lands and where it lands on average. Squaring the deviations does two things: it makes every deviation nonnegative (so they can't cancel out), and it penalizes large deviations more than small ones. A distribution tightly clustered around its mean has small variance; a distribution with wide swings has large variance. Squaring changes the units (dollars become dollars-squared), which is why we usually take the square root at the end to get the standard deviation back into the original units.

Formal Definition

Definition

For a random variable X with mean μ = E[X], the variance is:

Var(X)=E ⁣[(Xμ)2]\operatorname{Var}(X) = E\!\left[(X-\mu)^2\right]
Definition
Var(X)=E[X2](E[X])2\operatorname{Var}(X) = E[X^2] - (E[X])^2
Computational (shortcut) formula
Var(aX+b)=a2Var(X)\operatorname{Var}(aX+b) = a^2\operatorname{Var}(X)
Effect of a linear transformation
σ=Var(X)\sigma = \sqrt{\operatorname{Var}(X)}
Standard deviation

Worked Examples

  1. First find the mean.

    E[X]=1+2+3+4+5+66=3.5E[X] = \frac{1+2+3+4+5+6}{6} = 3.5
  2. Find E[X^2] by averaging the squares of the outcomes.

    E[X2]=1+4+9+16+25+366=916E[X^2] = \frac{1+4+9+16+25+36}{6} = \frac{91}{6}
  3. Apply the shortcut formula.

    Var(X)=9163.52=91612.25=3512\operatorname{Var}(X) = \frac{91}{6} - 3.5^2 = \frac{91}{6} - 12.25 = \frac{35}{12}

Answer: Var(X) = 35/12 ≈ 2.917.

Practice Problems

Difficulty 3/10

X takes value 1 with probability 0.5 and value 3 with probability 0.5. Find Var(X).

Difficulty 4/10

If Var(X) = 4, find Var(3X + 5).

Difficulty 5/10

A factory's daily output (in units) has mean 100 and variance 25. What is the standard deviation, and roughly what range covers most days (mean ± 2 standard deviations)?

Quiz

The computational (shortcut) formula for variance is:
If Var(X) = 9, what is Var(2X)?
Variance is zero exactly when:

Summary

  • Var(X) = E[(X−μ)²] = E[X²] − (E[X])² measures the average squared deviation from the mean.
  • Standard deviation σ = √Var(X) restores the original units.
  • Variance scales quadratically under linear transformations: Var(aX+b) = a²Var(X).

References