Canadian flagMath101 · Independent Ontario learning libraryCreated and edited by Kamran
Probability and StatisticsGrades 9–123 min read

Variance

Variance measures average squared distance from the mean and forms the foundation of standard deviation.

Cheat sheet
Variance is small when values cluster around their mean and large when they spread far from it.

Why ordinary deviations do not work

For data values $x_i$ with mean $\bar x$, the deviations $x_i-\bar x$ always sum to zero. Positive and negative distances cancel, so their ordinary average cannot measure spread.

Squaring the deviations makes them nonnegative and gives greater weight to values farther from the mean.

Population variance

For a complete population of $N$ values with population mean $\mu$,

$$ \sigma^2=\frac{\sum_{i=1}^{N}(x_i-\mu)^2}{N}. $$

The symbol $\sigma^2$ is population variance. Divide by the population size because every member is included.

Sample variance

For a sample of $n$ observations used to estimate population spread,

$$ s^2=\frac{\sum_{i=1}^{n}(x_i-\bar x)^2}{n-1}. $$

Dividing by $n-1$ corrects for the fact that the sample mean was estimated from the same data. This is Bessel's correction.

Worked example

If the same values were a sample, the sample variance would be $8/3$.

Calculation table

A table with columns $x_i$, $x_i-\bar x$, and $(x_i-\bar x)^2$ keeps the process organized. For frequency data, multiply each squared deviation by its frequency before summing.

Technology is useful, but select population or sample statistics consistently with the study design.

Variance of a random variable

For a discrete random variable with mean $\mu$,

$$ \operatorname{Var}(X)=\sum_x(x-\mu)^2P(X=x). $$

An equivalent computational identity is

$$ \operatorname{Var}(X)=E[X^2]-[E[X]]^2. $$

Probabilities act as weights rather than equal frequencies.

Units

Variance has squared units. If observations are measured in centimetres, variance is in square centimetres. This makes variance algebraically convenient but less intuitive for direct interpretation.

Standard deviation takes the square root and returns to the original units.

Effect of transformations

If $Y=aX+b$, then

$$ \operatorname{Var}(Y)=a^2\operatorname{Var}(X). $$

Adding $b$ shifts every value and the mean equally, so spread does not change. Multiplying by $a$ scales deviations by $a$ and squared deviations by $a^2$.

Sensitivity to outliers

Because deviations are squared, extreme values can strongly increase variance. This is appropriate when large deviations matter, but it also makes variance non-robust.

For highly skewed data or strong outliers, report resistant measures such as interquartile range alongside or instead of variance-based summaries.

Comparing groups

Variance can compare spread only when units and contexts are compatible. A larger variance may reflect a larger measurement scale rather than greater relative variability.

The coefficient of variation or standardized measures can help compare positive-valued datasets with different means or units.

Common mistakes

Averaging unsquared deviations. They cancel to zero.

Using $n$ instead of $n-1$ for an estimating sample. Identify population versus sample.

Forgetting frequency weights. Repeated values contribute repeatedly.

Reporting variance in original units. Its units are squared.

Assuming large variance identifies why values differ. It measures spread, not cause.

Quick self-check

  • Is the dataset a full population or a sample estimate?
  • Is the correct mean used in every deviation?
  • Have deviations been squared and frequencies included?
  • Is the denominator $N$ or $n-1$ for the intended purpose?
  • Are squared units reported?
  • Could outliers or scale make another spread measure useful too?

Explore the idea

Probability sampler

Change one quantity at a time and connect what moves to Variance.

Works offline

success other outcome

What the model is showing Static example: with probability 0.50 over 20 trials, the expected count is 10 and the binomial variance is 5. A single observed count can differ.
Check your understanding

Try it yourself

Hints are part of learning. Open one whenever it makes the next step feel possible.

1 practice question
Question 1Calculate population variance · Gentle

Treat 2, 4, 4, and 6 as a population. Find the population variance.

End of lesson

Nice work making it this far.

Understanding grows through return visits. Save this lesson, try the practice, or continue when you are ready.

Lesson complete

That one is yours now.

Variance is saved to My Learning. Take the win—you earned it.

1Your Math101 collectionlesson completed
Search 464 published lessons, 123 answer guides, courses, and learning tools.
Your experience

Settings

Ontario math tutoringWork with KamranBook ↗