Quartiles, Box Plots and Outliers
Quartiles cut sorted data into four equal-sized groups, the way the median cuts it in two. Five numbers (min, , median, , max) are enough to draw a box plot, and the width of the middle half, the IQR, tells you how far out a value has to be before it counts as an outlier.
What the symbols mean
- First quartile
25% of the data lie at or below it.
- Third quartile
75% of the data lie at or below it.
- Interquartile range
The spread of the middle half of the data.
Explanation
Quartiles are simply the three values that split sorted data into four equal-sized groups; the name just means "quarters." (a quarter of the data below it), the median (half below) and (three quarters below). The IQR, , is the width of the middle half of the data, and the fences are that width times 1.5, measured out from each side of the box. It's all just sorting and finding middles, the same skill as finding a median, a few times over.
Finding quartiles: sort the data and find the median. is the median of the lower half and the median of the upper half (leave out the overall median when is odd).
Percentiles: the th percentile has of the data at or below it. , the median and are the 25th, 50th and 75th percentiles.
Box plots: a box from to with a line at the median, and whiskers out to the smallest and largest values that aren't outliers. Outliers are plotted as separate points.
Why build the fences from the IQR? Remember that the median shrugs off extreme values while the mean doesn't. Quartiles are medians of halves, so they inherit the same toughness. That makes the IQR a fair yardstick for judging outliers: if we used the standard deviation instead, a wild value would inflate the very yardstick that's supposed to catch it.
Outliers are values beyond the fences. They deserve a second look: data-entry errors, or the most interesting observations in the set.
A common mistake. It's tempting to draw the whiskers all the way to the minimum and maximum every time. That's only right when nothing lies past the fences. When something does, the whisker stops at the most extreme value inside the fence, and the outlier gets its own dot.
See it
Worked examples
Find the five-number summary of .
- 1
There are nine values, so the median is the 5th one, .
Practice
Type your answer and check it. Solve them all to complete the lesson.
For , find .
Find .
Find the IQR.
Find the upper fence . Is 20 an outlier?
A score at the 80th percentile means:
A website's load times for 9 visits, in seconds, are 1.2, 1.4, 1.5, 1.7, 1.9, 2.0, 2.2, 2.6 and 6.8. Find the upper fence . Is 6.8 an outlier?
For normally distributed data, and sit at . Find the IQR of IQ scores, which are .
The hardest one here. Get it, and you've got this lesson.
For perfectly normal data, about what fraction of values falls outside the fences? ( and are at .)
Where it's used
Box plots compare groups side by side: salaries by department, test scores by school, response times before and after a code change.