Uni-Sine
MathematicsStatistics

The standard deviation formula for A-level Maths

The standard deviation formula A-level Maths uses is σ = √(Σ(x − x̄)² ÷ n) = √(Σx² ÷ n − x̄²): the square root of the mean of the squares minus the square of the mean. In Edexcel's notation, σ = √(Sxx ÷ n), where Sxx = Σ(x − x̄)² = Σx² − (Σx)² ÷ n. The variance is σ², the same thing without the square root. For example, the data 4, 7, 8, 10, 11 has mean 8 and standard deviation √6 ≈ 2.45.

The standard deviation formulas

\sigma = \sqrt{\frac{\Sigma(x - \bar{x})^2}{n}} = \sqrt{\frac{\Sigma x^2}{n} - \bar{x}^2}The definition, and the version for calculations
SymbolMeaning
σStandard deviation (σ² is the variance)
xEach data value
x̄The mean, Σx ÷ n
nThe number of values
Σx²The sum of the squares of the values

The first form says what standard deviation means: the typical distance of the data from the mean. The second form gives the same answer and is much quicker when you have Σx and Σx² rather than the raw data. AQA's A-level formulae booklet gives both.

S<sub>xx</sub> notation

Pearson Edexcel's A-level specification expects students to use the statistic Sxx:

S_{xx} = \Sigma(x - \bar{x})^2 = \Sigma x^2 - \frac{(\Sigma x)^2}{n}

and says that standard deviation = √(Sxx ÷ n), or an equivalent, is expected, while √(Sxx ÷ (n − 1)), the version used on spreadsheets, will be accepted. So in the exam either is fine, but √(Sxx ÷ n) is the standard one.

For a frequency table

When each value x appears f times, weight every sum by f:

\sigma = \sqrt{\frac{\Sigma fx^2}{\Sigma f} - \left(\frac{\Sigma fx}{\Sigma f}\right)^2}

For grouped data, use the class midpoints as x. The answer is then an estimate, because the exact values are not known.

Standard deviation worked examples

Example 1: raw data

Find the standard deviation of 4, 7, 8, 10, 11.

The mean is 40 ÷ 5 = 8. The deviations from the mean are −4, −1, 0, 2, 3, and their squares are 16, 1, 0, 4, 9, which add to 30.

\sigma = \sqrt{\frac{30}{5}} = \sqrt{6} = 2.45

Check with the other form: Σx² = 16 + 49 + 64 + 100 + 121 = 350, so σ = √(350 ÷ 5 − 8²) = √(70 − 64) = √6. Same answer.

Example 2: from summary statistics

For 20 values, Σx = 340 and Σx² = 6100. Find the mean and standard deviation.

The mean is 340 ÷ 20 = 17.

S_{xx} = 6100 - \frac{340^2}{20} = 6100 - 5780 = 320
\sigma = \sqrt{\frac{320}{20}} = \sqrt{16} = 4

Using n − 1 instead would give √(320 ÷ 19) = 4.10, which Edexcel would also accept.

Example 3: a frequency table

The number of goals scored in 20 matches is shown below. Find the mean and standard deviation.

Goals, x1234
Frequency, f3584

Σf = 20, Σfx = 3 + 10 + 24 + 16 = 53 and Σfx² = 3 + 20 + 72 + 64 = 159.

\bar{x} = \frac{53}{20} = 2.65, \quad \sigma = \sqrt{\frac{159}{20} - 2.65^2} = \sqrt{0.9275} = 0.963

Here is a quick check before coding.

practice
Pick an answer, then check it.
For 10 values, Σx = 60 and Σx² = 500. What is the standard deviation?

Coding

Pearson Edexcel's specification includes understanding and use of coding. Coding means changing every value with a rule such as y = (x − a) ÷ b, usually to make the numbers smaller. Its effect on the statistics:

Change to the dataEffect on the meanEffect on the standard deviation
Add or subtract aAdds or subtracts aNo change
Multiply or divide by bMultiplies or divides by bMultiplies or divides by b

Adding a constant slides all the data along without spreading it out, so the standard deviation is unchanged. Scaling the data scales the spread too.

Example 4: undoing a code

Data is coded with y = (x − 100) ÷ 5. The coded data has mean 2.4 and standard deviation 1.6. Find the mean and standard deviation of x.

