Numerical Data Displays and Spread

Learning goals

  • Build a dot plot and a histogram, and tell a histogram from a bar graph
  • Find the five-number summary, with quartiles as the medians of the two halves
  • Compute the interquartile range Q3−Q1Q_3 - Q_1 and explain what it measures
  • Draw a box plot from a five-number summary, and read one back
  • Compare two data sets by center and spread, and describe clusters, skew, and outliers

Dot plots: every value on a number line

The bar graphs of the last lesson sorted data into categories, such as pets or seasons. Quiz scores are different. Each one is a number on a scale, so the picture should be built on a number line. A dot plot draws a number line and puts one dot above it for each value. When a value occurs more than once, its dots stack up in a column. (Some books call this a line plot. It is not the line graph of the last lesson.)

Here are the two classes, 1111 students each:

Class A:5, 6, 6, 7, 7, 7, 7, 7, 8, 8, 9Class B:2, 4, 5, 6, 7, 8, 8, 9, 9, 9, 10\begin{aligned} \text{Class A:}\quad & 5,\ 6,\ 6,\ 7,\ 7,\ 7,\ 7,\ 7,\ 8,\ 8,\ 9 \\ \text{Class B:}\quad & 2,\ 4,\ 5,\ 6,\ 7,\ 8,\ 8,\ 9,\ 9,\ 9,\ 10 \end{aligned}

Each list adds up to 7777, and 77÷11=777 \div 11 = 7, so both means are 77.

Same mean, different spread: two classes as dot plotsClass A’s scores pile up between 5 and 9 around 7. Class B’s scores run from 2 to 10, with most of them between 8 and 10 and a few low scores trailing off to the left. Both means are 7.Class A012345678910mean 7Class B012345678910mean 7
The two classes as dot plots on the same number line, one dot per student. Class A's 11 dots bunch between 5 and 9, while Class B's spread from 2 to 10. The triangle under each line marks the mean, which is 7 for both classes.

Reading a dot plot is counting. The number of dots is the number of values, 1111 in each class here. The tallest stack is the mode, so Class A’s mode is 77, with five dots, and Class B’s mode is 99, with three. (Stacks tied for tallest give several modes, and stacks all the same height give no mode, as in the lesson on mean, median, mode, and range.) Because every value stays visible, a dot plot also shows the shape of the data at a glance. Class A’s dots pile up in one tight group around 77. Class B’s dots crowd together at the high end and trail off toward the low scores on the left.

To draw one by hand, mark a number line from the smallest value to the largest, with evenly spaced marks. Then place one dot per value, stacking repeats with equal gaps so that the stacks can be compared fairly.

Check your understanding

Nine students say how many pets they own: 0,2,1,1,3,1,0,2,10, 2, 1, 1, 3, 1, 0, 2, 1. In a dot plot of these answers, which value has the tallest stack, and how many dots are in it?

Answer choices

Histograms: bars over number intervals

A dot plot gets crowded when there are many values and few of them repeat. Then it helps to group the values into intervals, equal stretches of the number line, and count how many values fall in each. A histogram draws one bar for each interval, and the height of the bar is the number of values in that interval.

Worked example 1 Sort twenty reading times into intervals

Twenty students record how many whole minutes they read last night:

25, 12, 30, 4, 21, 46, 15, 27, 19, 35,20, 8, 25, 38, 15, 23, 41, 29, 18, 32.\begin{aligned} &25,\ 12,\ 30,\ 4,\ 21,\ 46,\ 15,\ 27,\ 19,\ 35, \\ &20,\ 8,\ 25,\ 38,\ 15,\ 23,\ 41,\ 29,\ 18,\ 32. \end{aligned}

Use intervals 1010 minutes wide: 00 to 99, 1010 to 1919, and so on up to 4040 to 4949, which covers the longest time, 4646. Go through the list once and make a tally mark for each time in its interval. Then count them:

MinutesFrequency
00 to 9922
1010 to 191955
2020 to 292977
3030 to 393944
4040 to 494922

Check that no time was lost or counted twice. The frequencies must add to the twenty students:

2+5+7+4+2=20.2 + 5 + 7 + 4 + 2 = 20.

Each frequency becomes the height of one bar.

A histogram groups numbers into intervalsFive touching bars over intervals of 10 minutes, with heights 2, 5, 7, 4, and 2. The tallest bar is over 20 to 29 minutes.024680 to 910 to 1920 to 2930 to 3940 to 49Minutes of readingStudents
The twenty reading times as a histogram. Each bar covers an interval 10 minutes wide, and its height is the number of students in that interval. The bars touch because the intervals sit side by side on the number line.

