Concepts · 3 min read
Standard Deviation Explained With a Worked Example

The steps
- Find the mean.
- Subtract the mean from each value and square the result.
- Average those squares (÷ n for a population, ÷ n − 1 for a sample): this is the variance.
- Take the square root.
Full working for 2, 4, 4, 4, 5, 5, 7, 9
- Mode: 4
- Range: 7
- Sample SD: 2.1381
- Population SD: 2
Step-by-step working 7 steps
- 1Sort the data
2, 4, 4, 4, 5, 5, 7, 9
8 values.
- 2Mean = sum ÷ count
Sum = 40 Mean = 40 ÷ 8 = 5
- 3Median = middle value
Average of values 4 and 5: (4 + 5) ÷ 2 = 4.5
- 4Mode = most frequent value
4 (appears 3 times)
- 5Range = largest − smallest
9 − 2 = 7
- 6Squared deviations from the mean
(2 − 5)² = 9 (4 − 5)² = 1 (4 − 5)² = 1 (4 − 5)² = 1 (5 − 5)² = 0 (5 − 5)² = 0 (7 − 5)² = 4 (9 − 5)² = 16 Sum of squares = 32
Sum these for every value to get the total used below.
- 7Variance and standard deviation
Population: σ² = 32 ÷ 8 = 4, σ = 2 Sample: s² = 32 ÷ 7 = 4.5714, s = 2.1381
Use the sample version (÷ n−1) when your data is a sample from a larger group; use the population version when it is the whole group.
Sample versus population
Use ÷ n when your data is the whole group. Use ÷ (n − 1) when it is a sample from a larger group: a sample tends to understate spread, and dividing by n − 1 corrects for that.
The 68-95-99.7 rule
For roughly bell-shaped data, about 68% of values lie within 1 standard deviation of the mean, about 95% within 2 and about 99.7% within 3.
Compare two sets
Same mean, different spread — see the effect in mean vs median, or use the mean, median and mode calculator.
A tighter data set with the same mean
- Mode: 5
- Range: 2
- Sample SD: 0.8165
- Population SD: 0.7559
Step-by-step working 7 steps
- 1Sort the data
4, 4, 5, 5, 5, 6, 6
7 values.
- 2Mean = sum ÷ count
Sum = 35 Mean = 35 ÷ 7 = 5
- 3Median = middle value
Value 4 of 7 = 5
- 4Mode = most frequent value
5 (appears 3 times)
- 5Range = largest − smallest
6 − 4 = 2
- 6Squared deviations from the mean
(4 − 5)² = 1 (4 − 5)² = 1 (5 − 5)² = 0 (5 − 5)² = 0 (5 − 5)² = 0 (6 − 5)² = 1 (6 − 5)² = 1 Sum of squares = 4
Sum these for every value to get the total used below.
- 7Variance and standard deviation
Population: σ² = 4 ÷ 7 = 0.5714, σ = 0.7559 Sample: s² = 4 ÷ 6 = 0.6667, s = 0.8165
Use the sample version (÷ n−1) when your data is a sample from a larger group; use the population version when it is the whole group.
Frequently asked questions
Can standard deviation be negative?
No. It is a square root, so it is zero or positive; zero means every value is identical.
What is variance?
The standard deviation squared — the average squared distance from the mean.
Keep reading
Mean vs Median: When Averages Lie
How a single extreme value changes the mean but barely moves the median, with a worked data set and a simple rule for choosing which average to report.
ConceptsStatistics vs Probability: What Is the Difference?
Probability predicts data from a known model; statistics infers the model from data. A coin-flip example computed both ways.
ConceptsThe Monty Hall Problem Explained (Why Switching Wins 2/3)
The Monty Hall puzzle solved with a full enumeration table: why switching doors wins two times out of three and staying only one in three.
ConceptsThe Birthday Paradox: Why 23 People Is Enough
In a group of 23 people the chance two share a birthday is just over 50%. The full calculation and a table up to 70 people.