Rearrange: x = 5y + 100. So x̄ = 5 × 2.4 + 100 = 112, and σx = 5 × 1.6 = 8. The + 100 affects the mean but not the standard deviation.

Standard deviation and outliers

A common rule says a value more than 3 standard deviations away from the mean is an outlier. Edexcel's specification says any rule needed to identify outliers will be given in the question, and gives this as an example alongside Q₁ − 1.5 × IQR and Q₃ + 1.5 × IQR.

Example 5: spotting an outlier

For the data in Example 2, with mean 17 and standard deviation 4, the limits are 17 − 3 × 4 = 5 and 17 + 3 × 4 = 29. A value of 31 would count as an outlier under this rule; a value of 28 would not.

The Standard Deviation Calculator finds the standard deviation and variance of raw data or a frequency table, shows both the n and n − 1 versions, and lists every step. Our standard deviation calculator guide explains the difference between sample and population standard deviation in more detail.

Try it

Standard Deviation Calculator

Find the standard deviation and variance of any data set

Go to its page

Using your calculator

Most scientific calculators work out σ directly in statistics mode. Enter the data, or the values and frequencies, then read off σx (the n version) and sx (the n − 1 version). In the exam, write down the summary statistics or the method as well as the answer: if the final value is wrong, the working can still earn marks.

Common mistakes

  • Forgetting the square root. Σx² ÷ n − x̄² is the variance. Take the square root for σ.
  • Confusing Σx² with (Σx)². Σx² squares each value then adds; (Σx)² adds then squares.
  • Dividing by Σx instead of n in a frequency table. Divide by Σf, the total frequency.
  • Adding the coding constant to the standard deviation. Adding or subtracting changes only the mean.
  • Rounding the mean too early. Squaring a rounded mean can noticeably change the variance.

Standard deviation questions with answers

1. Find the standard deviation of 2, 4, 4, 6.
Mean = 4. Squared deviations: 4, 0, 0, 4, total 8.
σ = √(8 ÷ 4) = √2 = 1.41
2. For 15 values, Σx = 120 and Σx² = 1200. Find S<sub>xx</sub> and σ.
Sxx = 1200 − 120² ÷ 15 = 1200 − 960 = 240.
σ = √(240 ÷ 15) = 4
3. A set of data has variance 6.25. What is its standard deviation?
σ = √6.25 = 2.5
4. Every value in a data set is increased by 7. What happens to the mean and the standard deviation?
The mean increases by 7; the standard deviation does not change.
5. Coded data y = (x − 20) ÷ 2 has standard deviation 3. Find the standard deviation of x.
σx = 2 × 3 = 6

Practise statistics in a short timed paper

A-level Maths: Statistics gives you a short timed paper every day, with 8 questions worth 25 to 35 marks across the course, so standard deviation turns up regularly but not in every paper.

Paper resets in

Common questions

What is the standard deviation formula for A-level Maths?
σ = √(Σx² ÷ n − x̄²), or in Sxx notation, σ = √(Sxx ÷ n) with Sxx = Σx² − (Σx)² ÷ n.
Do you divide by n or n − 1 in A-level Maths?
n is the standard. Pearson Edexcel's specification says √(Sxx ÷ n) is expected but √(Sxx ÷ (n − 1)) will be accepted.
Is the standard deviation formula in the formula booklet?
In AQA's AS and A-level formulae booklet, yes, in both forms. Check your own board's booklet.
What is S<sub>xx</sub>?
Σ(x − x̄)²: find each value's distance from the mean, square it, and add them all up. It equals Σx² − (Σx)² ÷ n.
What does standard deviation measure?
How spread out the data is around the mean. A small standard deviation means the values are bunched close to the mean; a large one means they are spread out.
How does coding affect standard deviation?
Adding or subtracting a constant does not change it. Multiplying or dividing by a constant multiplies or divides it by the same amount.

Revision cards

Say the answer first, then flip the card to check it.

Where to go next

  • Solve it

    Standard Deviation Calculator

    Find the standard deviation and variance of any data set

    Open the tool
  • Test it

    A-level Maths: Statistics

    A new exam-style paper every day, with instant marking and a mark scheme

    Start today's paper
Read next
Maths · StatisticsStandard deviation calculator: sample and populationFind the sample or population standard deviation of raw data, a frequency table or grouped data, with the full working table and worked examples.