Instant PDF download, name-and-email checkout. Complete Book Bundle: every Economics, Statistics, Mathematics and Econometrics book
Statistics

Box Plots and the Five-Number Summary: How to Draw, Read and Compare Them

Box plots and the five-number summary explained: find quartiles, IQR and outliers with the 1.5 × IQR rule, then compare two bus routes step by step.

In 30 seconds
  • The five-number summary is the minimum, lower quartile (Q1), median, upper quartile (Q3) and maximum. A box plot draws it: a box from Q1 to Q3, a line at the median and whiskers out to the extremes.
  • The 1.5 × IQR rule flags outliers: any value below \( Q_1 – 1.5\,\mathrm{IQR} \) or above \( Q_3 + 1.5\,\mathrm{IQR} \) is plotted as a separate point.
  • In our case, bus route A has median 31 minutes and IQR 8; route B has median 36 minutes and IQR 19. Route A is faster on a typical day and much more reliable.
  • Route A’s 58-minute day (a breakdown) is an outlier; it barely moves the median but drags the mean up from 30.6 to 32.4 minutes.
  • Exam point: when comparing box plots, compare medians and IQRs in context, and remember a box plot cannot show how many values there are or whether the data have two peaks.

The case: which bus route should a commuter trust?

Amira travels to work by bus and can take one of two routes. Route A goes through the city centre; route B takes the ring road. She wants to know which is quicker on a typical day and, just as important, which is more predictable, because arriving late twice a week is worse than leaving five minutes earlier.

For three weeks she times her journey door to door. She uses route A on 15 weekdays and route B on 15 other weekdays. Here are her journey times in minutes, sorted:

Route A: 22, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 37, 39, 58.

Route B: 18, 20, 23, 26, 29, 31, 34, 36, 38, 40, 42, 45, 47, 50, 53.

On the day of the 58-minute journey, a bus broke down and she had to wait for the next one. The means are 32.4 minutes for A and about 35.5 minutes for B, which suggests A is a little faster. But a mean says nothing about predictability. To see the whole picture, she summarises each route with five numbers and draws two box plots on the same scale. (The figures are illustrative.)

The concept: the five-number summary and the box plot

The median splits a data set into two halves. The quartiles split each half again, so that the data fall into four groups of roughly equal size. The lower quartile \( Q_1 \) has about a quarter of the data below it, and the upper quartile \( Q_3 \) has about three quarters below it. Together with the smallest and largest values, these give five numbers that describe the centre, the spread of the middle half and the extremes.

There are several conventions for finding quartiles. The one used in most school courses, and in this post, is: put the data in order, find the median, then find the median of the lower half and the median of the upper half. If there is an odd number of values, the median itself is left out of both halves. Calculators and software sometimes use slightly different rules, so their quartiles can differ a little, especially with small data sets[1].

Key termFive-number summary: the minimum, lower quartile \( Q_1 \), median, upper quartile \( Q_3 \) and maximum of a data set. The interquartile range (IQR) is \( Q_3 – Q_1 \), the spread of the middle 50% of the data.

A box plot (also called a box-and-whisker plot) is a picture of the five-number summary. Draw a scale. Draw a box from \( Q_1 \) to \( Q_3 \) and a line inside it at the median. Then draw whiskers from the box out to the smallest and largest values that are not outliers, and plot any outliers as separate points. To decide what counts as an outlier, we use fences:

\[ \text{lower fence} = Q_1 – 1.5 \times \mathrm{IQR}, \qquad \text{upper fence} = Q_3 + 1.5 \times \mathrm{IQR}, \qquad \mathrm{IQR} = Q_3 – Q_1 \]

Here \( Q_1 \) and \( Q_3 \) are the lower and upper quartiles, and IQR is their difference. Any value below the lower fence or above the upper fence is classed as an outlier by this rule. The factor 1.5 is a convention, not a law of nature; it was popularised by John Tukey in his work on exploratory data analysis[2]. The fences are not drawn on the plot; they only decide where each whisker stops. Some exam boards also accept a simpler box plot in which the whiskers run to the minimum and maximum; read the question to see which is wanted.

Statistics Made Simple textbook coverStatistics Made Simple explains the five-number summary and box plots with worked examples, diagrams and tables.Get the textbook · $12

Why this method fits the case

