Year 1 Statistics · Chapter 2

Measures of Location and Spread

Specification: Edexcel Paper 3 §2.3 — Measures of central tendency and variation  ·  AQA section L3

In this chapter
  1. 1. Averages
  2. 2. Quartiles, percentiles and the IQR
  3. 3. Variance and standard deviation
  4. 4. Coding
  5. 5. Comparing distributions
  6. Practice

Key facts — this chapter

  • Mean xˉ=∑xn\bar x = \dfrac{\sum x}{n}, or ∑fx∑f\dfrac{\sum fx}{\sum f} from a frequency table. The median is the middle value; the mode is the most common.
  • Quartiles split ordered data into four equal parts. IQR =Q3−Q1= Q_3 - Q_1 is the spread of the middle half.
  • For grouped data, estimate the mean with class midpoints, and estimate the median, quartiles and percentiles by linear interpolation.
  • Variance σ2=∑(x−xˉ)2n=∑x2n−xˉ2\sigma^2 = \dfrac{\sum (x - \bar x)^2}{n} = \dfrac{\sum x^2}{n} - \bar x^2. The standard deviation σ\sigma is its square root: the typical distance from the mean.
  • Coding y=x−aby = \dfrac{x - a}{b}: then yˉ=xˉ−ab\bar y = \dfrac{\bar x - a}{b} and σy=σxb\sigma_y = \dfrac{\sigma_x}{b}. Adding or subtracting moves the mean but not the spread.
  • When comparing data sets, compare a measure of location and a measure of spread, in context.

Two numbers summarise most data sets: one for where the values sit (location) and one for how widely they spread. This chapter builds the standard choices for each, shows how to get them from raw data, frequency tables and grouped data, and ends with the skill examiners reward most: saying what they mean.

1. Averages

Key result

xˉ=∑xnor, from a frequency table,xˉ=∑fx∑f\bar x = \frac{\sum x}{n} \qquad\text{or, from a frequency table,}\qquad \bar x = \frac{\sum fx}{\sum f}

The median is the middle value of the ordered data. The mode is the most frequent value (or the modal class for grouped data).

Each average has its strengths:

AverageUse it when…Watch out for…
meanyou want every value to count; no extreme valuesit is pulled towards outliers
medianthere are outliers or the data are skewedit ignores the size of extreme values
modethe data are qualitative, or you want the most common valuethere may be no mode, or several

For grouped data you don’t know the exact values, so each class is represented by its midpoint and the mean is an estimate.

2. Quartiles, percentiles and the IQR

The lower quartile Q1Q_1, median Q2Q_2 and upper quartile Q3Q_3 cut the ordered data into four equal parts. The interquartile range IQR=Q3−Q1\text{IQR} = Q_3 - Q_1 measures the spread of the middle 50%, so it ignores the extremes at both ends. Percentiles divide the data into 100 parts, and the 10th to 90th percentile range is another spread measure that is robust to extremes.

Quartiles of raw (discrete) data

For nn ordered values, to find Q1Q_1 work out n4\dfrac{n}{4}:

  • if it is not a whole number, round up and take that value;
  • if it is a whole number, take the mean of that value and the next one.

Use n2\dfrac{n}{2} for the median and 3n4\dfrac{3n}{4} for Q3Q_3 in the same way.

Worked example 2.1 · Averages and quartiles from raw data

The times, in minutes, that 11 people took to complete a puzzle were 12, 15, 9, 22, 17, 15, 11, 19, 14, 15, 20. Find the mean, median, mode, quartiles and interquartile range.


In order: 9, 11, 12, 14, 15, 15, 15, 17, 19, 20, 22.

  • Mean: 16911=15.4\dfrac{169}{11} = 15.4 minutes (3 s.f.). Mode: 15 minutes.
  • n2=5.5\dfrac{n}{2} = 5.5, so round up: the median is the 6th value, 15 minutes.
  • n4=2.75\dfrac{n}{4} = 2.75, so Q1Q_1 is the 3rd value, 12. 3n4=8.25\dfrac{3n}{4} = 8.25, so Q3Q_3 is the 9th value, 19.
  • IQR=19−12=7\text{IQR} = 19 - 12 = 7 minutes.

