Variance and Standard Deviation
x

Revision notes for Edexcel AS Level Maths Variance and Standard Deviation. Open the guide for explanations and worked examples. Written against the Edexcel AS Level Maths (8MA0) specification, so the content matches what's examinable rather than general Maths background.

Variance and Standard Deviation

What you'll learn

  • What variance and standard deviation measure, and why they are useful.
  • How to calculate standard deviation from raw data using sums.
  • How to estimate standard deviation from grouped data using midpoints.
  • How coding affects the mean, median, variance and standard deviation.

1. Why do we need a measure of spread?

A measure of location tells you where the data is centred. The most common one here is the mean, found by adding all the values and dividing by how many values there are.

A measure of spread tells you how far the values tend to be from the centre. Two data sets can have the same mean but feel very different if one is tightly clustered and the other is spread out.

Two dot plots with the same mean but different spread

Definition

Mean

For values of a variable xxx, the mean is written as xˉ\bar{x}xˉ. If there are nnn values, then

xˉ=∑xn\bar{x}=\frac{\sum x}{n}xˉ=n∑x​

The symbol ∑x\sum x∑x means “add all the values of xxx”.

Example

Same mean, different spread

The two data sets below both have three values:

  • Set A: 4, 5, 6
  • Set B: 1, 5, 9
  1. Find the mean of Set A.

    xˉ=4+5+63=5\bar{x}=\frac{4+5+6}{3}=5xˉ=34+5+6​=5
  2. Find the mean of Set B.

    xˉ=1+5+93=5\bar{x}=\frac{1+5+9}{3}=5xˉ=31+5+9​=5
  3. Compare the spread. Set A is close to 5, but Set B has values much further from 5, so Set B has the larger spread.

Key Idea

The big idea

Standard deviation measures the typical distance of the data values from the mean. A larger standard deviation means the data is more spread out.

2. Deviations, variance and standard deviation

A deviation is the signed distance of a value from the mean. For a value xxx, its deviation is x−xˉx-\bar{x}x−xˉ.

A number line showing positive and negative deviations measured from the mean.

There is a problem: the deviations always add to zero. Values above the mean cancel values below the mean. To avoid this, we square the deviations.

Signed deviations below and above the mean cancel, which is why squared deviations are used for variance.

Definition

Variance and standard deviation

The variance is the mean of the squared deviations:

s2=∑(x−xˉ)2ns^2=\frac{\sum (x-\bar{x})^2}{n}s2=n∑(x−xˉ)2​

The standard deviation is the square root of the variance:

s=∑(x−xˉ)2ns=\sqrt{\frac{\sum (x-\bar{x})^2}{n}}s=n∑(x−xˉ)2​​

Because variance uses squared deviations, its units are squared. For example, if heights are measured in cm, variance is in cm². Standard deviation is usually easier to interpret because it is back in the original units.

The efficient formula

In AS-Level questions, it is usually quicker to use:

s2=∑x2n−xˉ2s^2=\frac{\sum x^2}{n}-\bar{x}^2s2=n∑x2​−xˉ2

Then take the square root to find sss.

Common Mistake

Forgetting the square root

The formula ∑x2n−xˉ2\frac{\sum x^2}{n}-\bar{x}^2n∑x2​−xˉ2 gives the variance. To get the standard deviation, you must square root your answer.

Example

Raw data: running times

Six athletes ran a race in the following times, in seconds:

A dot plot of the athletes’ race times showing the mean and the spread around it.

45.2, 46.8, 46.0, 46.3, 45.5, 45.0

Find the mean and standard deviation.

  1. Let xxx be the time in seconds. Find nnn, ∑x\sum x∑x and ∑x2\sum x^2∑x2.

    n=6,∑x=274.8,∑x2=12588.22n=6,\qquad \sum x=274.8,\qquad \sum x^2=12588.22n=6,∑x=274.8,∑x2=12588.22
  2. Calculate the mean.

    xˉ=274.86=45.8\bar{x}=\frac{274.8}{6}=45.8xˉ=6274.8​=45.8
  3. Use the variance formula.

    s2=12588.226−45.82=0.396666…s^2=\frac{12588.22}{6}-45.8^2=0.396666\ldotss2=612588.22​−45.82=0.396666…
  4. Square root the variance to find the standard deviation.

    s=0.396666…=0.630s=\sqrt{0.396666\ldots}=0.630s=0.396666…​=0.630
  5. Give the answer to 3 significant figures: the standard deviation is 0.630 seconds.

Tip

Calculator check

Your calculator’s statistics mode is excellent for checking answers, but still write down key working such as ∑x\sum x∑x, ∑x2\sum x^2∑x2, the mean and the formula substitution.

3. Estimating standard deviation from grouped data

Sometimes data is given in class intervals, such as 140 < height ≤ 150. A frequency tells you how many values are in each class.

When the original values are not listed, you estimate using the midpoint of each class.

Definition

Midpoint

The midpoint of a class interval is the value halfway between the lower and upper class boundaries. For example, the midpoint of 140 < h ≤ 150 is 145.

The midpoint of a class interval lies halfway between its two class boundaries.

For grouped data, use:

xˉ=∑fx∑f\bar{x}=\frac{\sum fx}{\sum f}xˉ=∑f∑fx​

and

s2=∑fx2∑f−xˉ2s^2=\frac{\sum fx^2}{\sum f}-\bar{x}^2s2=∑f∑fx2​−xˉ2

Here, fff is the frequency and xxx is the class midpoint.

