Maths › Statistics › Measures of location and spread
Measures of location and spread
Two numbers summarise a thousand. One says where the data sits, the other says how far it strays. This lesson builds the mean, median and quartiles, then the standard deviation, and shows how coding moves them all in predictable ways.
Builds on Sampling and the large data set.
IN THIS TOPIC
- Find the median and quartiles of a listed data set using Edexcel's position rules.
- Estimate the median, quartiles and percentiles of grouped data by linear interpolation.
- Calculate variance and standard deviation from raw data or from the sums Σx and Σx².
- Undo coding to recover the mean and standard deviation of the original variable.
COMMON MISCONCEPTION
Adding 5 to every value in a data set increases the standard deviation.
Location: mean, median, mode
The mean adds everything up and shares it out equally.
It uses every value, which is its strength and its weakness at once. One wild reading drags it. The median is the middle of the ordered list and ignores wild readings because it never looks at them. The mode is the most common value, and the only one of the three that works on data that is not numerical.
In a list of n values, find positions before you find values. Work out n/4 for Q₁, n/2 for the median and 3n/4 for Q₃. If the position is not a whole number, round it up and read that value. If it is a whole number, take the midpoint of that value and the next one along.
Eleven values put the median at position 5.5, rounded up to the 6th, and Q₁ at 2.75, rounded up to the 3rd. Twelve values put Q₁ at position 3 exactly, so Q₁ is halfway between the 3rd and 4th values. Students lose marks here far more often than they lose them on standard deviation. The interquartile range Q₃ − Q₁ then measures the spread of the middle half.
Grouped data and interpolation
Grouped data has thrown the individual values away, so the median gets estimated on the assumption that values spread evenly through their class. Walk the cumulative frequency up to the class containing position n/2, then take the matching fraction of that class width. Note the switch: with grouped data you use n/2 and you do not round.
WORKED EXAMPLE
A median by interpolation
Masses of 25 parcels: 8 in the class 10 ≤ m < 20, 12 in 20 ≤ m < 30, and 5 in 30 ≤ m < 40. Estimate the median.
The median position is n/2 = 12.5. The first class carries the count to 8, so the median is the 4.5th of the 12 values inside 20 ≤ m < 30.
Assuming an even spread: median ≈ 20 + (12.5 − 8)/12 × 10 = 20 + 3.75 = 23.75, so about 23.8 kg.
Checking: 23.75 sits in the right class and less than halfway through it, matching 4.5 out of 12.
Quartiles and percentiles work identically, with n/4, 3n/4 or 37n/100 replacing n/2. Watch the class boundaries. Ages given as 20–29 usually mean 20 ≤ a < 30, and using a width of 9 instead of 10 wrecks every subsequent line.
Spread: variance and standard deviation
The range uses two values and ignores the other n − 2. The variance uses all of them, as the mean of the squared distances from the mean, most usefully in this form.
The booklet carries it under Standard deviation, printed as the square root of exactly this expression, so take what you find on the page and square it. The mean of the squares minus the square of the mean. Its square root σ is the standard deviation, back in the units of the data, so answers get quoted in σ and never in σ². Squaring is also the reason a single distant value inflates σ so sharply. Distances count according to their squares.
WORKED EXAMPLE
Mean and standard deviation from the sums
For 20 values, Σx = 340 and Σx² = 6180. Find the mean and standard deviation.
The mean is 340/20 = 17.
Variance = 6180/20 − 17² = 309 − 289 = 20, so σ = √20 ≈ 4.47.
Sense check: σ is a typical distance from the mean, and values four or five units either side of 17 look entirely believable for this data.
Grouped data replaces Σx with Σfx and Σx² with Σfx², using class midpoints for x. The answer is then an estimate, and saying so is sometimes the mark.
Coding
Data often gets coded before any arithmetic happens, by y = (x − a)/b, turning clumsy values into small ones. The summary statistics follow the code, and undo it, exactly.
The picture explains the asymmetry. Subtracting a slides every value equally, so the mean slides with them while the distances between values, and therefore σ, do not move at all. Dividing by b shrinks the ruler, so the mean and the standard deviation both divide by b.
With y = (x − 500)/10, a coded mean of 3.2 and coded σ of 1.4, the original data has mean 500 + 10 × 3.2 = 532 and σ = 10 × 1.4 = 14. Almost every coding question ends by asking for the original statistics, so get comfortable running the code backwards.
ASSESSMENT FOCUS
- Grouped medians are interpolation. Class boundaries, cumulative counts, then the fraction of the width. Write the fraction down, because it is the step that shows the method.
- Find σ² = Σx²/n − (Σx/n)² in the booklet under Standard deviation, where it sits inside a square root, and work straight from the given sums.
- Coding questions almost always end on the original data. Adding shifts the mean only; multiplying scales the mean and σ together.
- Say which measure a context deserves. Median and IQR when the data is skewed or holds outliers, mean and σ when it behaves and every value should count.
- Quote σ to three significant figures and keep the unrounded value in your calculator for anything that follows.
CHECK YOURSELF
Ten values have Σx = 120 and Σx² = 1560. Find the mean and the standard deviation.
Show a hint
Mean of the squares minus the square of the mean.
Show the answer
Mean: 120/10 = 12.
Variance: 1560/10 − 12² = 156 − 144 = 12, so σ = √12 ≈ 3.46.
Location by position: order the data, find the position, then read the value.
Spread by squares. σ² is the mean of the squares minus the square of the mean, and only stretching the data, never sliding it, changes σ.
WORKBOOK
Printable practice for this topic: original exam-style questions with room to work, and a fully worked answer book. Free to use; please do not redistribute or sell.
Or read them with their worked answers on the measures of location and spread questions page.
CHECK YOUR PROGRESS
Rate how confident you feel with each objective for this lesson. Ratings are saved in this browser, on this device, unless you sign in.
- Find the median and quartiles of a listed data set using Edexcel's position rules.
- Estimate the median, quartiles and percentiles of grouped data by linear interpolation.
- Calculate variance and standard deviation from raw data or from the sums Σx and Σx².
- Undo coding to recover the mean and standard deviation of the original variable.
Open the full revision checklist to see every objective in the course in one place.