Grouped data: linear interpolation

In grouped continuous data the values inside a class are unknown, so assume they are spread evenly through it. Then a value’s position within its class gives its size.

Linear interpolation

To estimate the value at position kk (use k=n2k = \tfrac{n}{2} for the median, n4\tfrac{n}{4} for Q1Q_1, 3n4\tfrac{3n}{4} for Q3Q_3, pn100\tfrac{pn}{100} for the ppth percentile):

value≈L+k−Cf×w\text{value} \approx L + \frac{k - C}{f} \times w

where LL is the lower boundary of the class containing position kk, CC is the cumulative frequency before that class, ff is its frequency and ww is its width. (Named in Edexcel’s guidance, and the standard method for both boards.)

The class from 20 to 30 drawn as 16 equal slots, one per value; 20 values lie below the class and 14 above; the first 5 slots are shaded and a marker at 23.1 shows the 25th value
Interpolation assumes the 16 values in 20–30 are evenly spread. The 25th value overall is the 5th of them: 20 + 5/16 × 10 ≈ 23.1.

Worked example 2.2 · Estimates from grouped data

The table shows the journey times of 50 students. Estimate the mean, the median, the quartiles and the 90th percentile.

Time, tt (minutes)0≤t<100 \le t < 1010≤t<2010 \le t < 2020≤t<3020 \le t < 3030≤t<4030 \le t < 4040≤t<6040 \le t < 60
Frequency, ff61416104
Midpoint, xx515253550
Cumulative frequency620364650
Journey times of 50 students

Mean: ∑fx=30+210+400+350+200=1190\sum fx = 30 + 210 + 400 + 350 + 200 = 1190, so xˉ≈119050=23.8\bar x \approx \dfrac{1190}{50} = 23.8 minutes.

Median: k=25k = 25, which lies in 20≤t<3020 \le t < 30 (20 values come before it):

Q2≈20+25−2016×10=23.1 minutes (3 s.f.)Q_2 \approx 20 + \frac{25 - 20}{16} \times 10 = 23.1\text{ minutes (3 s.f.)}

Quartiles: Q1Q_1 (k=12.5k = 12.5) ≈10+6.514×10=14.6\approx 10 + \dfrac{6.5}{14} \times 10 = 14.6 and Q3Q_3 (k=37.5k = 37.5) ≈30+1.510×10=31.5\approx 30 + \dfrac{1.5}{10} \times 10 = 31.5, so the IQR is about 16.9 minutes.

90th percentile: k=45k = 45, in 30≤t<4030 \le t < 40: ≈30+45−3610×10=39\approx 30 + \dfrac{45 - 36}{10} \times 10 = 39 minutes.

Common mistake

For grouped continuous data use n2\tfrac{n}{2}, not n+12\tfrac{n+1}{2}, and don’t round positions: interpolation handles fractions. The “round up” rule is only for raw discrete data.

3. Variance and standard deviation

The IQR ignores most of the data. The standard deviation uses every value: it measures how far, typically, the values sit from the mean.

Five values, 3, 5, 6, 8 and 13, on a number line with their mean 7. Bars show each deviation from the mean: minus 4, minus 2, minus 1, plus 1 and plus 6, with squares 16, 4, 1, 1 and 36
Deviations from the mean always sum to 0, so square them first. Here the mean square is 58 ÷ 5 = 11.6, and σ = √11.6 ≈ 3.41.

Variance and standard deviation

σ2=∑(x−xˉ)2n=∑x2n−xˉ2,σ=σ2\sigma^2 = \frac{\sum (x - \bar x)^2}{n} = \frac{\sum x^2}{n} - \bar x^2, \qquad \sigma = \sqrt{\sigma^2}