Amira’s question has two parts: which route is faster typically, and which is more reliable. The median answers the first, and it is not upset by one breakdown. The IQR answers the second: a narrow box means most journeys take about the same time. Putting two box plots on one scale lets her compare both at a glance, and the outlier rule separates “unusual day” from “normal variation”.

Box plots are especially good for comparisons. Five, ten or twenty groups can sit side by side on the same axis, which would be cluttered with histograms. They also work for moderate sample sizes where a histogram’s shape would depend heavily on the choice of classes.

When is a box plot not the right tool? A box plot hides a lot. It does not show how many observations there are: a box built from 15 values looks the same as one from 15,000. It cannot show two peaks: a bimodal distribution, for example journey times that are either 20 or 50 minutes depending on traffic, can produce a box plot that looks perfectly ordinary. And it hides gaps and clusters. For a single data set where shape matters, a histogram or dotplot is more informative. A good habit is to look at a histogram or dotplot first, then use box plots for the comparison.

Setting it up

Each route has 15 values, so the median is the 8th value. The lower half is the 7 values below it, so \( Q_1 \) is the 4th value; the upper half is the 7 values above it, so \( Q_3 \) is the 12th value.

StatisticRoute ARoute B
Minimum2218
\( Q_1 \) (4th value)2726
Median (8th value)3136
\( Q_3 \) (12th value)3545
Maximum5853
IQR819
Range3635
Mean32.435.5 (to 1 d.p.)

Notice that the ranges are almost the same (36 and 35 minutes). If Amira looked only at the range, the routes would seem equally variable. The IQR tells a very different story, because the range for route A is driven by one breakdown.

Solving it

Worked example

Example 1 (five-number summary and outliers for route A). Find the five-number summary for route A, apply the 1.5 × IQR rule, and state where the whiskers end.

Step 1Ordered data: 22, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 37, 39, 58. Median (8th) = 31. \( Q_1 \) = 4th = 27. \( Q_3 \) = 12th = 35.
Step 2Five-number summary: 22, 27, 31, 35, 58. IQR \( = 35 – 27 = 8 \).
Step 3Fences: lower \( = 27 – 1.5 \times 8 = 15 \); upper \( = 35 + 1.5 \times 8 = 47 \).
Step 4Only 58 lies outside the fences, so it is an outlier. The left whisker runs to 22 (the minimum); the right whisker stops at 39, the largest value that is not an outlier, and 58 is plotted as a separate point.

Route A: median 31 minutes, IQR 8 minutes, with one outlier at 58 minutes.

Worked example

Example 2 (route B and the comparison). Find the five-number summary for route B, check for outliers, and compare the two routes in context.

Step 1Ordered data: 18, 20, 23, 26, 29, 31, 34, 36, 38, 40, 42, 45, 47, 50, 53. Five-number summary: 18, 26, 36, 45, 53. IQR \( = 45 – 26 = 19 \).
Step 2Fences: \( 26 – 1.5 \times 19 = -2.5 \) and \( 45 + 1.5 \times 19 = 73.5 \). No values lie outside, so there are no outliers; the whiskers run from 18 to 53.
Step 3Centre: the median journey on route A (31 minutes) is 5 minutes shorter than on route B (36 minutes).
Step 4Spread: the IQR for route A (8 minutes) is less than half that for route B (19 minutes), so route A’s journey times are much more consistent. Route B has the single fastest journey (18 minutes) but also many slow ones.

Route A is faster on a typical day and far more predictable; its only bad day was an unusual breakdown.

Worked example

Example 3 (effect of the outlier on mean and median). Remove the 58-minute day from route A. How do the mean and the median change?

Step 1Sum of all 15 values \( = 486 \), so the mean is \( 486/15 = 32.4 \) minutes.
Step 2Without 58: sum \( = 428 \) for 14 values, mean \( = 428/14 \approx 30.6 \) minutes.
Step 3Median of the 14 remaining values: average of the 7th and 8th, \( (30+31)/2 = 30.5 \) minutes, down from 31.

One breakdown moved the mean by 1.8 minutes but the median by only 0.5 minutes, which is why box plots are built on the median and quartiles.

Statistics Made Simple Practice Questions coverMake box plots and the five-number summary automatic with the Practice Questions book: 1,569 questions, all fully worked.Get 1,569 questions · $9

