Two classes can have the same average mark and still be very different: in one, everyone scores close to the mean, while in the other, marks are scattered from very low to very high. Variance and standard deviation measure exactly this spread. They are among the most important ideas in statistics, used everywhere from exam analysis to finance and physics experiments.
What Do Variance and Standard Deviation Measure?
Both quantities describe how far the data values are, on average, from the mean.
- A small standard deviation means the values cluster tightly around the mean.
- A large standard deviation means the values are widely spread out.
The idea is to look at each value's deviation from the mean, \( x - \bar{x} \). We cannot simply average these deviations, because positive and negative deviations always cancel to zero. Instead, we square them first.
The Formulas
Population Variance and Standard Deviation
When your data include the whole population, with mean \( \mu \) and size \( N \):
$$ \sigma^2 = \frac{\sum (x - \mu)^2}{N}, \qquad \sigma = \sqrt{\sigma^2} $$
Sample Variance and Standard Deviation
When your data are a sample used to estimate a larger population:
$$ s^2 = \frac{\sum (x - \bar{x})^2}{n - 1}, \qquad s = \sqrt{s^2} $$
Dividing by \( n - 1 \) instead of \( n \) (called Bessel's correction) compensates for the fact that a sample tends to underestimate the true spread. Always check which version your syllabus or question requires.
The Shortcut (Computational) Formula
For hand calculation, this equivalent population formula is often quicker:
$$ \sigma^2 = \frac{\sum x^2}{N} - \left(\frac{\sum x}{N}\right)^2 $$
In words: "the mean of the squares minus the square of the mean".
Why Standard Deviation Instead of Variance?
Variance is measured in squared units. If the data are in centimetres, the variance is in square centimetres, which is hard to interpret. Taking the square root brings the standard deviation back to the original units, so it can be compared directly with the mean.
Worked Example 1: Raw Data
Question: Find the population variance and standard deviation of
$$ 2,\; 4,\; 4,\; 4,\; 5,\; 5,\; 7,\; 9 $$
Then find the sample standard deviation.
Step 1: Find the mean.
$$ \sum x = 2 + 4 + 4 + 4 + 5 + 5 + 7 + 9 = 40, \qquad \mu = \frac{40}{8} = 5 $$
Step 2: Find each squared deviation.
- \( (2 - 5)^2 = 9 \)
- \( (4 - 5)^2 = 1 \), three times, giving 3
- \( (5 - 5)^2 = 0 \), twice, giving 0
- \( (7 - 5)^2 = 4 \)
- \( (9 - 5)^2 = 16 \)
Step 3: Add them.
$$ \sum (x - \mu)^2 = 9 + 3 + 0 + 4 + 16 = 32 $$
Step 4: Population variance and standard deviation.
$$ \sigma^2 = \frac{32}{8} = 4, \qquad \sigma = \sqrt{4} = 2 $$
Step 5: Sample version.
$$ s^2 = \frac{32}{8 - 1} = \frac{32}{7} \approx 4.571, \qquad s \approx 2.138 $$
Check with the shortcut formula. \( \sum x^2 = 4 + 16 + 16 + 16 + 25 + 25 + 49 + 81 = 232 \). Then \( \frac{232}{8} - 5^2 = 29 - 25 = 4 \). The answers agree.
Worked Example 2: Frequency Distribution
Question: The number of books read last month by 20 students is shown below. Find the mean and standard deviation (treat the data as a population).
| Books \( x \) | Frequency \( f \) | \( fx \) | \( fx^2 \) |
|---|---|---|---|
| 1 | 3 | 3 | 3 |
| 2 | 5 | 10 | 20 |
| 3 | 8 | 24 | 72 |
| 4 | 4 | 16 | 64 |
Step 1: Totals.
$$ \sum f = 20, \qquad \sum fx = 53, \qquad \sum fx^2 = 159 $$
Step 2: Mean.
$$ \mu = \frac{53}{20} = 2.65 $$
Step 3: Variance using the shortcut formula.
$$ \sigma^2 = \frac{\sum fx^2}{\sum f} - \mu^2 = \frac{159}{20} - 2.65^2 = 7.95 - 7.0225 = 0.9275 $$
Step 4: Standard deviation.
$$ \sigma = \sqrt{0.9275} \approx 0.963 $$
So students read about 2.65 books on average, and a typical student is within roughly one book of that figure.
Useful Properties
- Adding a constant \( k \) to every value shifts the mean by \( k \) but leaves the standard deviation unchanged.
- Multiplying every value by \( k \) multiplies the standard deviation by \( |k| \) and the variance by \( k^2 \).
- The standard deviation is zero only when all values are identical.
- For roughly bell-shaped data, about 68% of values lie within one standard deviation of the mean and about 95% within two.
For instance, if every student in Example 2 read two extra books, the mean would become 4.65 but \( \sigma \) would stay 0.963.
Common Mistakes
- Forgetting to square the deviations, or squaring the sum instead of summing the squares.
- Mixing up \( n \) and \( n - 1 \). Use \( n - 1 \) for samples unless told otherwise.
- Forgetting the square root and reporting the variance as the standard deviation.
- Rounding the mean too early. Keep full accuracy until the final step, especially with the shortcut formula.
- Using \( \sum x^2 \) instead of \( \sum fx^2 \) for frequency data.
Tips
- Use the deviation method for small, neat data sets and the shortcut method for frequency tables.
- Most scientific calculators have a statistics mode that gives both \( \sigma_x \) and \( s_x \); learn which is which on your model.
- Always ask whether your answer is sensible: the standard deviation cannot be negative and is usually smaller than the range.
Key Takeaways
- Variance is the average squared distance from the mean; standard deviation is its square root.
- Standard deviation is in the same units as the data, which makes it easier to interpret.
- Use \( N \) for a population and \( n - 1 \) for a sample.
- Shifting data does not change the spread; scaling data scales the standard deviation.
Struggling with statistics questions or a data analysis assignment? Send them to Amathify on WhatsApp or through the "Ask a Question" form, and our experts and PhD scholars will provide clear, step-by-step solutions.
Stuck on a problem or assignment?
Our experts and PhD scholars solve maths, physics and chemistry — step by step.