Quartiles, IQR and box plots
Range, quartiles and interquartile range, the five-number summary, outliers, drawing and reading box plots, and comparing data sets.
Two classes can have the same average mark but be very different: one where everyone scored about the same, and one with some top marks and some very low ones. Measures of spread capture that difference.
Range and quartiles
The range is highest minus lowest. It is quick, but one extreme value can make it misleading. Quartiles fix that by looking at the middle half of the data.
The IQR is the spread of the middle $50\%$ of the data, so a single extreme value can't distort it.
Find the quartiles and IQR of $3, 5, 6, 8, 9, 11, 12, 14, 15, 17, 18, 20, 25$.
Find the quartiles of $2, 4, 5, 7, 8, 10, 12, 15$.
Box plots
The five-number summary is: minimum, $Q_1$, median, $Q_3$, maximum. A box plot draws it on a scale. The box runs from $Q_1$ to $Q_3$ with a line at the median, and the "whiskers" reach out to the minimum and maximum. Each of the four sections holds about a quarter of the data.
For Example 1, the five-number summary is $3, 7, 12, 17.5, 25$.
Outliers
A common rule: a value is an outlier if it is more than $1.5 \times \text{IQR}$ below $Q_1$ or above $Q_3$.
Is $25$ an outlier in Example 1?
On a box plot, an outlier is shown as a separate dot, and the whisker stops at the largest value that is not an outlier.
Drag any dot to change the data. The box plot, summary statistics and outlier fences update as you go.
Find $Q_1$, the median and $Q_3$ by hand first, then check. Next, drag the largest value to the right until it becomes an outlier. At what value does that happen, and why?
Comparing data sets
Put two box plots on the same scale. Compare the medians to see which set is generally higher, and the IQRs to see which is more consistent.
Your turn
Bus route X takes a median of $22$ minutes with an IQR of $4$ minutes. Route Y takes a median of $18$ minutes with an IQR of $12$ minutes. You must not be late for an exam. Which route would you take, and why?
Show the working
Route Y is usually faster (lower median), but its times vary a lot (large IQR), so some trips take much longer. Route X is slower on average but very consistent. For an exam, the reliable choice is X; just leave a little earlier.
Find the range of $4, 9, 2, 15, 7$.
$15 - 2 = 13$.
Find $Q_1$ for $1, 3, 4, 6, 7, 9, 10, 12$.
Eight values: the lower half is $1, 3, 4, 6$. Its median is $\dfrac{3 + 4}{2} = 3.5$.
Find $Q_3$ for the same data.
The upper half is $7, 9, 10, 12$. Its median is $\dfrac{9 + 10}{2} = 9.5$.
Find the IQR for the same data.
$9.5 - 3.5 = 6$.
Find the IQR of $2, 5, 6, 8, 11, 13, 14, 17, 20$.
Nine values: the median is $11$; leave it out. Lower half $2, 5, 6, 8$ gives $Q_1 = 5.5$. Upper half $13, 14, 17, 20$ gives $Q_3 = 15.5$. IQR $= 10$.
On a box plot, the box itself runs from:
The box covers the middle $50\%$, from the lower quartile to the upper quartile.
About what percentage of the data lies between $Q_1$ and the median?
The quartiles and median split the data into four equal parts. $Q_1$ to the median is one of them.
A data set has $Q_1 = 20$ and $Q_3 = 30$. Above what value is a score an outlier?
IQR $= 10$. Upper fence $= 30 + 1.5 \times 10 = 45$.
Challenge: Team A's scores have median $60$ and IQR $10$. Team B's have median $65$ and IQR $25$. Which statement is best supported?
The higher median (B) means generally higher scores. The smaller IQR (A) means less spread in the middle half. The maximums can't be read from a median and IQR.
Challenge: A five-number summary is $12, 18, 25, 31, 50$. Find the upper fence for outliers. Is $50$ an outlier?
IQR $= 31 - 18 = 13$. Upper fence $= 31 + 1.5 \times 13 = 31 + 19.5 = 50.5$. Since $50 \lt 50.5$, it is not an outlier, just.
Coaching Centre