How to Calculate Variance From a Frequency Table Step by Step
A frequency table full of repeated values looks different from a simple list of numbers, and the usual variance formula can seem not to fit. It fits perfectly once you weight each value by how often it occurs. This guide works through a complete example.
What a Frequency Table Gives You
A frequency table lists each distinct value once, with the number of times it occurs. That is the same information as the full list, just written more compactly. The table below is equivalent to the ten values 5, 5, 5, 8, 8, 8, 8, 8, 10, 10.
| Value (x) | Frequency (f) |
|---|---|
| 5 | 3 |
| 8 | 5 |
| 10 | 2 |
Step 1: Total Frequency
Add the frequencies: N = 3 + 5 + 2 = 10. This is the number of observations, and it should match your sample or population size.
Step 2: Weighted Mean
Multiply each value by its frequency, add the products, and divide by N:
(5 × 3) + (8 × 5) + (10 × 2) = 15 + 40 + 20 = 75, and 75 / 10 = 7.5.
So the weighted mean is 7.5.
Step 3: Deviations and Weighted Squares
Each distinct value needs only one deviation, because every copy of that value has the same distance from the mean. Square it, then multiply by the frequency so each copy is counted:
| x | f | x − 7.5 | (x − 7.5)² | f × (x − 7.5)² |
|---|---|---|---|---|
| 5 | 3 | −2.5 | 6.25 | 18.75 |
| 8 | 5 | 0.5 | 0.25 | 1.25 |
| 10 | 2 | 2.5 | 6.25 | 12.5 |
| Total | 10 | 32.5 |
Skipping the multiplication by f is the most common mistake: it treats every value as if it appeared once.
Step 4: Divide
The frequency-weighted sum of squares is 32.5.
- Population variance: σ² = 32.5 / 10 = 3.25.
- Sample variance: s² = 32.5 / 9 ≈ 3.611.
You can check this by typing the ten individual values into the variance calculator: you will get the same figures.
Grouped Data (Class Intervals)
If the table gives ranges, such as 10–19 or 20–29, rather than exact values, use each interval’s midpoint as its value (14.5 and 24.5 for those two) and follow the same steps. The result is an approximation, because it assumes the values in each class are centred on the midpoint. It works reasonably well when the classes are narrow.
Why Frequency Tables Help
With thousands of observations but only a few distinct values, a frequency table cuts the work down to one row per distinct value. The method is identical; only the bookkeeping is shorter.
Summary
Find N, the weighted mean, and each distinct value’s squared deviation multiplied by its frequency. Add those, then divide by N for a population or N − 1 for a sample.