Introduction to Statistics · Chapter 2 · Descriptive Statistics

Box Plots

Compress an entire ordered data set into five numbers, then draw those five numbers as a picture you can compare at a glance.


bookSHelf  ·  Introduction to Statistics  ·  §2.4  ·  a self-paced section

Box Plots · bookSHelf Intro Stats§2.4

Learning objectives — by the end of this section you will be able to

Objectives

  1. List the five numbers a box plot is built from and read each one off a finished plot Def. 2.4.1
  2. Construct a box plot on a scaled number line from a data set or from a five-number summary §2.4.2
  3. Explain what the box, the whiskers, and the median line each say about where the data sits Def. 2.4.2–2.4.3
  4. Interpret a box plot in which two or more of the five numbers are equal §2.4.3
  5. Compare two or more data sets by drawing their box plots on one number line and comparing the spreads §2.4.4
2.4

§2.4.1 — What a Box Plot Shows

A box plot draws a data set's five-number summary against a scaled number line: a box for the middle half of the data, a line for the median, and a whisker reaching out to each extreme.

Nothing else about the data set — not the raw values, not how many there are — goes into the drawing. Five numbers are all it needs.

Box Plots · bookSHelf Intro Stats§2.4

§2.4.1 — the five numbers behind every box plot

Five-Number Summary

Definition 2.4.1 — Five-Number Summary

The five-number summary of a data set is the list of its minimum value, first quartile Q1Q_1, median, third quartile Q3Q_3, and maximum value, given in that order. Together these five values divide the ordered data into four groups, each holding approximately 25 percent of the observations.

Definition 2.4.1: A box plot needs only five numbers out of the whole ordered list, and one of them — the median — need not be a value in the list at all.

Those five numbers are all a box plot needs. Nothing else about the data set — not the individual values, not how many observations there are — goes into the drawing.

Box Plots · bookSHelf Intro Stats§2.4

§2.4.1 — the picture the five numbers make

Box Plot

Definition 2.4.2 — Box Plot

A box plot (also called a box-and-whisker plot) is a graph of a data set's five-number summary drawn against a scaled number line. A rectangular box spans from Q1Q_1 to Q3Q_3, so approximately the middle 50 percent of the data falls inside it; the median is marked inside the box by a line; and two line segments called whiskers extend from the ends of the box out to the smallest and largest data values.

Definition 2.4.2: A box plot is the five-number summary drawn on a scaled number line: box from Q1Q_1 to Q3Q_3, median inside, whiskers to the extremes.

Box Plots · bookSHelf Intro Stats§2.4

Insight Note — reading a box plot as a crowd

The box is the crowd, the whiskers are the stragglers

Picture the data as people queued along a number line. The box fences in the middle half — the crowd. The whiskers are the two people who wandered farthest in each direction. A short box with long whiskers says "most of them are packed together, but a few are way out there."

Box Plots · bookSHelf Intro Stats§2.4

Context Pause — the axis has to earn its keep

Start with a scaled number line

A box plot only means something if the axis underneath it is drawn to scale — equal distances standing for equal amounts. Sketch the box first and pencil in the numbers afterward and you get a picture that looks like data but reports the wrong spreads entirely.

Box Plots · bookSHelf Intro Stats§2.4

Context Pause — a second, common convention

When outliers get their own dots

A plot whose whiskers stop early and whose extremes appear as separate dots is using the outlier convention from the last section, where a value more than 1.5×IQR1.5 \times IQR beyond a quartile gets flagged. Same five numbers underneath — different drawing rule for the ends. In this section every whisker runs all the way out to the true smallest and largest values.

Box Plots · bookSHelf Intro Stats§2.4

§2.4.1 — naming the reach beyond the box

Whisker

Definition 2.4.3 — Whisker

A whisker is one of the two line segments in a box plot that runs from an end of the box out to an extreme value — from Q1Q_1 down to the minimum, and from Q3Q_3 up to the maximum. The whiskers show how far the extreme values reach away from the middle half of the data.

