Formula sheet
Standard deviation (grouped)
Both forms σ = √(Σf(x−x̄)²/Σf) = √(Σfx²/Σf − x̄²) are given on the SPM formula sheet. You must know to find the mean and the grouped variance first, then take the square root, and to use the class midpoint as x for interval data.
What the symbols mean
- σ the standard deviation of the grouped data, in the data's unit
- f the frequency of each value or class
- x each value, or the midpoint of each class interval
- x̄ the mean of the grouped data
- Σf the total frequency (total number of data)
- Σfx² the sum of every frequency × value² (that is, Σ(f·x²))
Given in the exam, or memorise?
Both forms σ = √(Σf(x−x̄)²/Σf) = √(Σfx²/Σf − x̄²) are given on the SPM formula sheet. You must know to find the mean and the grouped variance first, then take the square root, and to use the class midpoint as x for interval data.
Why it works
It is the grouped variance with a square root on top, giving the spread back in the data's own unit.
- Find the grouped mean x̄ = Σfx / Σf.
- Find the grouped variance σ² = Σfx²/Σf − x̄² (or the long form).
- Take the square root to convert squared units back to the original unit.
- The result σ describes the typical spread of the grouped data about its mean.
Worked example 1
Grouped data has class midpoints x = 5, 15, 25, 35 with frequencies f = 2, 4, 3, 1. Find the standard deviation.
- Total frequency: Σf = 2 + 4 + 3 + 1 = 10; mean x̄ = Σfx/Σf = 180/10 = 18.
- Build Σfx²: (5²×2)+(15²×4)+(25²×3)+(35²×1) = 50+900+1875+1225 = 4050.
- Variance: σ² = Σfx²/Σf − x̄² = 4050/10 − 18² = 405 − 324 = 81.
- Square root: σ = √(Σfx²/Σf − x̄²) = √81.
Worked example 2
A frequency table has x = 1, 2, 3, 4, 5 with frequencies f = 1, 2, 3, 2, 1. Find the standard deviation to 2 decimal places.
- Total frequency: Σf = 1 + 2 + 3 + 2 + 1 = 9.
- Mean: Σfx = (1×1)+(2×2)+(3×3)+(4×2)+(5×1) = 1+4+9+8+5 = 27, so x̄ = 27/9 = 3.
- Build Σfx²: (1²×1)+(2²×2)+(3²×3)+(4²×2)+(5²×1) = 1+8+27+32+25 = 93.
- Variance then root: σ² = 93/9 − 3² = 10.333... − 9 = 1.333..., σ = √1.333...
Where students go wrong
- Stopping at the variance and forgetting the outer square root, σ needs the √.
- Using (Σfx²) wrongly, or leaving out Σf in the denominator before rooting.
- Rounding the mean or variance mid-way; keep full accuracy and round only the final σ.
Use it with
Source:SPM: Format Pentaksiran mulai 2021, Matematik (1449)
Frequently asked questions
Do I find the variance first, then square-root it?
Yes. The cleanest route is: find the mean, find the grouped variance σ² = Σfx²/Σf − x̄², then take σ = √(σ²).
Doing it in that order keeps the working tidy and lets you show the variance as an intermediate answer, which examiners can award marks for.
Which x do I square in Σfx² for grouped data?
For a class interval, use the class midpoint as x, then square it and multiply by the frequency f. For example, class 11–15 has midpoint 13, so its term is 13² × f.
For a simple frequency table the value itself is x. Never square the frequency.
Can I read variance and standard deviation straight from a calculator?
In statistics mode a scientific calculator can display σ directly after you key in each x with its frequency. That is a useful check, but SPM often awards method marks, so still show the mean, the Σfx² step and the formula.
Make sure the calculator uses the population σ, dividing by N.