A histogram looks like a bar graph, but its horizontal axis is different. A bar graph’s bars stand for categories, such as Dog and Cat, so they sit apart and could be put in any order. A histogram’s bars stand for intervals on a number line. Their order is fixed, from the smallest numbers to the largest, and the bars touch because each interval begins where the one before it ends.

Every whole number of minutes belongs to exactly one interval. That is why the labels read 00 to 99 and 1010 to 1919, and not 00 to 1010 and 1010 to 2020: with those labels, a time of exactly 1010 minutes would belong to two bars. Every interval is also the same width. That is what lets the heights be compared fairly, and this course always uses equal widths.

Grouping has a cost. The histogram shows that 77 students read for 2020 to 2929 minutes, but not which times they read. From the histogram alone you cannot find the longest time or the exact median, only the interval each one falls in.

Check your understanding

In the reading-time histogram above, which bar counts a student who read for exactly 2020 minutes, and how many students read for fewer than 2020 minutes?

Answer choices

Quartiles and the five-number summary

The median cuts sorted data into two halves. Cutting each half at its own middle splits the sorted list into four parts of nearly equal size. The three cut points are called the quartiles.

Start with Class B, already sorted. Its 1111 values have a single middle value, the 66th, so the median is 88. Leave that middle value out, and five values are left on each side of it. The lower half is the five values before it, 2,4,5,6,72, 4, 5, 6, 7, and the upper half is the five values after it, 8,9,9,9,108, 9, 9, 9, 10. The first quartile, Q1Q_1, is the median of the lower half, and the third quartile, Q3Q_3, is the median of the upper half:

2, 4, 5Q1, 6, 7, 8median, 8, 9, 9Q3, 9, 102,\ 4,\ \underset{Q_1}{5},\ 6,\ 7,\ \underset{\text{median}}{8},\ 8,\ 9,\ \underset{Q_3}{9},\ 9,\ 10

So Q1=5Q_1 = 5 and Q3=9Q_3 = 9. The three cut points leave two values in each of four groups: 22 and 44, then 66 and 77, then 88 and 99, then 99 and 1010. Each group holds about a quarter of the places in the sorted list, which is where the name quartile comes from. This works because each quartile is found exactly the way the median was. The median halves the whole list, and each quartile halves one of those halves.

With an even count, nothing is left out. The two middle values give the median, as in the lesson on the mean and median, and the list splits cleanly into a first half and a second half. Here is the whole method:

  1. Sort the values from least to greatest.
  2. Find the median.
  3. Split the list into halves. With an even count, take the first half and the second half. With an odd count, leave the middle value out of both halves.
  4. Q1Q_1 is the median of the lower half, and Q3Q_3 is the median of the upper half. A half with an even count takes the mean of its two middle values, just as the median does.

The list needs at least two values, or there are no halves to work with. Books and calculators do not all agree on step 3: some keep the middle value in both halves when the count is odd, which can give slightly different quartiles. Every quartile in this course leaves the middle value out.

The five-number summary lists the minimum, Q1Q_1, the median, Q3Q_3, and the maximum, in that order. For Class B it is 2,5,8,9,102, 5, 8, 9, 10. The same steps give 5,6,7,8,95, 6, 7, 8, 9 for Class A.

Worked example 2 Find the five-number summary of ten waiting times

A rider times the wait for a bus on ten mornings, in minutes: 12,5,20,9,3,14,8,15,6,1112, 5, 20, 9, 3, 14, 8, 15, 6, 11.

Sort first:

3, 5, 6, 8, 9, 11, 12, 14, 15, 20.3,\ 5,\ 6,\ 8,\ 9,\ 11,\ 12,\ 14,\ 15,\ 20.

There are 1010 values, an even count, so the median is the mean of the 55th and 66th values:

median=9+112=10.\text{median} = \frac{9 + 11}{2} = 10.

With an even count nothing is left out. The lower half is 3,5,6,8,93, 5, 6, 8, 9, with middle value 66, and the upper half is 11,12,14,15,2011, 12, 14, 15, 20, with middle value 1414. So Q1=6Q_1 = 6 and Q3=14Q_3 = 14. The smallest value is 33 and the largest is 2020, so the five-number summary is

3, 6, 10, 14, 20.3,\ 6,\ 10,\ 14,\ 20.

Check your understanding

Find Q1Q_1 and Q3Q_3 for these nine values, using this lesson's method: 13,4,18,9,12,21,7,15,1013, 4, 18, 9, 12, 21, 7, 15, 10.

Answer choices

The interquartile range

The range measures spread using the two most extreme values. The interquartile range, or IQR, measures the spread of the middle of the data instead. Class A’s middle scores run from Q1=6Q_1 = 6 to Q3=8Q_3 = 8, a stretch 22 points wide. Class B’s run from 55 to 99, a stretch 44 points wide, twice as wide. That width is the IQR:

IQR=Q3−Q1.\text{IQR} = Q_3 - Q_1.

Like the range, the IQR measures spread, not center, and it is never negative, because Q3Q_3 is never below Q1Q_1. An IQR of 00 is possible. For 1,5,5,5,5,5,5,5,121, 5, 5, 5, 5, 5, 5, 5, 12, both quartiles are 55, so the IQR is 00, yet the range is 1111. The middle of that data is piled on one value, though the values outside the middle still differ.

The IQR has one big advantage over the range: a single extreme value hardly affects it.

Why moving an end value leaves the quartiles alone#

Suppose the student in Class A who scored 55 was marked wrongly and really scored 00. The sorted list becomes

0, 6, 6, 7, 7, 7, 7, 7, 8, 8, 9.0,\ 6,\ 6,\ 7,\ 7,\ 7,\ 7,\ 7,\ 8,\ 8,\ 9.

The 00 is still the smallest value, so it is still first, and every other score keeps its old place in the list. The quartiles are found by place, not by size. With 1111 values, Q1Q_1 is the 33rd value, the median is the 66th and Q3Q_3 is the 99th. Those places still hold 66, 77 and 88, so the IQR is still 8−6=28 - 6 = 2. The range uses the smallest value itself, so it jumps from 9−5=49 - 5 = 4 to 9−0=99 - 0 = 9.

Nothing here depended on the scores being 55 and 00. Change the smallest value of any list to a number that keeps it the smallest, and every value stays in its place in the sorted order. The same holds for the largest value. In a list of six or more values, each half holds at least three values, so the middle of a half is never its first or last value. That means neither quartile is built from the minimum or the maximum, so neither quartile changes, and the IQR stays the same. Only the range moves.

Two conditions come with this. The changed value must stay at its end of the list. If Class A’s 55 becomes 1010, it moves past the other scores, the sorted list becomes 6,6,7,7,7,7,7,8,8,9,106, 6, 7, 7, 7, 7, 7, 8, 8, 9, 10, and Q1Q_1 rises to 77, so the IQR falls to 11. And the list needs at least six values. In 2,4,6,8,102, 4, 6, 8, 10 the upper half is just 88 and 1010, so changing the 1010 to 2020 moves Q3Q_3 from 99 to 1414.

A value that sits far from the rest of the data, like that 00, is called an outlier. One outlier can stretch the range a long way while the IQR barely moves. So when a data set has an outlier, the IQR usually describes its typical spread better than the range does.

Box plots: five numbers as a picture

A box plot, also called a box-and-whisker plot, draws the five-number summary above a number line. To draw one:

  1. Draw a number line that covers the minimum and the maximum, with evenly spaced marks.
  2. Draw a box from Q1Q_1 to Q3Q_3, and a line across the box at the median.
  3. Draw a whisker, a line from each side of the box out to the minimum and to the maximum.

In this lesson the whiskers always reach the minimum and the maximum. Some books stop a whisker early and mark far-off values as separate dots, using a rule for outliers that later courses teach.

The same scores as a dot plot and as a box plotThe box plot’s five marks line up with the dot plot: the minimum 2, the first quartile 5, the median 8, the third quartile 9, and the maximum 10. The left whisker is long because the low scores are spread out.Dot plot012345678910Box plotminQ₁medianQ₃max012345678910
Class B's scores as a dot plot (top) and as a box plot (bottom), on the same scale. The box runs from the first quartile, 5, to the third quartile, 9, with a line at the median, 8. The whiskers reach the lowest score, 2, and the highest, 10.

The three lines of the box and the two whisker ends split the sorted list into four parts of about equal size, counted by place in the list. A longer section does not mean more values. Class B’s left whisker, from 22 to 55, is three times as long as its right whisker, from 99 to 1010, yet each one reaches two of the eleven places besides its quartile: 22 and 44 on the left, 99 and 1010 on the right. A long section means the values there are spread out, and a short one means they are packed together.

Repeated values change how many scores land in each section of the picture. When no value repeats, each section holds about a quarter of them and the box about half. But a value repeated at a quartile sits on that line, so a section can hold far more. Class A has 99 of its 1111 scores from Q1=6Q_1 = 6 to Q3=8Q_3 = 8, because a second 66 and a second 88 sit on the box’s edges. A section can even have zero length, when repeated values make two of the five numbers equal; then every value in that section is the same number.

The box plot gives up detail for that summary. The dot plot shows that three students scored 99, but the box plot shows neither that nor how many students there are.

Worked example 3 Draw a box plot of the waiting times

Worked Example 2 found the five-number summary of the ten waiting times: 3,6,10,14,203, 6, 10, 14, 20.