Drawing one: scale a number line, box from Q1Q_1 to Q3Q_3, a median line inside, then a whisker from each end of the box out to the true minimum and maximum. The median can sit anywhere between Q1Q_1 and Q3Q_3 — even exactly on one of them, or on both.

Box Plots · bookSHelf Intro Stats§2.4

Figure 2.4.1 — the idea on a fourteen-value data set

Putting it together

The data — fourteen values, already ordered

1; 1; 2; 2; 4; 6; 6.8; 7.2; 8; 8.3; 9; 10; 10; 11.5

First quartile 2, median 7, third quartile 9; smallest 1, largest 11.5. Five-number summary 1, 2, 7, 9, 11.51,\ 2,\ 7,\ 9,\ 11.5.

Figure 2.4.1 — Box plot of the fourteen-value data set, with the box running from 2 to 9, the median at 7, and whiskers out to 1 and 11.5.

Figure 2.4.1: Box from 2 to 9, median at 7, whiskers out to 1 and 11.5.

The two whiskers extend from the first quartile down to the smallest value and from the third quartile up to the largest value; the median is shown with a dashed line inside the box.

Box Plots · bookSHelf Intro Stats§2.4

Your turn — read a five-number summary off ordered data

Try It Now 2.4.1

Try It Now 2.4.1 — Mai Xiong's fifteen quiz scores

Mai Xiong runs a peer tutoring group. Fifteen quiz scores from the group, already ordered: 4; 5; 5; 6; 7; 7; 8; 8; 8; 9; 9; 10; 10; 10; 10. (a) Write the five-number summary. (b) Describe in words where the box and whiskers would sit.


Step 1 — extremes. Already ordered: minimum =4= 4, maximum =10= 10.

Step 2 — median. 15 values, odd count: the 8th value. 4, 5, 5, 6, 7, 7, 8, 8 — median =8= 8.

Step 3 — quartiles. Q1Q_1 is the median of the lower seven (4, 5, 5, 6, 7, 7, 8) =6= 6; Q3Q_3 is the median of the upper seven (8, 9, 9, 10, 10, 10, 10) =10= 10.

Answer: five-number summary 4, 6, 8, 10, 104,\ 6,\ 8,\ 10,\ 10. The box runs from 6 to 10 with the median line at 8; the left whisker reaches down from 6 to 4. There is no visible right whiskerQ3Q_3 and the maximum are both 10, so the right end of the box is the maximum.

2.4

§2.4.2 — Constructing a Box Plot from the Five-Number Summary

When someone hands you the five numbers, drawing the plot is mechanical: scale the axis, box in the quartiles, mark the median, run a whisker to each extreme.

The interesting work is in what you can then say about the data.

Box Plots · bookSHelf Intro Stats§2.4

Your turn — build the five-number summary from raw data

Try It Now 2.4.2

Try It Now 2.4.2 — pages in 40 books on a shelf

136, 140, 178, …, 512 (40 values, ordered). Construct a box plot and state the interquartile range.


Extremes. minimum =136= 136, maximum =512= 512.

Median — average of the 20th and 21st values, 318 and 326: Median=318+3262=322\text{Median} = \dfrac{318+326}{2} = 322

Q1Q_1 — average of the 10th and 11th, 234 and 240: Q1=234+2402=237Q_1 = \dfrac{234+240}{2} = 237

Q3Q_3 — average of the 30th and 31st, 392 and 398: Q3=392+3982=395Q_3 = \dfrac{392+398}{2} = 395

IQR=395237=158IQR = 395-237 = 158

Five-number summary 136, 237, 322, 395, 512136,\ 237,\ 322,\ 395,\ 512. The median sits left of centre inside the box — the third quarter of the books is more spread out than the second.

Box Plots · bookSHelf Intro Stats§2.4

§2.4.2 — reading a plot you are handed, not building one

Worked example — heights of 40 students

Example 2.4.1 — heights of 40 statistics students