From a frequency table: σ2=∑fx2∑f−xˉ2\sigma^2 = \dfrac{\sum fx^2}{\sum f} - \bar x^2.

The second form of the variance, “the mean of the squares minus the square of the mean”, is the one to calculate with. It only needs nn, ∑x\sum x and ∑x2\sum x^2, which questions often give you instead of the raw data (the summary statistics).

Worked example 2.3 · From summary statistics

For 20 values, ∑x=364\sum x = 364 and ∑x2=6964\sum x^2 = 6964. Find the mean and the standard deviation.


xˉ=36420=18.2\bar x = \frac{364}{20} = 18.2σ2=696420−18.22=348.2−331.24=16.96,σ=4.12 (3 s.f.)\sigma^2 = \frac{6964}{20} - 18.2^2 = 348.2 - 331.24 = 16.96, \qquad \sigma = 4.12\ (3\text{ s.f.})

Worked example 2.4 · From a frequency table

The numbers of goals scored in 30 matches are shown below. Find the mean, median and standard deviation.

Goals, xx012345
Frequency, ff489531

∑f=30\sum f = 30, ∑fx=58\sum fx = 58 and ∑fx2=0+8+36+45+48+25=162\sum fx^2 = 0 + 8 + 36 + 45 + 48 + 25 = 162.

xˉ=5830=1.93\bar x = \dfrac{58}{30} = 1.93 goals (3 s.f.).

The median is the mean of the 15th and 16th values. The cumulative frequencies are 4, 12, 21, …, so both are 2: the median is 2 goals.

σ2=16230−(5830)2=1.662…,σ=1.29 goals (3 s.f.)\sigma^2 = \frac{162}{30} - \left(\frac{58}{30}\right)^2 = 1.662\ldots, \qquad \sigma = 1.29\text{ goals (3 s.f.)}

On your calculator

The 1-variable statistics mode gives xˉ\bar x, ∑x\sum x, ∑x2\sum x^2 and two standard deviations. σx\sigma_x divides by nn, as in this chapter. sxs_x divides by n−1n - 1: AQA accepts either, but Edexcel expects σx\sigma_x. Enter frequency tables with the frequency column switched on.

Drag the dots to change the data. The mean, median, quartiles and standard deviation update as you go. Then code every value at once and watch which measures move.

code all values

4. Coding

Awkward numbers can be coded to simpler ones, for example y=x−1505y = \dfrac{x - 150}{5}. Work with yy, then decode. (Named in Edexcel’s guidance.)

Coding

If y=x−aby = \dfrac{x - a}{b}, then

yˉ=xˉ−abandσy=σxb\bar y = \frac{\bar x - a}{b} \qquad\text{and}\qquad \sigma_y = \frac{\sigma_x}{b}

Subtracting aa shifts every value, and so the mean, but leaves the spread alone. Dividing by bb scales both.

Worked example 2.5 · Decoding

Heights xx cm were coded using y=x−1505y = \dfrac{x - 150}{5}, giving yˉ=2.4\bar y = 2.4 and σy=1.6\sigma_y = 1.6. Find the mean and standard deviation of the heights.


Rearrange: x=5y+150x = 5y + 150. So xˉ=5(2.4)+150=162\bar x = 5(2.4) + 150 = 162 cm and σx=5(1.6)=8\sigma_x = 5(1.6) = 8 cm. The +150+150 affects the mean only.

5. Comparing distributions

Key result

To compare two data sets, make two comparisons, each in context:

  1. a measure of location: mean or median;
  2. a measure of spread: standard deviation, IQR or range.

Pair them sensibly: mean with standard deviation, or median with IQR (the median and IQR are better if there are outliers).

In context

“The mean time for Class A (15.4 min) was lower than for Class B (18.1 min), so on average Class A completed the puzzle faster. Class A’s standard deviation (3.75 min) was also smaller than Class B’s (6.2 min), so their times were more consistent.”

Common mistake

“Class A has a lower mean” earns nothing on its own. Say what it means for the people or things in the question: “on average, Class A were faster”. The context sentence carries the marks.

