Quartiles and box plots
Averages tell you a typical value. Measures of spread tell you how much the data vary. Quartiles split ordered data into four equal parts. A box plot shows the minimum, quartiles, median and maximum at a glance.
Key facts
- Range = maximum − minimum. One extreme value can change it a lot.
- Q1 is the median of the lower half and Q3 is the median of the upper half. With an odd number of values, leave the median out of both halves.
- Interquartile range IQR = Q3 − Q1: the spread of the middle 50%.
- An outlier is more than 1.5 × IQR below Q1 or above Q3.
- A box plot shows the minimum, Q1, median, Q3 and maximum on a scale.
- To compare data sets, compare the medians (average) and the IQRs (consistency).
Worked examples
Example 1
Find the median and the interquartile range of 3, 5, 7, 8, 10, 12, 15.
- It is already in order. The median is the 4th value. median = 8
- The lower half is 3, 5, 7. The upper half is 10, 12, 15. Q1 = 5, Q3 = 12
- Subtract. IQR = 12 − 5 = 7
Answer: Median 8, IQR 7
Example 2
A data set has Q1 = 20 and Q3 = 32. Is a value of 52 an outlier?
- IQR: 32 − 20 = 12
- 1.5 × IQR: 1.5 × 12 = 18
- Fences: 20 − 18 = 2 and 32 + 18 = 50
- 52 > 50, so it is an outlier.
Answer: Yes: it is above the upper fence of 50
Example 3
The box plots show test marks for two classes. Compare them.
- Medians: A is 62 and B is 55. Class A did better on average.
- IQRs: A is 69 − 54 = 15 and B is 59 − 51 = 8. Class B’s marks were more consistent.
Answer: A scored higher on average; B was more consistent
Example 4
Find the range of 14, 9, 21, 6, 17.
- Find the biggest and smallest values. 21 and 6
- Subtract. 21 − 6 = 15
Answer: 15
Example 5
Find the interquartile range of 2, 4, 5, 7, 9, 11, 12.
- The median is 7. The lower half is 2, 4, 5 and the upper half is 9, 11, 12.
- Q1 = 4 and Q3 = 11. 11 − 4 = 7
Answer: 7
Example 6
Q1 = 10 and Q3 = 18. A value is an outlier if it is more than 1.5 × IQR above Q3. Is 32 an outlier?
- Find the IQR. 18 − 10 = 8
- Add 1.5 × IQR to Q3. 18 + 12 = 30
- 32 is above 30, so it is an outlier.
Answer: Yes
Example 7
Two classes have the same median mark. Class A has an interquartile range of 4 marks and class B of 12 marks. Whose marks are more consistent?
- A smaller interquartile range means the middle half are closer together.
- 4 is less than 12, so class A is more consistent.
Answer: Class A
Example 8
A box plot has minimum 5, lower quartile 12, median 18, upper quartile 25 and maximum 40. Find the range and the interquartile range.
- Range: 40 − 5 = 35
- Interquartile range: 25 − 12 = 13
Answer: Range 35, IQR 13