Quartiles, box plots and distribution comparisons · Higher
Introduced| English | Meaning |
|---|---|
| interquartile range/ˌɪntəˈkwɔːtaɪl reɪndʒ/ | The upper quartile minus the lower quartile, measuring the spread of the middle half of ordered data. |
| outlier/ˈaʊtlaɪə/ | An observation unusually far from the rest of the data or from the pattern expected under a model. |
Two cities, one median
- London and Beijing have similar average yearly temperatures, but Beijing's summers are much hotter and its winters much colder. One number for the centre hides that difference; a measure of spread shows it.
- Box plots let us compare centre and spread side by side.
The five-number summary
- Group A: 2, 5, 8, 11, 18 (min, Q1, median, Q3, max). Group B: 1, 6, 8, 10, 20.
- Both medians are 8.
IQR against range
- A: interquartile range 四分位距 $11 - 5 = 6$, range 16. B: IQR $10 - 6 = 4$, range 19.
- B's middle half is more consistent, although its extremes are further apart.
A box plot shows min 12, Q1 20, median 26, Q3 31, max 45. Find the IQR.
Difficulty 2/5 · 140 coins + a small bonus on first completion today
31 − 20.
Worked example: an outlier rule
Using the rule "an outlier is more than 1.5 × IQR beyond a quartile", is a new value of 23 an outlier in group A?
- Fences: $1.5 \times 6 = 9$. Lower $5 - 9 = -4$; upper $11 + 9 = 20$.
- Test: 23 is above 20.
- Answer: yes, under this rule 23 is an outlier. The rule must be stated — it is a convention, not a law.
Quartiles, box plots and distribution comparisons
A box plot marks minimum, lower quartile Q1, median, upper quartile Q3 and maximum, or identifies separately shown outliers according to the stated convention
Classify the worked-case statements, then explain the units or invariant that justifies each decision.
Using the same box plot and the 1.5 × IQR rule, find the upper fence.
Difficulty 2/5 · 140 coins + a small bonus on first completion today
31 + 16.5.
With Q1 = 5, Q3 = 11 and the 1.5 × IQR rule, a value of 19 is an outlier.
Difficulty 1/5 · 100 coins + a small bonus on first completion today
The upper fence is 20.
Writing a comparison
- One sentence on the medians, one on the IQRs, both in context.
- "Typical values were the same (median 8), but group B was more consistent (IQR 4 vs 6)."
Class P: median 70, IQR 12. Class Q: median 65, IQR 25. Which is best?
Difficulty 1/5 · 100 coins + a small bonus on first completion today
Higher median, smaller IQR.
Shape
- If the median sits nearer Q1, the upper half is more spread out: the data is skewed to the right.
- In A, the median is 3 above Q1 and 3 below Q3: the middle half is symmetric.
Q1 = 10, median = 12, Q3 = 22. What does this suggest?
Difficulty 1/5 · 100 coins + a small bonus on first completion today
The median is close to Q1.
The median line need not be in the middle of the box. A box plot marks quartiles, so each section holds a quarter of the data, not an equal width. A median close to Q1 shows bunching, not an error.
The median line must be exactly in the middle of the box.
Difficulty 1/5 · 100 coins + a small bonus on first completion today
Quartiles split the data, not the width.
Compare box plots by median (typical value) and IQR (consistency), in context. The range is sensitive to extremes. Test outliers with a stated rule such as 1.5 × IQR, and read skew from where the median sits in the box.
Daily maximum temperatures in July. City X: min 22, Q1 25, median 27, Q3 28, max 31. City Y: min 18, Q1 23, median 27, Q3 32, max 38. Compare the two cities.
Comparing distributions.