Example

Grouped data: plant heights

A gardener records the heights of 50 plants.

A frequency histogram-style sketch showing how grouped plant heights are represented by class intervals and midpoints.

Height class in cmFrequencyMidpoint
120 < h ≤ 1305125
130 < h ≤ 1408135
140 < h ≤ 15017145
150 < h ≤ 16014155
160 < h ≤ 1806170

Estimate the mean and standard deviation.

  1. Use the midpoints to calculate the totals.

    ∑f=50,∑fx=7360,∑fx2=1091100\sum f=50,\qquad \sum fx=7360,\qquad \sum fx^2=1091100∑f=50,∑fx=7360,∑fx2=1091100
  2. Estimate the mean.

    xˉ=736050=147.2\bar{x}=\frac{7360}{50}=147.2xˉ=507360​=147.2
  3. Estimate the variance.

    s2=109110050−147.22=154.16s^2=\frac{1091100}{50}-147.2^2=154.16s2=501091100​−147.22=154.16
  4. Square root to estimate the standard deviation.

    s=154.16=12.4s=\sqrt{154.16}=12.4s=154.16​=12.4
  5. The estimated standard deviation is 12.4 cm to 3 significant figures.

Common Mistake

Using the class end instead of the midpoint

For a class such as 160 < h ≤ 180, use midpoint 170. Do not use 160 or 180 in the standard deviation formula.

If data is given to the nearest unit, such as distances 10–19 miles, think of the class as running from 9.5 to 19.5. The midpoint is still 14.5.

For rounded data, the true class boundaries extend half a unit beyond the stated whole-number limits.

4. Standard deviation with coded data

A coded variable is a transformed version of the original variable. Coding is often used to make numbers smaller and easier to handle.

For example:

x=t−123x=\frac{t-12}{3}x=3t−12​

This means the coded value is xxx, and the original value is ttt. Rearranging gives:

t=3x+12t=3x+12t=3x+12

Adding or subtracting changes location, but not spread. Multiplying changes spread.

Shifting a data set moves all values together, while multiplying stretches the distances from the centre.

Key Idea

Effect of coding

If T=a+bXT=a+bXT=a+bX, then:

Coding transforms location by adding a and scales spread by the factor |b|.

  • the mean and median are transformed using the same formula;
  • the standard deviation is multiplied by ∣b∣|b|∣b∣;
  • the variance is multiplied by b2b^2b2.
Example

Coded journey times

The coded journey times, xxx, for 50 people are summarised below.

Coded timeFrequency
0 < x ≤ 52
5 < x ≤ 108
10 < x ≤ 1516
15 < x ≤ 2518
25 < x ≤ 406

The coding used is:

x=t−123x=\frac{t-12}{3}x=3t−12​

Estimate the median and standard deviation of the original journey times, ttt.

  1. First estimate the median of the coded times. The 25th value lies in the class 10 < x ≤ 15, because the cumulative frequencies are 2, 10, 26, 44, 50.

    median of x=10+25−1016×5=14.6875\text{median of }x=10+\frac{25-10}{16}\times 5=14.6875median of x=10+1625−10​×5=14.6875
  2. Use midpoints to estimate the standard deviation of xxx.

    ∑f=50,∑fx=820,∑fx2=16500\sum f=50,\qquad \sum fx=820,\qquad \sum fx^2=16500∑f=50,∑fx=820,∑fx2=16500
  3. Find the mean and standard deviation of xxx.

    xˉ=82050=16.4,sx=1650050−16.42=7.81\bar{x}=\frac{820}{50}=16.4,\qquad s_x=\sqrt{\frac{16500}{50}-16.4^2}=7.81xˉ=50820​=16.4,sx​=5016500​−16.42​=7.81
  4. Rearrange the coding formula.

    t=3x+12t=3x+12t=3x+12
  5. Transform the median.

    median of t=3(14.6875)+12=56.1\text{median of }t=3(14.6875)+12=56.1median of t=3(14.6875)+12=56.1
  6. Transform the standard deviation by multiplying by 3 only.

    st=3(7.812…)=23.4s_t=3(7.812\ldots)=23.4st​=3(7.812…)=23.4
Common Mistake

Adding the shift to the standard deviation

If t=3x+12t=3x+12t=3x+12, the +12 moves every value by the same amount, so it does not increase spread. Multiply the standard deviation by 3 only.

Exam technique

In the exam

  1. For raw data, write down nnn, ∑x\sum x∑x and ∑x2\sum x^2∑x2, then use s2=∑x2n−xˉ2s^2=\frac{\sum x^2}{n}-\bar{x}^2s2=n∑x2​−xˉ2.

  2. For grouped data, use class midpoints and remember your answer is an estimate.

  3. For coded data, rearrange the coding formula before converting the median or standard deviation; do not add the shift to the standard deviation.

Self review

Check yourself

  • Why do we square deviations when finding variance?
  • In grouped data, why do we use midpoints rather than class boundaries?
  • If t=2x+20t=2x+20t=2x+20 and the standard deviation of xxx is 4.6, what happens to the standard deviation of ttt?

Recap questions

Test yourself with 5 quick questions on this guide. Answer them all correctly to complete it.

You've reached the end

Test yourself on this topic, or move on to the next guide.

FlashcardsSelf-test with active recall
Box PlotsUp next

How was this guide?

Variance and Standard Deviation Revision Guide

  1. AS Level
  2. /Maths
  3. /Variance and Standard Deviation