What the answer tells us

Figure 1 puts both box plots on one scale. The route A box is short and sits to the left; the route B box is long and sits to the right. That one picture answers both of Amira’s questions: route A is usually quicker and much more predictable.

Daily journey times on two bus routes (minutes, 15 weekdays each)
Route ARoute BOutlier
1015202530354045505560Journey time (minutes)Outlier 58Route A2227313539Route B1826364553
Figure 1. Route A is faster on a typical day (median 31 v 36 minutes) and far more consistent (IQR 8 v 19 minutes); its one very slow day, 58 minutes, is plotted separately as an outlier. (The figures are illustrative.)

A practical reading. Suppose Amira needs to arrive within 35 minutes of leaving home. On route A, 12 of 15 journeys (80%) took 35 minutes or less. On route B, only 7 of 15 (about 47%) did. If she allows 40 minutes, route A worked on 14 of 15 days and route B on 10 of 15. For someone who cares about being on time, the narrower box is worth more than the occasional very fast trip on route B.

Reasonableness check. The shape hints from the box plots match the data. In route A the median (31) sits almost in the middle of the box (27 to 35), and the whiskers are similar in length apart from the outlier, so the bulk of the data is fairly symmetric. In route B the median (36) is a little nearer \( Q_3 \) than \( Q_1 \), and the whiskers are about equal, so it is roughly symmetric too, just wider. A box plot can suggest skew: a long right whisker and a median close to \( Q_1 \) point to right skew.

Sensitivity. Should the outlier be removed? Not automatically. The breakdown really happened, and if breakdowns occur on route A about once every three weeks, that is information Amira needs. Outliers should be investigated, not deleted: keep them if they are genuine, and correct them only if they are recording errors. With only 15 journeys per route, the quartiles are also rough; another three weeks of data could shift them by a minute or two. The conclusion that route A is more consistent, however, rests on a large difference in IQR (8 versus 19 minutes), so it is unlikely to reverse.

Common mistakeThinking that a longer whisker or a bigger part of the box contains more data. Each of the four sections of a box plot (left whisker, left half of the box, right half, right whisker) holds roughly a quarter of the data. A long section means those values are more spread out, not that there are more of them.
Common mistakeRunning the whisker to the outlier. When outliers are shown, the whisker stops at the most extreme value inside the fences (39 for route A), not at the fence itself (47) and not at the outlier (58).
Exam tipWhen asked to compare two box plots, make at least two comparative statements in context: one about centre (“the median journey time for route A is 5 minutes lower than for route B”) and one about spread (“route A’s IQR of 8 minutes is less than half of route B’s 19 minutes, so its times are more consistent”). Mention outliers if there are any. AP Statistics, IB and Cambridge mark schemes expect comparative language and context, not two separate descriptions[4].

Our Statistics Made Simple textbook covers quartiles, box plots, outliers and choosing the right summary statistics step by step, and the Statistics Made Simple Practice Questions book gives you hundreds of box plot questions with fully worked answers.

Statistics Made Simple bundle coverMaster descriptive statistics with both Statistics Made Simple books for $16.Both books · $16

Practice questions

Try each question before opening the worked answer. The last one is written in exam style with a mark scheme.

