Dispersion & cumulative frequency · Lesson 1 of 2

Range, quartiles and standard deviation

How spread out data is: the range and interquartile range, the mean deviation, and the variance and standard deviation, from a list and from a frequency table.

26 minYou should already know: Statistics: data & averages
  1. 1
  2. 2

Two classes can have the same mean mark and still be very different: in one, everyone scored close to the mean; in the other, some scored very high and some very low. An average says where the data is centred. A measure of spread (or dispersion) says how far the values are scattered around it. You’ll need the mean and median for all of them.

Try it

How spread out is the data?Drag the dots
01234567891011121314151617181920mean 10211000112
10mean4range0.89mean deviation, Σ|x − x̄| ÷ n1.15standard deviation, √(Σ(x − x̄)² ÷ n)
Under the axis, each line is one value's distance from the mean. Added with their signs (left negative, right positive) they always come to 0, which is why the mean deviation uses their sizes: they add up to 8, so the average distance is 8 ÷ 9 = 0.89.

Start with Data together, then Data spread out. The mean is 10 both times, but the red lines, each value’s distance from the mean, are much longer the second time. Drag a dot far away and watch every measure grow.

Range and interquartile range

The range is the largest value minus the smallest. It’s quick, but one unusual value changes it completely. From a frequency table, use the largest and smallest values that actually occur: a score with frequency 0 doesn’t count.

More: the range

The quartiles split the ordered data into four equal parts:

  • Q1Q_1, the lower quartile: a quarter of the data is below it;
  • Q2Q_2, the median: half is below it;
  • Q3Q_3, the upper quartile: three quarters are below it.

The interquartile range is Q3−Q1Q_3 - Q_1: the spread of the middle half of the data, which ignores the extreme values at each end. The semi-interquartile range is half of it, Q3−Q12\frac{Q_3 - Q_1}{2}.

Finding the quartiles of a list

Put the nn values in order. Then:

  • Q1Q_1 is the value in position n4\frac n4;
  • Q3Q_3 is the value in position 3n4\frac{3n}{4}.

When the position isn’t a whole number:

  • if it ends in .5, go halfway between the two values either side (position 2.5 is halfway between the 2nd and 3rd values);
  • if it ends in .25 or .75, round up to the next position (position 2.75 means the 3rd value).

The median is found as usual, at position n+12\frac{n + 1}{2}.

213253Q₁647586median97118129Q₃14101511Q₁ at 11 ÷ 4 = 2.75 → 3rd; Q₃ at 8.25 → 9th
Quartiles of 11 valuesQ₁ = 5, median = 8, Q₃ = 12, so the interquartile range is 7

Worked example · WAEC 2023

WAEC 2023 · Paper 2 · Q5 (a, b)

The heights (in cm) of 10 students in a class are: 120,125,110,128,130,135,140,145,142120, 125, 110, 128, 130, 135, 140, 145, 142 and 120120. Find the:

range;

interquartile range;

  1. Order the data

    110,120,120,125,128,130,135,140,142,145110, 120, 120, 125, 128, 130, 135, 140, 142, 145

    Think first. Write the 10 heights from smallest to largest.

  2. (a) Range

    145−110=35145 - 110 = 35 cm.

  3. Lower quartile

    104=2.5\frac{10}{4} = 2.5, so Q1Q_1 is halfway between the 2nd and 3rd heights: 120+1202=120\frac{120 + 120}{2} = 120.

    Think first. n=10n = 10. Where is Q1Q_1?

  4. Upper quartile

    3×104=7.5\frac{3 \times 10}{4} = 7.5, so Q3Q_3 is halfway between the 7th and 8th heights: 135+1402=137.5\frac{135 + 140}{2} = 137.5.

    Think first. Where is Q3Q_3?

  5. (b) Interquartile range

    137.5−120=17.5137.5 - 120 = 17.5 cm.

More: quartiles of a list

Quartiles from a frequency table

In a frequency table the values are already in order. Add a row of running totals (the cumulative frequencies) and use it to see which value sits in each position. For the scores below, N=20N = 20, so Q1Q_1 is the 5th value and Q3Q_3 the 15th:

Score12345
Frequency35642
Running total38141820

The 4th to 8th values are all 2, so Q1=2Q_1 = 2. The 15th to 18th are all 4, so Q3=4Q_3 = 4, and the interquartile range is 4−2=24 - 2 = 2.

More: quartiles from a frequency table

Mean deviation

Find how far each value is from the mean, x−xˉx - \bar x. Some of these are negative, and with their signs they always add up to 0, so their plain average is useless. The mean deviation uses their sizes instead, the absolute values ∣x−xˉ∣|x - \bar x|:

mean deviation=∑∣x−xˉ∣n\text{mean deviation} = \frac{\sum |x - \bar x|}{n}
024681012mean 641023
Distances from the meanMean deviation = (4 + 1 + 0 + 2 + 3) ÷ 5 = 2

More: mean deviation

Variance and standard deviation