Valeria Ocampo measured the heights (inches) of 40 students: minimum 5959, Q1=64.5Q_1 = 64.5, median 6666, Q3=70Q_3 = 70, maximum 7777.


(a) Share of each quarter. About 25 percent — that is what the quartiles are for: three cut points splitting the ordered data into four equal-sized groups.

(b) Spread of each quarter — subtract the bounding numbers:

64.559=5.564.5-59=5.5 first

6664.5=1.566-64.5=1.5 second

7066=470-66=4 third

7770=777-70=7 fourth

Ten students between 64.5 and 66 inches are packed into an inch and a half of axis; ten students above 70 inches are strung out over seven inches.

Box Plots · bookSHelf Intro Stats§2.4

§2.4.2 — the same plot, three more questions

Worked example — continued

Example 2.4.1 — heights of 40 statistics students (continued)

(c) Range. 7759=1877-59=18

(d) Interquartile range. IQR=7064.5=5.5IQR = 70-64.5=5.5

(e) 59–65 or 66–70 — which holds more? 59 to 65 stretches past Q1=64.5Q_1=64.5, so it holds more than 25 percent; 66 to 70 runs from the median to Q3Q_3 — exactly 25 percent. 59 to 65 holds more.

(f) Middle 50 percent. That is exactly the box — the interquartile range: 5.5 inches.

Each quarter holds about 25% of the data no matter how wide it looks on the axis — the gap between two of the five numbers measures spread, not count.

Box Plots · bookSHelf Intro Stats§2.4

Try it in rāSHio — measuring the five numbers instead of computing them

Open rāSHio and paste the forty heights into File → Delimited List… — the semicolons parse as-is. Choose Stats → Summary Statistics and the five numbers this example hands you come back measured rather than given: smallest 59, Q1=64.5Q_1 = 64.5, median 66, Q3=70Q_3 = 70, largest 77. Then choose Graph → Box Plot to draw them — box from 64.5 to 70, median line at 66, whiskers out to 59 and 77, exactly what the worked example described.

Box Plots · bookSHelf Intro Stats§2.4

Figure 2.4.3

Drawing a box plot in rāSHio

Graph → Box Plot

Choosing Graph → Box Plot builds the box, the median line, and both whiskers from a column of data. The walkthrough narrates a different data set, and rāSHio applies the outlier convention from the previous section, so one extreme value in the clip's demo data is drawn as its own dot rather than reached by a whisker. The forty heights have no value beyond their fences, so running the same steps on them gives whiskers out to 59 and 77, as described above.

2.4

§2.4.3 — When Some of the Five Numbers Coincide

For some data sets, two or more of the five numbers turn out to be equal. Nothing is broken when this happens — a box plot with a missing piece is telling you something specific.

A stack of identical values is sitting at that spot, big enough to swallow one of the cut points.

Box Plots · bookSHelf Intro Stats§2.4

Figure 2.4.4 — a whisker and a median line both vanish

When the box swallows a cut point

The setup

Minimum and Q1Q_1 both 1; median and Q3Q_3 both 5; maximum 7. Read the picture back into words: at least 25% of the values equal 1 (no left whisker — the box starts at the minimum), 25% lie between 1 and 5, at least 25% equal 5 (no dashed median line), and the top 25% fall between 5 and 7.

Figure 2.4.4: Minimum =Q1=1=Q_1=1, median =Q3=5=Q_3=5 — the left whisker and the median line both disappear.

Box Plots · bookSHelf Intro Stats§2.4

Insight Note — reading absence as a finding

A missing whisker is data, not an error

When the box ends flush against the minimum, the graph is telling you that a quarter of the data is piled on that one value. The absence of a line is the finding.

Box Plots · bookSHelf Intro Stats§2.4

Your turn — read a coincidence back into words

Try It Now 2.4.3

Try It Now 2.4.3 — Nathan Whitfield's five-number summary