Practice

Twelve questions in three tiers. Try each one properly before opening the solution. Give answers to 3 significant figures where they are not exact, and use the divisor nn for variance and standard deviation.

Warm-up

1 [3 marks]

Ten students scored: 13, 7, 21, 4, 10, 15, 7, 18, 8, 12.

Find the mean, the median and the mode.

Show solution

Mean =11510=11.5= \dfrac{115}{10} = 11.5.

In order: 4, 7, 7, 8, 10, 12, 13, 15, 18, 21. Here n2=5\dfrac{n}{2} = 5, a whole number, so the median is the mean of the 5th and 6th values: 10+122=11\dfrac{10 + 12}{2} = 11.

Mode =7= 7.

2 [4 marks]

Twelve values, in order, are 3, 5, 6, 8, 9, 11, 12, 14, 15, 17, 20, 24. Find the median, the quartiles and the interquartile range.

Show solution

n4=3\dfrac{n}{4} = 3, so Q1=6+82=7Q_1 = \dfrac{6 + 8}{2} = 7.

n2=6\dfrac{n}{2} = 6, so Q2=11+122=11.5Q_2 = \dfrac{11 + 12}{2} = 11.5.

3n4=9\dfrac{3n}{4} = 9, so Q3=15+172=16Q_3 = \dfrac{15 + 17}{2} = 16.

IQR=16−7=9\text{IQR} = 16 - 7 = 9.

3 [4 marks]

The table shows the number of pets owned by 25 students.

Pets, xx0123
Frequency, ff71062

Find the mean, the median and the mode.

Show solution

∑fx=0+10+12+6=28\sum fx = 0 + 10 + 12 + 6 = 28, so the mean is 2825=1.12\dfrac{28}{25} = 1.12 pets.

n2=12.5\dfrac{n}{2} = 12.5, so round up: the median is the 13th value. The cumulative frequencies are 7, 17, …, so the 13th value is 1 pet.

The mode is 1 pet (the highest frequency, 10).

4 [3 marks]

Find the mean and standard deviation of 2, 4, 4, 4, 5, 5, 7, 9.

Show solution

∑x=40\sum x = 40, so xˉ=408=5\bar x = \dfrac{40}{8} = 5.

∑x2=4+16+16+16+25+25+49+81=232\sum x^2 = 4 + 16 + 16 + 16 + 25 + 25 + 49 + 81 = 232, so

σ2=2328−52=29−25=4,σ=2\sigma^2 = \frac{232}{8} - 5^2 = 29 - 25 = 4, \qquad \sigma = 2

Standard

5 [6 marks]

For a set of 15 values, ∑x=270\sum x = 270 and ∑x2=5160\sum x^2 = 5160.

  1. Find the mean and the standard deviation.
  2. A 16th value, 18, is added to the set. Find the new mean and standard deviation.
  3. Explain why the standard deviation changed as it did.
Show solution

(a) xˉ=27015=18\bar x = \dfrac{270}{15} = 18 and σ2=516015−182=344−324=20\sigma^2 = \dfrac{5160}{15} - 18^2 = 344 - 324 = 20, so σ=4.47\sigma = 4.47 (3 s.f.).

(b) Now n=16n = 16, ∑x=288\sum x = 288 and ∑x2=5160+324=5484\sum x^2 = 5160 + 324 = 5484.

xˉ=28816=18\bar x = \dfrac{288}{16} = 18 and σ2=548416−324=18.75\sigma^2 = \dfrac{5484}{16} - 324 = 18.75, so σ=4.33\sigma = 4.33 (3 s.f.).

(c) The new value equals the mean, so the mean is unchanged, but it adds a deviation of zero to the set. The average squared deviation therefore falls, and the standard deviation with it.

6 [6 marks]

The heights, hh cm, of 40 seedlings are shown below.