The other way to get rid of the signs is to square the deviations. Squaring also makes far-away values count for more. Switch the board to Squared distances to see this.

variance=∑(x−xˉ)2nSD=∑(x−xˉ)2n\begin{aligned} \text{variance} &= \frac{\sum (x - \bar x)^2}{n} \\[6pt] \text{SD} &= \sqrt{\frac{\sum (x - \bar x)^2}{n}} \end{aligned}

The standard deviation (SD) is the square root of the variance, so it’s back in the same units as the data (marks, years, kg).

Worked example · NECO 2024

NECO 2024 · Paper 2 · Q4

Given the numbers 2, 6, 9, 8, 7, 9, 8, 7, calculate, correct to 2 decimal places, the:

mean deviation;

standard deviation.

  1. The mean

    The sum is 5656 and there are 8 numbers, so xˉ=7\bar x = 7.

    Think first. Find the mean first.

  2. The table

    xx26987987Total
    ∣x−7∣\lvert x - 7\rvert5121021012
    (x−7)2(x - 7)^225141041036

    Think first. Fill in ∣x−7∣|x - 7| and (x−7)2(x - 7)^2 for each number.

  3. Mean deviation

    128=1.50\frac{12}{8} = 1.50

  4. Standard deviation

    Variance =368=4.5= \frac{36}{8} = 4.5, so the standard deviation is 4.5≈2.12\sqrt{4.5} \approx 2.12.

    Think first. Divide, then don't forget the last step.

More: variance and standard deviation of a list

Shifting and scaling data

Two facts save a lot of arithmetic:

  • Adding the same number to every value moves the mean by that number but leaves the spread alone. The range, the mean deviation and the standard deviation don’t change.
  • Multiplying every value by kk multiplies the range, the mean deviation and the standard deviation by kk, and the variance by k2k^2.
data+ 10: same spread× 2: spread doubles0481216
Moving and stretchingAdding 10 keeps the spread; doubling doubles it

So KK, K+1K + 1, K+2K + 2 has the same variance as 0,1,20, 1, 2, which is 23\frac23, whatever KK is. When a question gives the standard deviation and hides one value as a letter, write the variance with the letter in it, set it equal to the square of the given SD, and solve.

More: data with letters in it

From a frequency table

Each deviation now happens ff times, so multiply by ff before adding:

mean deviation=∑f∣x−xˉ∣∑fSD=∑f(x−xˉ)2∑f\begin{aligned} \text{mean deviation} &= \frac{\sum f|x - \bar x|}{\sum f} \\[6pt] \text{SD} &= \sqrt{\frac{\sum f(x - \bar x)^2}{\sum f}} \end{aligned}

When the mean is not a whole number, this form is often quicker and has fewer rounding errors:

SD=∑fx2∑f−xˉ2\text{SD} = \sqrt{\frac{\sum fx^2}{\sum f} - \bar x^2}

Worked example · WAEC 2016

WAEC 2016 · Paper 2 · Q12 (b)

Marks 3 4 5 6 7 8 9
Frequency 1 4 3 5 2 xx 2

The table shows the distribution of marks of students in a Mathematics test. If the mean of the distribution is 6, calculate the:

standard deviation, correct to 2 decimal places.

  1. The table

    Columns: xx, ff, x−6x - 6, (x−6)2(x - 6)^2, and f(x−6)2f(x - 6)^2.

    xx3456789Total
    ff143523220
    (x−6)2(x - 6)^29410149
    f(x−6)2f(x - 6)^2916302121860

    Think first. From part (a), x=3x = 3 and the mean is 6. What are the columns?

  2. Standard deviation

    SD=6020=3≈1.73\text{SD} = \sqrt{\frac{60}{20}} = \sqrt 3 \approx 1.73

For grouped data, such as marks in classes 1–10, 11–20, …, use each class mid-point as its xx.

More: spread from a frequency table

Your turn

WAEC 2021 · Paper 2 · Q5

Age 12 13 15 10 14 16
Frequency 2 3 3 9 6 2

The table shows the distribution of ages of some students in a school.

  1. (a)

    Find, correct to one decimal place, the mean deviation.

Worked solution (try it first)
  1. Put the ages in order (the table in the question isn't) and find the mean first:
  2. Age xx 10 12 13 14 15 16 Total
    ff 9 2 3 6 3 2 25
    fxfx 90 24 39 84 45 32 314
  3. Mean =31425=12.56= \frac{314}{25} = 12.56.
  4. Age xx 10 12 13 14 15 16 Total
    ∣x−12.56∣\lvert x - 12.56\rvert 2.56 0.56 0.44 1.44 2.44 3.44
    f∣x−12.56∣f\lvert x - 12.56\rvert 23.04 1.12 1.32 8.64 7.32 6.88 48.32

(a)

  1. Mean deviation =∑f∣x−xˉ∣∑f= \frac{\sum f|x - \bar x|}{\sum f}
    =48.3225= \frac{48.32}{25}
    =1.9328= 1.9328
    ≈1.9\approx 1.9.

Report a problem with this question

More past questions like this