Nathan reports the five-number summary 3, 3, 6, 9, 153,\ 3,\ 6,\ 9,\ 15. (a) Where does the box sit, and which usual piece is missing? (b) What percentage of the data equals 3? Between 9 and 15, inclusive?


Match the roles. minimum =3=3, Q1=3Q_1=3, median =6=6, Q3=9Q_3=9, maximum =15=15 — the minimum and Q1Q_1 coincide.

Answer (a): The box runs from 3 to 9 with the median line at 6. There is no left whisker — the box begins at the minimum. The right whisker runs from 9 to 15, long: six units of whisker against six of box.

Answer (b): At least 25% of the data equals 3 (the minimum and Q1Q_1 coincide). About 25% falls between 9 and 15 — the fourth quarter, spread thinly since it covers as much axis as the entire box.

2.4

§2.4.4 — Comparing Two Data Sets on One Number Line

Box plots earn their keep when you draw more than one of them against the same number line.

Two lists of numbers side by side tell you almost nothing; two boxes stacked on a shared axis tell you immediately which group is higher, which is more spread out, and which has the longer reach.

Box Plots · bookSHelf Intro Stats§2.4

Your turn — one full construction, start to finish

Try It Now 2.4.4

Try It Now 2.4.4 — heights of 20 boys in a class

66, 66, 67, 67, 68, 68, 68, 68, 68, 69, 69, 69, 70, 71, 72, 72, 72, 73, 73, 74 (ordered). Construct a box plot and state the spread of the middle 50 percent.


Extremes. minimum =66=66, maximum =74=74.

Median — 10th and 11th, both 69: M=69+692=69M=\dfrac{69+69}{2}=69

Q1Q_1 — 5th and 6th, both 68: Q1=68Q_1=68

Q3Q_3 — 15th and 16th, both 72: Q3=72Q_3=72

IQR=7268=4IQR = 72-68=4

Five-number summary 66, 68, 69, 72, 7466,\ 68,\ 69,\ 72,\ 74. The middle 50 percent spans just 4 inches; the median sits left of centre, so the third quarter is more spread out than the second.

Box Plots · bookSHelf Intro Stats§2.4

§2.4.4 — the same axis, two classes

Worked example — day class vs. evening class

20 day-class and 22 evening-class test scores. Find the five-number summary for each, and the percentage of data in each quarter.

DayEvening
Minimum3225.5
Q1Q_15678
Median74.581
Q3Q_382.589
Maximum9998
IQR26.511

Table: Five-number summaries for the day and evening class test scores.

The quartiles cut each set into four quarters holding about 25% each — the boundary values inflate the day class's hand count slightly, since a score sitting exactly on a cut point is counted on both sides of it.

Box Plots · bookSHelf Intro Stats§2.4

§2.4.4 — which class is more spread out?

Worked example — continued

Figure 2.4.5 — both classes on one number line

Day class IQR=82.556=26.5IQR = 82.5-56=26.5; evening class IQR=8978=11IQR = 89-78=11. The day class has the wider spread for the middle 50 percent — more than twice the evening class's — so there is far more variability among the middle half of the day scores.

The evening class's middle half is packed into eleven points — most of that class scored within a narrow band — but its long left whisker down to 25.5 shows a couple of students trailed a long way behind.

Box Plots · bookSHelf Intro Stats§2.4

Try it in rāSHio — two five-number summaries, one shared axis

Two data sets on one axis is the comparison box plots exist for, and it is where the tool saves more than arithmetic. Paste the day-class scores into File → Delimited List…, then the evening-class scores into a second column. Run Stats → Summary Statistics for both five-number summaries side by side, then choose Graph → Box Plot and switch the dialog from Single to Stacked mode — that lets you pick a second column, and it draws both plots against a single shared scale. The evening class sitting higher through its middle half while reaching farther down at the bottom is visible at a glance, and not visible at all from two lists of numbers.

2.4

§2.4.5 — Box Plots for Strongly Skewed Data

