Tutorials › Introduction to Statistics › Calculating Population Variance

Center, Spread and Position · Tutorial 157 of 996

Calculating Population Variance

Calculate a population’s variance from its values or a frequency table, and interpret what this squared-unit measure says about spread around the population mean.

Beginner 9 min read

What You'll Learn

  • Define population variance using deviations from the population mean
  • Calculate the mean, squared deviations, and variance from raw values
  • Calculate population variance from values with frequencies
  • Check a variance calculation using a sum-of-squares identity
  • Interpret variance as spread in squared units
  • Recognize why population variance divides by the population size

Why Measure Spread Around the Mean?

A list of values can have a meaningful center and still be spread out in different ways. For example, two groups might have the same average, while the members of one group are clustered near that average and the other group’s values are farther away. A measure of spread helps distinguish those patterns.

Population variance measures spread by looking at how far each population value is from the population mean, squaring those differences, and averaging them. Squaring ensures that negative and positive deviations do not cancel. The result is expressed in squared units, so variance is a measure of spread rather than a typical distance in the original units.

Definition: For a finite population of \(N\) quantitative values \(x_1,x_2,\ldots,x_N\), the population mean is \(\mu=\frac{1}{N}\sum_{i=1}^{N}x_i\). The population variance, denoted \(\sigma^2\), is the average of the squared deviations from that mean: $$ \sigma^2=\frac{1}{N}\sum_{i=1}^{N}(x_i-\mu)^2. $$ Here, \(N\) is the number of values in the entire population. Each population member contributes once to the average.

The calculation requires a clearly defined population: the values included must represent all the units whose spread you want to describe. The observations must be quantitative and measured on the same scale. Once the population is specified, the formula is a direct summary of those values; it does not require a random sample or a probability model.

Calculating Variance from Raw Values

A reliable hand calculation has three parts: find the population mean, find each value’s deviation from that mean and square it, then average the squared deviations by dividing their sum by \(N\). Keeping a table of the intermediate values reduces sign and arithmetic errors.

1
Find the population mean.
Add all \(N\) population values and divide by \(N\).
2
Calculate squared deviations.
For each value, subtract \(\mu\) and square the difference, \((x_i-\mu)^2\).
3
Average the squared deviations.
Add the squared deviations and divide by the population size \(N\).

Worked Example: Four Values in a Complete Population

Suppose a hypothetical population consists of the four daily order counts at a small shop during a particular four-day period: 2, 4, 4, and 6 orders. Find the population variance in orders squared.

The population size is \(N=4\). Its mean is

$$ \mu=\frac{2+4+4+6}{4}=\frac{16}{4}=4\text{ orders}. $$

The deviations and their squares are:

$$ \begin{aligned} 2-4&=-2, &(-2)^2&=4,\\ 4-4&=0, &(0)^2&=0,\\ 4-4&=0, &(0)^2&=0,\\ 6-4&=2, &(2)^2&=4. \end{aligned} $$

The squared deviations sum to \(4+0+0+4=8\). Divide by the four members of the population:

$$ \sigma^2=\frac{8}{4}=2\text{ orders}^2. $$

Thus, the variance of these four daily counts is \(2\) orders squared. This says that the average squared distance from the mean count of 4 orders is \(2\) orders squared. It does not say that a typical day is 2 orders from the mean; variance is in squared units.

Why Deviations Are Squared

If we simply averaged signed deviations from the mean, values below the mean would cancel values above it. In fact, those deviations always sum to zero for a finite population. Squaring instead makes every contribution nonnegative: a deviation of \(-3\) contributes \(9\), just as a deviation of \(+3\) does.

The variance is therefore never negative. It is zero only when every population value equals the mean, which means all the values are identical. If even one value differs from the mean, at least one squared deviation is positive, so the average of the squared deviations is positive.

Result: Population variance is nonnegative. It equals zero exactly when all values in the population are identical. Because each contribution is a squared deviation, observations farther from the mean can contribute substantially more than observations close to it.

The last point follows from squaring: a deviation of 4 contributes \(4^2=16\), while a deviation of 2 contributes \(2^2=4\). The first deviation contributes four times as much to the sum of squared deviations, not twice as much. This makes variance responsive to values far from the mean.

A Useful Check on the Arithmetic

There is an equivalent expression that can help check a calculation. It follows directly by expanding the squared deviations; it does not change the definition of variance.

Identity: For a finite population, $$ \sigma^2=\frac{1}{N}\sum_{i=1}^{N}x_i^2-\mu^2. $$

To derive the identity, start with the definition and expand each square. Then use \(\sum_{i=1}^{N}x_i=N\mu\), which follows from the definition of the population mean.

