Measures of location and spread at A-Level
This topic builds directly on GCSE averages and range, adding the precise methods A-Level examiners expect: quartiles calculated from a strict position rule, variance and standard deviation calculated exactly (not estimated from a diagram), grouped-data estimates using midpoints, and the effect of linear coding on both.
Four skills make up this topic:
- Averages — mean, median and mode from raw data, frequency tables and grouped data
- Spread — range, quartiles and the interquartile range, using the correct position rule for discrete data
- Variance and standard deviation — calculated exactly from raw or frequency data, and estimated from grouped data
- Coding — using a linear transformation to simplify a calculation, then converting the results back
Mean, median and mode
The mean is \(\bar{x} = \dfrac{\sum x}{n}\) for raw data, or \(\bar{x} = \dfrac{\sum fx}{\sum f}\) for data in a frequency table. The median is the middle value once the data is sorted; the mode is the most frequently occurring value.
Worked Example 1
Find the mean, median and mode of the test marks: 4, 7, 7, 8, 9, 9, 9, 10, 12.
1
Mean: \(\bar{x} = \dfrac{4+7+7+8+9+9+9+10+12}{9} = \dfrac{75}{9} = 8.33\) (2 d.p.)
2
Median: with \(n=9\) values already sorted, the median is the 5th value
3
Mode: the value appearing most often is 9 (three times)
AnswerMean \(=8.33\), median \(=9\), mode \(=9\)
Estimating the mean from grouped data
When data is given in a grouped frequency table, the exact values are unknown, so each class is represented by its midpoint. The mean is then estimated using \(\bar{x} = \dfrac{\sum fx}{\sum f}\), where \(x\) is now the midpoint of each class.
Worked Example 2
The table shows the time, in minutes, taken by 50 runners to complete a race. Estimate the mean time.
| Time (min) | 0–10 | 10–20 | 20–30 | 30–40 | 40–50 |
| Frequency | 5 | 12 | 18 | 10 | 5 |
1
Midpoints: 5, 15, 25, 35, 45
2
\(\sum fx = (5)(5)+(12)(15)+(18)(25)+(10)(35)+(5)(45) = 25+180+450+350+225 = 1230\)
3
\(\bar{x} = \dfrac{1230}{50} = 24.6\)
AnswerEstimated mean \(=24.6\) minutes
Range, quartiles and the interquartile range
The range is the largest value minus the smallest. For discrete data, quartiles are found using a strict position rule on the sorted data (\(n\) values): calculate \(\dfrac{n}{4}\) for \(Q_1\), \(\dfrac{n}{2}\) for the median \(Q_2\), and \(\dfrac{3n}{4}\) for \(Q_3\). If the result is a whole number, the quartile is the average of that term and the next; if it is not a whole number, round up to the next whole number and take that term directly. The interquartile range is \(\text{IQR} = Q_3 - Q_1\).
Worked Example 3
Find \(Q_1\), the median and \(Q_3\) for the ordered data (\(n=12\)): 2, 3, 5, 5, 6, 7, 7, 8, 9, 10, 11, 13.
1
\(Q_1\) position: \(\dfrac{12}{4}=3\), a whole number, so average the 3rd and 4th values: \(\dfrac{5+5}{2}=5\)
2
Median position: \(\dfrac{12}{2}=6\), a whole number, so average the 6th and 7th values: \(\dfrac{7+7}{2}=7\)
3
\(Q_3\) position: \(\dfrac{3(12)}{4}=9\), a whole number, so average the 9th and 10th values: \(\dfrac{9+10}{2}=9.5\)
Answer\(Q_1=5\), median \(=7\), \(Q_3=9.5\), so \(\text{IQR}=4.5\)
An outlier is often defined as any value more than \(1.5 \times \text{IQR}\) beyond \(Q_1\) or \(Q_3\) — that is, below \(Q_1 - 1.5 \times \text{IQR}\) or above \(Q_3 + 1.5 \times \text{IQR}\). (Estimating quartiles for grouped, continuous data by interpolation is covered alongside cumulative frequency diagrams in Representations of Data, the next topic in this series.)
Variance and standard deviation
Variance measures the average squared distance of each value from the mean. For raw data, \(\sigma^2 = \dfrac{\sum x^2}{n} - \bar{x}^2\), and the standard deviation is \(\sigma = \sqrt{\sigma^2}\). For frequency data, the same formula is used with \(\sum fx^2\) in place of \(\sum x^2\), and \(\sum f\) in place of \(n\); for grouped data, midpoints are used exactly as they are for the mean.
Worked Example 4
Find the standard deviation of: 2, 4, 5, 6, 8.
1
\(\sum x = 25\), so \(\bar{x} = \dfrac{25}{5}=5\)
2
\(\sum x^2 = 4+16+25+36+64 = 145\)
3
\(\sigma^2 = \dfrac{145}{5} - 5^2 = 29-25 = 4\), so \(\sigma = \sqrt{4}=2\)
AnswerStandard deviation \(=2\)
Worked Example 5
Using the grouped race-time data from Worked Example 2 (midpoints 5, 15, 25, 35, 45; frequencies 5, 12, 18, 10, 5; \(\bar{x}=24.6\)), estimate the standard deviation.
1
\(\sum fx^2 = (5)(5^2)+(12)(15^2)+(18)(25^2)+(10)(35^2)+(5)(45^2)\)
2
\(=125+2700+11250+12250+10125 = 36450\)
3
\(\sigma^2 = \dfrac{36450}{50} - 24.6^2 = 729-605.16=123.84\), so \(\sigma = \sqrt{123.84} = 11.13\) (2 d.p.)
AnswerEstimated standard deviation \(\approx 11.13\) minutes
Coding
Coding replaces each data value \(x\) with \(y = \dfrac{x-a}{b}\) to make arithmetic easier — typically to remove a large constant or a decimal scale — then converts the calculated statistics back at the end. The mean transforms the same way as the coding itself: \(\bar{x} = a + b\bar{y}\). Standard deviation is unaffected by the additive constant \(a\), since a shift doesn't change spread — it only scales by the multiplier: \(\sigma_x = b \, \sigma_y\).
Worked Example 6
The coding \(y=\dfrac{x-50}{10}\) is applied to a data set of size \(n=20\), giving \(\sum y = 40\) and \(\sum y^2 = 200\). Find the mean and standard deviation of the original data, \(x\).
1
\(\bar{y} = \dfrac{40}{20}=2\), so \(\bar{x} = 50+10(2) = 70\)
2
\(\sigma_y^2 = \dfrac{200}{20} - 2^2 = 10-4=6\), so \(\sigma_y = \sqrt6\)
3
\(\sigma_x = 10 \sigma_y = 10\sqrt6 \approx 24.49\)
AnswerMean \(=70\), standard deviation \(\approx 24.49\)
Outliers and comparing distributions
Once quartiles (or the mean and standard deviation) are known, they can be used to flag unusually extreme values and to compare two data sets. A value is a likely outlier if it falls outside \(Q_1 - 1.5 \times \text{IQR}\) to \(Q_3 + 1.5 \times \text{IQR}\) (or, in some questions, more than 2 standard deviations from the mean — always use whichever rule the question states). When comparing two distributions, always comment on both location (which has the higher average) and spread (which is more consistent) — a comparison that only mentions one is incomplete.
Exam tips
💡 Tip 1
Show \(\sum x\) and \(\sum x^2\) (or \(\sum fx\), \(\sum fx^2\)) explicitly
Writing these totals out before computing the mean or variance earns method marks even if a later arithmetic step slips, and makes your working easy to check.
💡 Tip 2
Check whether the quartile position is a whole number first
Whole number → average that term and the next. Not a whole number → round up and take that single term directly. Mixing these two rules up is the single most common error in this topic.
💡 Tip 3
Variance is \(\dfrac{\sum x^2}{n} - \bar{x}^2\), never the other way round
Divide by \(n\) (or \(\sum f\)) before subtracting the squared mean — and always square the mean itself, not double it.
💡 Tip 4
Coding: the additive constant never affects the spread
Only the multiplier \(b\) scales the standard deviation (\(\sigma_x = b\sigma_y\)) — the constant \(a\) shifts the mean but leaves the spread of the data completely unchanged.
💡 Tip 5
Carry full accuracy through your working
Round only your final answer. Rounding \(\bar{x}\) or \(\sum fx^2\) too early is a common cause of a standard deviation that's slightly, but noticeably, wrong.
Common mistakes
Common Mistake 1
Applying the wrong quartile rule
Averaging two terms when the position was already a whole number's next integer (i.e. should have rounded up), or rounding up when the position was already exactly a whole number — always calculate the position first, then decide which rule applies.
Common Mistake 2
Using class boundaries instead of midpoints for grouped data
Every grouped-data mean or variance estimate uses the midpoint of each class as \(x\) — using the lower or upper boundary instead systematically shifts the estimate.
Common Mistake 3
Dividing by \(n-1\) instead of \(n\)
A-Level Statistics Year 1 uses \(\sigma^2 = \dfrac{\sum x^2}{n} - \bar{x}^2\) throughout — dividing by \(n-1\) (a sample-variance formula met elsewhere) gives the wrong answer here and isn't on the formula sheet for this course.
Common Mistake 4
Un-coding the standard deviation incorrectly
Writing \(\sigma_x = a + b\sigma_y\) instead of \(\sigma_x = b\sigma_y\) — the additive constant \(a\) belongs only in the mean conversion, never in the standard deviation conversion.
Common Mistake 5
Comparing distributions using only the mean, or only the spread
Two data sets can share the same mean but have very different spreads (or vice versa) — a full comparison always addresses both location and spread, in context.
Practice questions
Work through each question before checking the worked solution.
Core Skills
Q1Find the mean, median and mode of: 3, 5, 5, 6, 8, 9, 9, 9, 11.Core Skills
Q2For the ordered data 1 to 16 (\(n=16\)), find \(Q_1\), the median and \(Q_3\), and hence the IQR.Core Skills
Q3A grouped frequency table for height (cm) has classes 150–155, 155–160, 160–165, 165–170, 170–175 with frequencies 4, 10, 14, 8, 4. Estimate the mean height.Core Skills
Q4Find the standard deviation of: 1, 2, 3, 4, 5.Core Skills
Q5A data set has mean 20 and standard deviation 4. The coding \(y=x-20\) is applied. State the mean and standard deviation of \(y\).Core Skills
Exam-Style
Q6For the ordered data 2 to 19 (\(n=18\)), find \(Q_1\), the median and \(Q_3\), and hence the IQR.Exam-Style
Q7A grouped frequency table for age (years) has classes 10–20, 20–30, 30–40, 40–50, 50–60 with frequencies 6, 9, 15, 12, 8. Estimate the mean and standard deviation.Exam-Style
Q8The coding \(y=\dfrac{x-10}{5}\) is applied to a data set of size \(n=25\), giving \(\sum y=75\) and \(\sum y^2 = 300\). Find the mean and standard deviation of \(x\).Exam-Style
Q9Class A has mean 65 and standard deviation 8; Class B has mean 65 and standard deviation 15 on the same test. Compare the two classes' performance.Exam-Style
Q10A data set has \(Q_1=12\) and \(Q_3=28\). Using the rule that an outlier lies more than \(1.5 \times \text{IQR}\) beyond a quartile, find the lower and upper boundaries for outliers.Exam-Style
A* Challenge
Q11A data set of 11 numbers has \(\sum x = 132\) and \(\sum x^2 = 1980\). Find (a) the mean, (b) the standard deviation.A* Challenge
Q12A grouped frequency table for weight (kg) has classes 40–50, 50–60, 60–70, 70–80, 80–90 with frequencies 3, 7, 12, 6, 2. Estimate the mean and standard deviation.A* Challenge
Q13The coding \(y=\dfrac{x-100}{20}\) applied to a set of exam scores (out of 200) gives \(\bar{y}=1.5\) and \(\sigma_y=0.8\). A student scored 3 standard deviations above the mean in the coded data. Find their actual score, \(x\).A* Challenge
Q14A data set has \(n=20\), mean 50 and standard deviation 8. Every value is increased by 10%, then decreased by a fixed 2. Find the new mean and new standard deviation.A* Challenge
Q15A discrete data set has \(n=100\), \(Q_1=34\), median \(=40\), \(Q_3=44\). (a) Show that an additional value of 5 would be classified as an outlier using the \(1.5\times\text{IQR}\) rule. (b) Explain whether the median is likely to change significantly once this value is added (\(n\) becomes 101).A* Challenge
Answers — full worked solutions
Core Skills (Q1–Q5)
Q1 — Mean \(=7.22\), median \(=8\), mode \(=9\)
1
Mean: \(\dfrac{3+5+5+6+8+9+9+9+11}{9} = \dfrac{65}{9}=7.22\) (2 d.p.)
2
Median: the 5th of 9 sorted values is 8
Mean \(=7.22\), median \(=8\), mode \(=9\) (appears 3 times)
Q2 — \(Q_1=4.5\), median \(=8.5\), \(Q_3=12.5\), IQR \(=8\)
1
\(Q_1\) position \(=4\), whole: average the 4th and 5th values, \(4\) and \(5\): \(4.5\)
2
Median position \(=8\), whole: average the 8th and 9th values, \(8\) and \(9\): \(8.5\)
3
\(Q_3\) position \(=12\), whole: average the 12th and 13th values, \(12\) and \(13\): \(12.5\)
\(Q_1=4.5\), median \(=8.5\), \(Q_3=12.5\), IQR \(=8\)
Q3 — Estimated mean \(=162.25\) cm
1
Midpoints: 152.5, 157.5, 162.5, 167.5, 172.5
2
\(\sum fx = 610+1575+2275+1340+690=6490\)
\(\bar{x} = \dfrac{6490}{40}=162.25\) cm
Q4 — Standard deviation \(=\sqrt2 \approx 1.41\)
1
\(\sum x=15\), \(\bar{x}=3\); \(\sum x^2=1+4+9+16+25=55\)
\(\sigma^2 = \dfrac{55}{5}-3^2 = 11-9=2\), so \(\sigma=\sqrt2\approx1.41\)
Q5 — Mean \(=0\), standard deviation \(=4\)
A constant shift changes the mean by that constant (\(20-20=0\)) but leaves the standard deviation completely unchanged (\(=4\))
Exam-Style (Q6–Q10)
Q6 — \(Q_1=6\), median \(=10.5\), \(Q_3=15\), IQR \(=9\)
1
\(Q_1\) position \(=4.5\), not whole: round up to the 5th value \(=6\)
2
Median position \(=9\), whole: average the 9th and 10th values, \(10\) and \(11\): \(10.5\)
3
\(Q_3\) position \(=13.5\), not whole: round up to the 14th value \(=15\)
\(Q_1=6\), median \(=10.5\), \(Q_3=15\), IQR \(=9\)
Q7 — Mean \(=36.4\), standard deviation \(\approx12.33\)
1
Midpoints 15, 25, 35, 45, 55; \(\sum fx = 90+225+525+540+440=1820\), so \(\bar{x}=\dfrac{1820}{50}=36.4\)
2
\(\sum fx^2 = 1350+5625+18375+24300+24200=73850\)
\(\sigma^2 = \dfrac{73850}{50}-36.4^2=1477-1324.96=152.04\), so \(\sigma\approx12.33\)
Q8 — Mean \(=25\), standard deviation \(\approx8.66\)
1
\(\bar{y}=\dfrac{75}{25}=3\), so \(\bar{x}=10+5(3)=25\)
\(\sigma_y^2=\dfrac{300}{25}-3^2=12-9=3\); \(\sigma_x=5\sqrt3\approx8.66\)
Q9 — Same average, Class A far more consistent
Both classes averaged the same mark (65), so their overall performance was equal on location — but Class A's much smaller standard deviation (8 vs 15) shows its marks were far more tightly clustered around the mean, i.e. more consistent, while Class B's marks were far more spread out
Q10 — Outlier below \(-12\) or above \(52\)
1
\(\text{IQR}=28-12=16\); \(1.5\times\text{IQR}=24\)
Lower boundary \(=12-24=-12\); upper boundary \(=28+24=52\)
A* Challenge (Q11–Q15)
Q11 — Mean \(=12\), standard deviation \(=6\)
1
\(\bar{x}=\dfrac{132}{11}=12\)
\(\sigma^2=\dfrac{1980}{11}-12^2=180-144=36\), so \(\sigma=6\)
Q12 — Mean \(=64\), standard deviation \(\approx10.44\)
1
Midpoints 45, 55, 65, 75, 85; \(\sum fx=135+385+780+450+170=1920\), so \(\bar{x}=\dfrac{1920}{30}=64\)
2
\(\sum fx^2=6075+21175+50700+33750+14450=126150\)
\(\sigma^2=\dfrac{126150}{30}-64^2=4205-4096=109\), so \(\sigma\approx10.44\)
Q13 — \(x=178\)
1
3 standard deviations above the coded mean: \(y = 1.5+3(0.8)=3.9\)
\(x = 100+20(3.9) = 178\)
Q14 — New mean \(=53\), new standard deviation \(=8.8\)
1
This is the coding \(x' = 1.1x - 2\); the mean transforms the same way: \(1.1(50)-2=55-2=53\)
The standard deviation scales only by the multiplier: \(1.1(8)=8.8\) — the \(-2\) has no effect on spread
Q15 — Confirmed outlier; median barely affected
1
(a) \(\text{IQR}=44-34=10\); lower boundary \(=34-1.5(10)=34-15=19\). Since \(5<19\), it is classified as an outlier.
(b) Going from \(n=100\) to \(n=101\) shifts the median position from between the 50th/51st values to exactly the 51st value. Since the new value is far below the bulk of the data, it doesn't affect the middle of the ordered data set, so the median is very unlikely to change significantly.
Summary
- Mean: \(\bar{x}=\dfrac{\sum x}{n}\) (or \(\dfrac{\sum fx}{\sum f}\) for frequency data); use class midpoints for grouped data.
- Discrete-data quartiles: find the position (\(\dfrac{n}{4}\), \(\dfrac{n}{2}\), \(\dfrac{3n}{4}\)) — whole number means average that term and the next, otherwise round up and take that term.
- Variance: \(\sigma^2 = \dfrac{\sum x^2}{n}-\bar{x}^2\); standard deviation \(\sigma=\sqrt{\sigma^2}\); use \(\sum fx^2\) and \(\sum f\) for frequency/grouped data.
- Coding \(y=\dfrac{x-a}{b}\): un-code the mean with \(\bar{x}=a+b\bar{y}\), but the standard deviation with \(\sigma_x = b\sigma_y\) only — the constant \(a\) never affects spread.
- An outlier typically lies beyond \(Q_1 - 1.5\times\text{IQR}\) or \(Q_3+1.5\times\text{IQR}\); always compare both location and spread when comparing two distributions.
This topic builds on GCSE Averages & Range and follows on from Data Collection in Statistics Year 1 (AS). The mean, variance and grouped-data skills here feed directly into the next topics: Representations of Data (histograms, box plots and cumulative frequency) and Statistical Distributions.
Want to improve your grade faster?
If quartiles, variance or coding are still causing problems, Alamin's diagnostic approach identifies exactly which skills are missing and builds a targeted plan to address them — with AI-powered practice between sessions.
Book an Assessment Session (£60)
No upfront payment required — payment is taken after confirmation.