Quartiles, box plots and outliers
Quartiles and the interquartile range, five-number summaries and box plots, comparing data sets with parallel box plots, and identifying outliers with the 1.5 × IQR rule.
The median splits data in half. Quartiles split it into quarters, and those five cut points (smallest value, three quartiles, largest value) are enough to sketch the whole shape of a data set in one small diagram.
Quartiles and the IQR
- Put the data in order and find the median, $Q_2$.
- The lower quartile $Q_1$ is the median of the lower half. The upper quartile $Q_3$ is the median of the upper half. If there's an odd number of values, leave the middle value out of both halves.
- The interquartile range is $\text{IQR} = Q_3 - Q_1$. It's the spread of the middle $50\%$ of the data, so unlike the range, it ignores extreme values.
- The five-number summary is: minimum, $Q_1$, median, $Q_3$, maximum.
Outliers
An outlier is a value that is unusually far from the rest. To decide formally, build two fences:
Any value below the lower fence or above the upper fence is an outlier. Before deleting an outlier, find out why it's there. It might be a typing error (a height of $1680$ cm), or it might be real and important (a student with a full-time job).
Fifteen Year 12 students recorded their weekly hours of part-time work: $0, 0, 3, 4, 5, 5, 6, 6, 7, 8, 8, 9, 10, 12, 25$. Find the five-number summary, test for outliers, and draw a box plot.
For the data $12, 15, 17, 18, 20, 22, 25, 27, 30, 41$, is $41$ an outlier?
Reading and comparing box plots
Each of the four sections of a box plot (whisker, half-box, half-box, whisker) holds about $25\%$ of the data. A long section doesn't mean more data. It means the same amount of data spread over a wider range.
- Symmetric: median in the middle of the box, whiskers about equal.
- Positively skewed: median closer to $Q_1$, longer right whisker.
- Negatively skewed: median closer to $Q_3$, longer left whisker.
You can also find a five-number summary from a dot plot, stem-and-leaf plot or cumulative frequency table: list the values in order and count.
Compare the part-time work hours of the two year groups using the parallel box plots above.
Drag Year 12's outlier ($25$) to the left until it's no longer an outlier. At what value does that happen? Use the fence to explain.
Drag the same point back out to $30$. How much do the mean and the median of Year 12 change? Which is affected more by an outlier?
Make the two groups have the same median but very different IQRs.
Your turn
Remove the outlier $25$ from Example 1. Find the new mean and median, and compare them with the originals.
Show the working
Original: total $= 108$, mean $= 108 \div 15 = 7.2$, median $= 6$. Without $25$: total $= 83$, mean $= 83 \div 14 \approx 5.93$. The median of the $14$ values is halfway between the 7th and 8th, both $6$, so it's still $6$. The outlier moved the mean by more than an hour but didn't move the median at all.
For $3, 5, 7, 8, 10, 12, 15$, find $Q_1$.
Median $= 8$ (the 4th value). Lower half: $3, 5, 7$, with median $5$.
For the same data, find the IQR.
Upper half $10, 12, 15$, so $Q_3 = 12$. $\text{IQR} = 12 - 5 = 7$.
For the same data, find the upper fence for outliers.
$12 + 1.5 \times 7 = 12 + 10.5 = 22.5$.
$Q_1 = 20$ and $Q_3 = 30$. Is $47$ an outlier?
$\text{IQR} = 10$, so the upper fence is $30 + 15 = 45$. $47 > 45$, so it is an outlier.
What percentage of the data in a box plot lies above $Q_1$?
$Q_1$ cuts off the lowest $25\%$, so $75\%$ lies above it.
A box plot has its median close to $Q_3$ and a long left whisker. The data is:
The low values are stretched out to the left: a tail to the left is negative skew.
Why is the IQR often better than the range for comparing spread?
The IQR only uses the middle half of the data, so a single extreme value can't inflate it.
Exam style: In Example 3, by how many hours is Year 11's IQR greater than Year 12's?
Year 11: $12 - 5 = 7$. Year 12: $9 - 4 = 5$. Difference $= 7 - 5 = 2$ hours.
Exam style: In Example 1, the value $25$ is replaced by a different whole number. What is the smallest whole number it could be replaced by and still be an outlier?
The largest value doesn't affect $Q_1$, the median or $Q_3$ (as long as it stays the largest), so the upper fence is still $9 + 1.5 \times 5 = 16.5$. A value must be above $16.5$ to be an outlier, so the smallest whole number is $17$.
Coaching Centre