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.

  1. It is already in order. The median is the 4th value. median = 8
  2. The lower half is 3, 5, 7. The upper half is 10, 12, 15. Q1 = 5, Q3 = 12
  3. 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?

  1. IQR: 32 − 20 = 12
  2. 1.5 × IQR: 1.5 × 12 = 18
  3. Fences: 20 − 18 = 2 and 32 + 18 = 50
  4. 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.

  1. Medians: A is 62 and B is 55. Class A did better on average.
  2. 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.

  1. Find the biggest and smallest values. 21 and 6
  2. Subtract. 21 − 6 = 15

Answer: 15

Example 5

Find the interquartile range of 2, 4, 5, 7, 9, 11, 12.

  1. The median is 7. The lower half is 2, 4, 5 and the upper half is 9, 11, 12.
  2. 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?

  1. Find the IQR. 18 − 10 = 8
  2. Add 1.5 × IQR to Q3. 18 + 12 = 30
  3. 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?

  1. A smaller interquartile range means the middle half are closer together.
  2. 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.

  1. Range: 40 − 5 = 35
  2. Interquartile range: 25 − 12 = 13

Answer: Range 35, IQR 13