Where do you stand in the class?
A pupil scores 68 in a test. The mean is 62. Is 68 good? It depends on how many scored less.
If a pupil beat nine out of ten classmates, that says more than the score alone. Measures of position say where a value sits in the ordered data.
Key words
| Word | What it means |
|---|---|
| Dataset | a collection of records held together for analysis |
| Position | where a value sits when the data is put in order |
| Quartile | one of three values that cut ordered data into four equal parts |
| Lower quartile | the value with a quarter of the data below it, called Q1 |
| Upper quartile | the value with three quarters of the data below it, called Q3 |
| Interquartile range | the upper quartile minus the lower quartile: the spread of the middle half |
| Percentile | the value with a given part of every 100 below it |
| Median | the middle value when the data is in order |
The cells students fill in are left blank in this preview.
By the end of this lesson
Note
I can find the quartiles and a percentile of a small dataset and say what they tell me.
Starter
Have a go
Starter
3 questionsYour answers are marked here and are not kept. A college account keeps every student’s marks.
Cutting ordered data into parts
Put the data in order. The median cuts it in two. The quartiles cut it into four equal parts: Q1 has a quarter below it, Q2 is the median and Q3 has three quarters below it.
A percentile cuts it into 100 parts. The 90th percentile has 90 out of every 100 values at or below it.
Worked example: seven values
| Step | Working | Result |
|---|---|---|
| Put in order | 1, 3, 5, 7, 9, 11, 13 | Seven values |
| Median | The 4th value | 7 |
| Lower half | 1, 3, 5 (the 7 is left out) | Q1 is 3 |
| Upper half | 9, 11, 13 | Q3 is 11 |
| Interquartile range | 11 take away 3 | 8 |
The cells students fill in are left blank in this preview.
Worked example: eight values
| Step | Working | Result |
|---|---|---|
| Put in order | 2, 4, 4, 4, 5, 5, 7, 9 | Eight values |
| Median | Mean of the 4th and 5th: 4 and 5 | 4.5 |
| Lower half | 2, 4, 4, 4 | Q1 is 4 |
| Upper half | 5, 5, 7, 9 | Q3 is 6 |
| Interquartile range | 6 take away 4 | 2 |
The cells students fill in are left blank in this preview.
Try it: quartiles in Python
data = [2, 4, 4, 4, 5, 5, 7, 9]
lower = data[0:4]
upper = data[4:8]
print("lower half", lower)
print("upper half", upper)
# The median of [2, 4, 4, 4] is 4. The median of [5, 5, 7, 9] is 6.
# Change 9 to 90. Do the quartiles change?
Percentiles by nearest rank
To find the 90th percentile of 8 values, work out 90 times 8 divided by 100, which is 7.2. Round up to 8. The answer is the 8th value in order.
Different tools use slightly different rules, so their answers can differ a little. Say which rule you used.
Quartiles vary too. This lesson uses the median of each half. A spreadsheet QUARTILE formula gives 5.5, not 6, for the upper quartile of the eight values.