EasyQ1. Find the five-number summary and IQR of: 12, 15, 17, 18, 20, 21, 24, 26, 40. Show worked answer
9 values, so the median is the 5th value: 20.
Lower half 12, 15, 17, 18: \( Q_1 = (15+17)/2 = 16 \). Upper half 21, 24, 26, 40: \( Q_3 = (24+26)/2 = 25 \).
Five-number summary: 12, 16, 20, 25, 40. IQR \( = 25 – 16 = 9 \).
EasyQ2. For the data in Q1, is 40 an outlier by the 1.5 × IQR rule? Where would the right whisker end? Show worked answer
Upper fence \( = 25 + 1.5 \times 9 = 38.5 \).
40 > 38.5, so 40 is an outlier.
The right whisker ends at 26, the largest value that is not an outlier.
MediumQ3. Ten phone batteries last (hours): 3.1, 3.4, 3.8, 4.0, 4.2, 4.5, 4.7, 5.0, 5.6, 7.9. Find the five-number summary and identify any outliers. Show worked answer
Median \( = (4.2+4.5)/2 = 4.35 \).
Lower half 3.1, 3.4, 3.8, 4.0, 4.2: \( Q_1 = 3.8 \). Upper half 4.5, 4.7, 5.0, 5.6, 7.9: \( Q_3 = 5.0 \).
IQR \( = 1.2 \). Fences: \( 3.8 – 1.8 = 2.0 \) and \( 5.0 + 1.8 = 6.8 \).
7.9 > 6.8, so 7.9 hours is an outlier. Five-number summary: 3.1, 3.8, 4.35, 5.0, 7.9.
MediumQ4. A box plot of exam marks has \( Q_1 = 48 \) and \( Q_3 = 62 \). The lowest mark is 25 and the highest is 81. Are either of these outliers? Show worked answer
IQR \( = 62 – 48 = 14 \); \( 1.5 \times 14 = 21 \).
Lower fence \( = 48 – 21 = 27 \); upper fence \( = 62 + 21 = 83 \).
25 < 27, so 25 is an outlier. 81 < 83, so 81 is not an outlier.
ExamQ5. Two classes sit the same test. Class X: min 28, \( Q_1 \) 52, median 60, \( Q_3 \) 66, max 78. Class Y: min 41, \( Q_1 \) 49, median 63, \( Q_3 \) 75, max 88. (a) Find the IQR of each class. (b) Show that class X has an outlier at its minimum. (c) Compare the two distributions in context. [6 marks] Show worked answer
(a) X: \( 66 – 52 = 14 \). Y: \( 75 – 49 = 26 \). [1]
(b) X lower fence \( = 52 – 1.5 \times 14 = 31 \). [1] 28 < 31, so the minimum mark of 28 is an outlier. [1]
(c) The median mark is slightly higher for class Y (63) than for class X (60). [1] Class Y’s marks are much more spread out: IQR 26 compared with 14. [1] So class X performed more consistently, while class Y had a wider spread of results, including the highest mark (88 v 78); class X’s lowest mark of 28 is an unusual result. [1]

Frequently asked questions

Why does my calculator give different quartiles?

There are several accepted methods for quartiles. Some include the median in both halves, some interpolate between values, and some use positions such as \( (n+1)/4 \). With large data sets the differences are tiny; with small ones they can be noticeable. In an exam, use the method your course teaches, and show your working so the examiner can follow it.

Is the 1.5 × IQR rule the only way to find outliers?

No. It is a convenient rule of thumb that works well for box plots. Another common rule flags values more than 2 or 3 standard deviations from the mean, which is better suited to roughly normal data. Neither rule proves a value is wrong; they only tell you which values deserve a closer look.

Can a box plot show skewness?

It can suggest it. If the median is close to \( Q_1 \) and the right whisker is long, the data are probably skewed to the right. If the median is close to \( Q_3 \) and the left whisker is long, they are probably skewed to the left. But a box plot cannot show whether a distribution has one peak or two, so check with a histogram if shape matters.

Should I report the mean or the median with a box plot?

A box plot is built on the median and quartiles, so report the median and IQR alongside it. They are resistant to outliers, which is exactly why the box plot uses them. Some software marks the mean with a cross inside the box as an extra detail; that is optional.

References

  1. Illowsky, B. and Dean, S. (2023) Introductory Statistics 2e. Houston, TX: OpenStax. https://openstax.org/details/books/introductory-statistics-2e
  2. Tukey, J. W. (1977) Exploratory Data Analysis. Reading, MA: Addison-Wesley.
  3. NIST/SEMATECH. e-Handbook of Statistical Methods, Exploratory Data Analysis: box plot. https://www.itl.nist.gov/div898/handbook/
  4. College Board. AP Statistics Course and Exam Description. New York: College Board.
  5. Starnes, D. S. and Tabor, J. The Practice of Statistics. New York: W. H. Freeman.
Statistics Made Simple Complete Bundle cover showing both the textbook and practice book
This topic has a full chapter in Statistics Made Simple, with 1,569 worked practice questions in the bundle.Statistics Made Simple Complete Bundle — Textbook + 1,569 Practice Questions
Get it for $16
E

The EconTutorials team writes clear, exam-focused lessons in economics and statistics for A-Level, IB, AP and university students, with more than 13 years of classroom teaching behind every guide and book in the Made Simple series.