Standard deviation calculator
Paste your numbers (add frequencies if you have a table). You get both standard deviations, the one that divides by n and the one that divides by n − 1, with the working for each.
- n
- 8
- Mean
- 6.00
- σ (divide by n)
- 1.87
- s (divide by n − 1)
- 2.00
- Variance σ²
- 3.50
- Median
- 6.00
- Q1, Q3
- 4.50, 7.50
- IQR
- 3.00
Show the working
n = 8, Σx = 48.0, Σx² = 316
Mean x̄ = Σx ÷ n = 48.0 ÷ 8 = 6.00
Variance σ² = Σx² ÷ n − x̄² = 316 ÷ 8 − 6.00² = 3.50
σ = √3.50 = 1.87 (divide by n: the spread of these values)
s = √[Σ(x − x̄)² ÷ (n − 1)] = √(28.0 ÷ 7) = 2.00 (divide by n − 1: an estimate for the whole population)
Your calculator shows both: σx (or σn) is the first, sx (or sn−1) the second. Use the one the question asks for.
Answers are rounded to 3 significant figures, which is what IB papers ask for unless a question says otherwise.
How to do it by hand
- Find the mean: x̄ = Σx ÷ n (with a frequency table, Σfx ÷ Σf).
- Find the variance: σ² = Σx² ÷ n − x̄², or Σ(x − x̄)² ÷ n.
- Take the square root for σ. For an estimate of the population, divide by n − 1 instead: s = √[Σ(x − x̄)² ÷ (n − 1)].
Worked example
The number of goals scored in 20 matches is: 0 goals 3 times, 1 goal 6 times, 2 goals 5 times, 3 goals 4 times and 4 goals twice. Find the mean and standard deviation.
Solution
n = 20, Σx = 36.0, Σx² = 94.0
Mean x̄ = Σx ÷ n = 36.0 ÷ 20 = 1.80
Variance σ² = Σx² ÷ n − x̄² = 94.0 ÷ 20 − 1.80² = 1.46
σ = √1.46 = 1.21 (divide by n: the spread of these values)
s = √[Σ(x − x̄)² ÷ (n − 1)] = √(29.2 ÷ 19) = 1.24 (divide by n − 1: an estimate for the whole population)
Your calculator shows both: σx (or σn) is the first, sx (or sn−1) the second. Use the one the question asks for.
Answer: x̄ = 1.80, σ = 1.21, s = 1.24
Every number in this example is worked out by the same code as the tool above, and the code is tested against independent results from Python's SciPy library.
Where you need it
| AA SL | Mean, standard deviation, quartiles and outliers from a list or frequency table. |
|---|---|
| AA HL | As SL. |
| AI SL | As AA SL. |
| AI HL | As SL. |
On your calculator
In the exam you use your own calculator, so practise it too. Our guides give the exact keystrokes for the Casio fx-CG50, TI-Nspire CX II and TI-84 Plus CE, with a worked example to check against:
Common mistakes
- Mixing up σ and s. Most questions on a set of data want σ (divide by n); an unbiased estimate of a population variance needs n − 1.
- Forgetting the frequencies: with a table, n is the total frequency, not the number of rows.
- Using Σx² ÷ n − x̄ instead of − x̄²: the mean is squared.
- Leaving old data in the calculator's lists, which silently changes every answer.
Notes and practice
Questions students ask
What is the difference between σ and s?
σ divides by n and describes the spread of the values you have. s divides by n − 1 and is used to estimate the spread of the whole population from a sample. Calculators show both, usually labelled σx and sx.
How do I find the standard deviation from a frequency table?
Treat each value as appearing f times: n = Σf, the mean is Σfx ÷ Σf and the variance is Σfx² ÷ Σf − x̄². Type the values and the frequencies into the two boxes.
What happens to the standard deviation if I add a constant to every value?
Nothing: the spread is the same. Multiplying every value by k multiplies the standard deviation by |k| and the variance by k².