The values run from 33 to 2020, so draw a number line from 00 to 2020 with a mark every 22 minutes. Draw the box from Q1=6Q_1 = 6 to Q3=14Q_3 = 14, with a line across it at the median, 1010. Then draw the left whisker out to the minimum, 33, and the right whisker out to the maximum, 2020.

Drawing a box plot from five numbersFive marks at 3, 6, 10, 14, and 20 minutes, joined into a box from 6 to 14 and two whiskers.minQ₁medianQ₃max02468101214161820
A box plot of the ten waiting times. The box runs from 6 to 14 with the median at 10. The right whisker, from 14 to 20, is twice as long as the left whisker, from 3 to 6.

Now read the picture. The right whisker, 1414 to 2020, covers 66 minutes, while the left whisker, 33 to 66, covers only 33. No two times repeat, so each whisker holds two of the ten mornings besides its quartile, and the longest waits are spread out while the shortest are close together.

Check your understanding

In the waiting-time box plot of Worked Example 3, what is the interquartile range, and roughly what fraction of the ten mornings lie inside the box?

Answer choices

Comparing data sets: center, spread, and shape

To compare two data sets, look at their centers, then their spreads, then their shapes. Box plots drawn on one shared number line make this quick.

Same mean, different middle and spreadClass A’s box plot is short and centered near 7, with equal whiskers. Class B’s box is twice as wide, with its median at 8 near the right end of the box and a long left whisker reaching 2.Class AClass B012345678910
Box plots of Class A (top) and Class B (bottom) on one number line. Class A's box is narrow and sits around 7. Class B's box is twice as wide, its median is higher, at 8, and its left whisker stretches down to 2.

Worked example 4 Compare the two classes

Use the five-number summaries, 5,6,7,8,95, 6, 7, 8, 9 for Class A and 2,5,8,9,102, 5, 8, 9, 10 for Class B.

Start with the centers. The medians are 77 and 88, so the middle student of Class B scored higher, even though both means are 77.

Next, the spreads. The IQRs are 22 and 44, and the ranges are 44 and 88. By either measure, Class B’s scores are twice as spread out.

Last, the shapes. Class A’s median sits in the middle of its box, and its two whiskers are the same length, so the scores spread out evenly on both sides. Class B’s median sits near the right end of its box, and its left whisker is long, so its scores crowd together near the top and trail off toward the low end. Those low scores pull Class B’s mean down to 77, below its median of 88, much as an outlier pulled the mean in the lesson on the mean and median.

Describing shape uses a few everyday words, and in this course they describe what you see rather than anything you calculate. A cluster is a group of values close together, like Class B’s six scores from 88 to 1010, and a gap is a stretch with no values at all. When one side of the data stretches out much further than the other, the data is skewed toward that side. Class B has a long tail on the left, so it is skewed left. When the two sides look roughly like mirror images, as in Class A, the data is roughly symmetric. An outlier is judged by eye here: say which value looks far from the rest, and why. Later courses give a rule for exactly how far is far enough.

Check your understanding

Two gardens grow tomato plants. Heights in centimeters: Garden P has minimum 3030, Q1=42Q_1 = 42, median 5050, Q3=56Q_3 = 56, maximum 6060. Garden R has minimum 2020, Q1=35Q_1 = 35, median 5050, Q3=66Q_3 = 66, maximum 8080. Which statement do the summaries support?

Answer choices

Common mistakes

Practice

Multiple Choice Questions (MCQ)

Progressively harder sets of questions. Each opens on its own page.

Core practice

Practice problems at the level of the course, to be worked out on paper. Hints one at a time, then the answer or the full worked solution, with your progress kept in this browser.

Core practice Work it out on paper 10 problems Start →
More practice (optional)

Extra sets, as hard as the Challenge set. Each one opens on its own page.

More resources (optional)

Other explanations of this lesson, if you want a second take.

A bit of history (optional)

Before computers, a person with a fresh list of numbers faced a slow job. A careful graph could take a long time to draw. A table of numbers was quicker, but it hid the shape of the data.

John Tukey, an American mathematician, wanted pictures that needed only a pencil and paper. Around 1970 he began sketching what he called a box-and-whisker plot. It used just five numbers: the two ends, the middle, and the middle of each half. A box covered the middle of the data, with a line inside it at the median. Thin lines, the whiskers, reached out toward the ends.

Tukey shared the idea in a 1977 book about exploring data. He compared that work to a detective’s. A detective looks for clues before deciding what happened. Tukey wanted a quick sketch first, so that the shape of the data could suggest which questions to ask.

The box plot you drew for the waiting times is that same five-number sketch. It still needs only a pencil, a number line and five numbers.

Your progress

See all your progress →