$$ \begin{aligned} \sigma^2 &=\frac{1}{N}\sum_{i=1}^{N}(x_i-\mu)^2\\ &=\frac{1}{N}\sum_{i=1}^{N}(x_i^2-2\mu x_i+\mu^2)\\ &=\frac{1}{N}\sum_{i=1}^{N}x_i^2 -\frac{2\mu}{N}\sum_{i=1}^{N}x_i +\frac{1}{N}\sum_{i=1}^{N}\mu^2\\ &=\frac{1}{N}\sum_{i=1}^{N}x_i^2 -\frac{2\mu}{N}(N\mu) +\frac{1}{N}(N\mu^2)\\ &=\frac{1}{N}\sum_{i=1}^{N}x_i^2-2\mu^2+\mu^2\\ &=\frac{1}{N}\sum_{i=1}^{N}x_i^2-\mu^2. \end{aligned} $$

The identity says to average the squared values and subtract the square of the mean. It can be convenient when the sum of squared values is easy to obtain, but for hand work the deviation table often makes the meaning of the calculation clearer. Either method should give the same variance.

Worked Example: Checking a Calculation with the Identity

Consider a hypothetical population consisting of five recorded waiting times, in minutes: 10, 12, 13, 15, and 20. Calculate its variance, then check the result using the identity.

First find the population mean:

$$ \mu=\frac{10+12+13+15+20}{5}=\frac{70}{5}=14\text{ minutes}. $$

The deviations from 14 are \(-4,-2,-1,1,6\), so their squares are \(16,4,1,1,36\). Their sum is \(58\), giving

$$ \sigma^2=\frac{16+4+1+1+36}{5} =\frac{58}{5} =11.6\text{ minutes}^2. $$

For the check, the squared values sum to \(10^2+12^2+13^2+15^2+20^2=100+144+169+225+400=1038\). Therefore,

$$ \sigma^2=\frac{1038}{5}-14^2=207.6-196=11.6\text{ minutes}^2. $$

The two calculations agree. The population variance is \(11.6\) minutes squared, describing the average squared deviation of these five waiting times from their mean of 14 minutes.

Using Frequencies Without Repeating Values

A population may be presented as distinct values and their frequencies rather than as a list with every member written out. A frequency is the number of population members having a particular value. Each value must contribute to the calculation as many times as its frequency indicates.

Worked Example: Population Variance from a Frequency Table

Suppose a hypothetical population of four packages has masses of 0 kg for one package, 2 kg for two packages, and 5 kg for one package. Find the population variance.

Mass \(x\) (kg)Frequency \(f\)Squared deviation from \(\mu\)Contribution \(f(x-\mu)^2\)
01\((0-2.25)^2=5.0625\)5.0625
22\((2-2.25)^2=0.0625\)0.1250
51\((5-2.25)^2=7.5625\)7.5625

The frequency total is \(N=1+2+1=4\). The mean, counting each mass according to its frequency, is

$$ \mu=\frac{1(0)+2(2)+1(5)}{4}=\frac{9}{4}=2.25\text{ kg}. $$

The last column totals \(5.0625+0.1250+7.5625=12.75\text{ kg}^2\). Thus,

$$ \sigma^2=\frac{12.75}{4}=3.1875\text{ kg}^2. $$

The two packages weighing 2 kg each both contribute a squared deviation of \(0.0625\text{ kg}^2\), so that contribution is counted twice. The variance is \(3.1875\text{ kg}^2\), the average squared deviation for all four packages.

Interpreting the Result and Avoiding Common Errors

Variance gives information about how dispersed the population is around its mean, but its units require care. If the original values are measured in minutes, the variance is in minutes squared; if they are measured in kilograms, the variance is in kilograms squared. These units arise because each deviation is squared before averaging. Do not describe a variance as a number of minutes or kilograms away from the mean.

A larger variance indicates a larger average squared deviation from the mean when the data are measured on the same scale. It does not, by itself, identify where the values occur, whether the distribution is symmetric, or how many values are close to the mean. To describe those features, use the data or appropriate graphs and summaries alongside the variance.

A common mistake is to divide the sum of squared deviations by \(N-1\) when the goal is to describe the variance of the complete population. The definition here is an average over all \(N\) population members, so the denominator is \(N\). Dividing by \(N-1\) concerns a different calculation: the variance from a sample. Another frequent error is to take the square root and report that as the variance. The formula for population variance ends with the average of squared deviations; taking a square root would produce a different spread summary.

Key takeaway: To calculate population variance, find \(\mu\), square each deviation \(x_i-\mu\), add those squared deviations, and divide by \(N\). The result, \(\sigma^2\), is nonnegative and is measured in the square of the original units.

Check Your Understanding

Use the definition and show enough arithmetic to make your reasoning clear.

  1. A complete population has values 3, 3, 7, and 7. Find its mean and population variance, including the variance’s units if the values are measured in centimetres.
  2. Why are deviations from the population mean squared before they are averaged?
  3. A complete population has \(N=6\) members and a sum of squared deviations of 45 seconds squared. What is its population variance, with units?
  4. A frequency table lists one value of 1, three values of 2, and one value of 6. How many population members are represented, and how should the value 2 enter the variance calculation?
  5. A learner says that a population variance of \(9\text{ kg}^2\) means observations are typically 9 kg from the mean. Identify the error and state what the units of the variance mean.