Introduction
Standard deviation measures how far, on average, individual values in a dataset tend to be from the mean. It is calculated by finding each value's deviation from the mean, squaring those deviations so that negative and positive differences don't cancel out, averaging the squared deviations to get the variance, and then taking the square root of the variance to return to the original units. A small standard deviation means values cluster tightly around the mean, while a large standard deviation means values are spread widely.
Cricket analogy: A batter whose scores cluster tightly around their average of 40 has a small standard deviation, while one who swings between 0 and 150 around the same average of 40 has a large standard deviation, capturing how consistently they actually perform innings to innings.
Explanation
Standard deviation comes in two closely related forms. Population standard deviation divides the sum of squared deviations by the total count of values, appropriate when the dataset represents every member of the group being studied. Sample standard deviation instead divides by the count minus one, a correction that compensates for the tendency of a sample to slightly underestimate the true spread of the larger population it was drawn from. Squaring the deviations before averaging is what allows values above and below the mean to both contribute positively to the measure of spread, rather than canceling each other out.
Cricket analogy: Measuring the spread of every player in an entire league's runs uses one divisor, but measuring the spread from just a sampled squad of fifteen players uses count-minus-one instead, correcting for how a small sample tends to understate the league's true spread.
Example
import statistics
group_a = [38, 40, 41, 39, 42]
group_b = [10, 70, 20, 60, 40]
print('mean A:', statistics.mean(group_a), 'stdev A:', statistics.stdev(group_a))
print('mean B:', statistics.mean(group_b), 'stdev B:', statistics.stdev(group_b))Analysis
Computing the standard deviation of two groups with similar means but different standard deviations shows immediately which group is more predictable: the group with the smaller standard deviation is the one where a randomly picked value is more likely to land close to the average, while the group with the larger standard deviation carries a wider range of realistic outcomes even though its typical value looks the same on paper.
Cricket analogy: Two batters can carry the same season average, but the one with the smaller standard deviation is the safer bet to score near that average any given innings, while the one with the larger standard deviation might swing between a duck and a century.
Key Takeaways
- Standard deviation measures how far, on average, values in a dataset tend to be from the mean.
- A small standard deviation means tight clustering around the mean; a large one means wide spread.
- Population standard deviation divides by the count; sample standard deviation divides by count minus one to correct for underestimation.
- Squaring deviations before averaging prevents positive and negative differences from canceling out.
- Two groups can share the same mean yet differ greatly in predictability once their standard deviations are compared.
Practice what you learned
1. What does standard deviation measure?
2. Why are deviations squared before being averaged when computing standard deviation?
3. When should sample standard deviation, which divides by count minus one, be used instead of population standard deviation?
Was this page helpful?
You May Also Like
Descriptive Statistics
An overview of descriptive statistics, the measures of central tendency and spread used to summarize a dataset's key numerical patterns.
Mean, Median, Mode
A comparison of the mean, median, and mode as measures of central tendency, and why the mean is more sensitive to outliers than the other two.
Data Visualization Basics
An introduction to choosing chart types for data analysis and avoiding common visual distortions like truncated axes.