Height, hh (cm)0≤h<50 \le h < 55≤h<105 \le h < 1010≤h<1510 \le h < 1515≤h<2015 \le h < 2020≤h<3020 \le h < 30
Frequency4101583
Heights of 40 seedlings
  1. Write down the modal class.
  2. Estimate the mean height.
  3. Estimate the median height.
Show solution

(a) 10≤h<1510 \le h < 15 (frequency 15).

(b) Midpoints 2.5, 7.5, 12.5, 17.5, 25:

∑fx=10+75+187.5+140+75=487.5\sum fx = 10 + 75 + 187.5 + 140 + 75 = 487.5hˉ≈487.540=12.2 cm (3 s.f.)\bar h \approx \frac{487.5}{40} = 12.2\text{ cm (3 s.f.)}

(c) k=20k = 20. The cumulative frequencies are 4, 14, 29, so the median is in 10≤h<1510 \le h < 15:

Q2≈10+20−1415×5=12 cmQ_2 \approx 10 + \frac{20 - 14}{15} \times 5 = 12\text{ cm}
7 [5 marks]

The values xx were coded using y=x−204y = \dfrac{x - 20}{4}. For the 10 coded values, ∑y=30\sum y = 30 and ∑y2=190\sum y^2 = 190.

  1. Find the mean and standard deviation of yy.
  2. Hence find the mean and standard deviation of xx.
Show solution

(a) yˉ=3010=3\bar y = \dfrac{30}{10} = 3 and σy2=19010−9=10\sigma_y^2 = \dfrac{190}{10} - 9 = 10, so σy=3.16\sigma_y = 3.16 (3 s.f.).

(b) x=4y+20x = 4y + 20, so xˉ=4(3)+20=32\bar x = 4(3) + 20 = 32 and σx=410=12.6\sigma_x = 4\sqrt{10} = 12.6 (3 s.f.).

8 [5 marks]

Using the seedling data from Question 6:

  1. Estimate the lower and upper quartiles, and the interquartile range.
  2. Estimate the 90th percentile.
Show solution

Cumulative frequencies: 4, 14, 29, 37, 40.

(a) Q1Q_1: k=10k = 10, in 5≤h<105 \le h < 10, so Q1≈5+10−410×5=8Q_1 \approx 5 + \dfrac{10 - 4}{10} \times 5 = 8 cm.

Q3Q_3: k=30k = 30, in 15≤h<2015 \le h < 20, so Q3≈15+30−298×5=15.6Q_3 \approx 15 + \dfrac{30 - 29}{8} \times 5 = 15.6 cm (3 s.f.).

IQR≈15.625−8=7.63\text{IQR} \approx 15.625 - 8 = 7.63 cm (3 s.f.).

(b) k=0.9×40=36k = 0.9 \times 40 = 36, in 15≤h<2015 \le h < 20: ≈15+36−298×5=19.4\approx 15 + \dfrac{36 - 29}{8} \times 5 = 19.4 cm (3 s.f.).

Exam style

9 [6 marks]

Two classes sat the same test. Class A had mean 62 marks, standard deviation 8.5, median 64 and IQR 10. Class B had mean 58 marks, standard deviation 14, median 62 and IQR 21.

  1. Compare the two classes’ results.
  2. Class B’s teacher says the class contains a few very low marks. Explain how the given statistics support this, and say which pair of measures is the better summary for Class B.
Show solution

(a) Class A’s mean (62) is higher than Class B’s (58), so on average Class A did better on the test. Class A’s standard deviation (8.5) is much smaller than Class B’s (14), so Class A’s marks were far more consistent, while Class B’s were widely spread.

(b) For Class B the mean (58) is below the median (62). A few very low marks drag the mean down while barely moving the median, which is exactly the pattern here, and they also inflate the standard deviation (14) and the IQR (21). Since extreme values distort the mean and standard deviation, the median and IQR are the better summary for Class B.

10 [8 marks]

The waiting times, tt minutes, of 80 patients at a clinic are recorded.