Not every data set is bunched neatly in the middle. When a few values are enormous compared with the rest, the box plot shows it in a shape you learn to recognise instantly.

A box shoved hard to one side of the axis, with one very long whisker trailing away from it.

Box Plots · bookSHelf Intro Stats§2.4

Your turn — the full procedure, unaided

Try It Now 2.4.5

Try It Now 2.4.5 — Camila Reyes's fifteen values

0, 5, 5, 15, 30, 30, 45, 50, 50, 60, 75, 110, 140, 240, 330 (ordered). Order the data, find the median, then each quartile, then draw the box and whiskers.


Median — 15 values, the 8th: 0, 5, 5, 15, 30, 30, 45, 50. Median =50=50.

Q1Q_1 — median of the lower seven (0, 5, 5, 15, 30, 30, 45): Q1=15Q_1=15.

Q3Q_3 — median of the upper seven (50, 60, 75, 110, 140, 240, 330): Q3=110Q_3=110.

Answer: five-number summary 0, 15, 50, 110, 3300,\ 15,\ 50,\ 110,\ 330, IQR=95IQR=95. Right-skewed — the right whisker alone is longer than the entire box.

Box Plots · bookSHelf Intro Stats§2.4

§2.4.5 — a fifteen-value set with one very long reach

Worked example — a strongly skewed data set

Example 2.4.3 — Daniel Boyd and Reid's data

10, 10, 10, 15, 35, 75, 90, 95, 100, 175, 420, 490, 515, 515, 790 (15 values, ordered). Graph a box-and-whisker plot.


Minimum 1010; Q1Q_1 — median of the lower seven (10, 10, 10, 15, 35, 75, 90) =15=15; median — the 8th value =95=95; Q3Q_3 — median of the upper seven (100, 175, 420, 490, 515, 515, 790) =490=490; maximum 790790.

Answer: five-number summary 10, 15, 95, 490, 79010,\ 15,\ 95,\ 490,\ 790. The median line is jammed against the left end of a very wide box, and the right whisker runs 300 units past Q3Q_3 — half the values are 95 or less, yet the top quarter climbs all the way to 790. That lopsidedness is the signature of a right-skewed data set.

Box Plots · bookSHelf Intro Stats§2.4

Key Terminology — carry these three forward

Key Terms

box plot

A graph of a data set's five-number summary drawn on a scaled number line: a box from Q1Q_1 to Q3Q_3 with the median marked inside it, plus a whisker out to each extreme value.

five-number summary

The minimum, first quartile, median, third quartile, and maximum of a data set, listed in that order.

whisker

A line segment in a box plot running from an end of the box out to an extreme value, showing how far the extremes reach from the middle half of the data.

Box Plots · bookSHelf Intro Stats§2.4

The headline result

Five numbers, drawn on a scaled axis, are enough to compare entire data sets at a glance.

A box plot trades every individual value for a picture of where the data sits, how tightly it is packed, and how far the extremes reach.

Stack two box plots on one number line and the comparison that two lists of numbers hide becomes visible immediately: which group is higher, which is more spread out, which has the longer reach.

† A missing whisker or a missing median line is not an error — it means a quarter of the data is piled on that single value. The picture is precise even where it looks incomplete.

2.4
Box Plots · bookSHelf Intro Stats§2.4

§2.4 — conclusions

What §2.4 leaves you with

The core idea

A box plot draws the five-number summary — minimum, Q1Q_1, median, Q3Q_3, maximum — on a scaled number line: a box for the middle 50 percent, a line for the median, and a whisker reaching to each extreme. Drawn from a data set or handed a summary, the construction is the same mechanical steps every time.

Watch for

When two of the five numbers coincide, a whisker or the median line vanishes — that absence reports a pile-up, not a mistake. And a box plot reports percentages, not counts, so never compare "how many" between two data sets from their plots alone.

Next: §2.5 — Measures of the Spread of Data, where the box plot's five numbers give way to a single number that measures spread directly. Back to start.