Time, tt (min)0≤t<50 \le t < 55≤t<105 \le t < 1010≤t<1510 \le t < 1515≤t<2515 \le t < 2525≤t<4025 \le t < 40
Frequency122520158
Waiting times of 80 patients
  1. Estimate the mean and the standard deviation.
  2. Estimate the median.
  3. Explain why your answers are estimates.
Show solution

(a) Midpoints 2.5, 7.5, 12.5, 20, 32.5.

∑ft=30+187.5+250+300+260=1027.5\sum ft = 30 + 187.5 + 250 + 300 + 260 = 1027.5, so tˉ≈1027.580=12.8\bar t \approx \dfrac{1027.5}{80} = 12.8 min (3 s.f.).

∑ft2=75+1406.25+3125+6000+8450=19056.25\sum ft^2 = 75 + 1406.25 + 3125 + 6000 + 8450 = 19056.25, so

σ2≈19056.2580−12.843752=73.24…,σ≈8.56 min (3 s.f.)\sigma^2 \approx \frac{19056.25}{80} - 12.84375^2 = 73.24\ldots, \qquad \sigma \approx 8.56\text{ min (3 s.f.)}

(b) k=40k = 40. Cumulative frequencies are 12, 37, 57, so the median lies in 10≤t<1510 \le t < 15:

Q2≈10+40−3720×5=10.75 minQ_2 \approx 10 + \frac{40 - 37}{20} \times 5 = 10.75\text{ min}

(c) The original values are lost once the data are grouped. The calculations assume every value sits at its class midpoint (for the mean) or that values are evenly spread through the class (for the median), and neither is exactly true.

11 [6 marks]

Group 1 has 12 values with mean 15 and standard deviation 2. Group 2 has 8 values with mean 20 and standard deviation 3. Find the mean and standard deviation of all 20 values combined.

Show solution

Mean: ∑x=12(15)+8(20)=180+160=340\sum x = 12(15) + 8(20) = 180 + 160 = 340, so xˉ=34020=17\bar x = \dfrac{340}{20} = 17.

Sums of squares: from σ2=∑x2n−xˉ2\sigma^2 = \dfrac{\sum x^2}{n} - \bar x^2 we get ∑x2=n(σ2+xˉ2)\sum x^2 = n(\sigma^2 + \bar x^2):

12(4+225)=2748,8(9+400)=3272,total 602012(4 + 225) = 2748, \qquad 8(9 + 400) = 3272, \qquad \text{total } 6020σ2=602020−172=301−289=12,σ=3.46 (3 s.f.)\sigma^2 = \frac{6020}{20} - 17^2 = 301 - 289 = 12, \qquad \sigma = 3.46\ (3\text{ s.f.})

In context

The combined standard deviation (3.46) is bigger than either group’s, because the two groups are centred on different means: that gap adds to the overall spread.

12 [6 marks]

For 25 values a student calculates a mean of 40 and a standard deviation of 6. She then notices that one value was recorded as 52 when it should have been 42.

  1. Find the correct mean.
  2. Find the correct standard deviation.
Show solution

(a) From the wrong data, ∑x=25×40=1000\sum x = 25 \times 40 = 1000. Correcting the value: ∑x=1000−52+42=990\sum x = 1000 - 52 + 42 = 990, so the mean is 99025=39.6\dfrac{990}{25} = 39.6.

(b) From ∑x2=n(σ2+xˉ2)=25(36+1600)=40900\sum x^2 = n(\sigma^2 + \bar x^2) = 25(36 + 1600) = 40900. Correcting:

∑x2=40900−522+422=40900−2704+1764=39960\sum x^2 = 40900 - 52^2 + 42^2 = 40900 - 2704 + 1764 = 39960σ2=3996025−39.62=1598.4−1568.16=30.24\sigma^2 = \frac{39960}{25} - 39.6^2 = 1598.4 - 1568.16 = 30.24σ=5.50 (3 s.f.)\sigma = 5.50\ (3\text{ s.f.})

In context

Correcting one value that was too high pulls both the mean and the spread down.