Graphs for One Quantitative Variable
How to draw and read dotplots, stem-and-leaf plots, and histograms, how bin width changes a histogram, and how to choose the right display for a data set.
A graph of a quantitative variable shows its distribution: which values occur and how often. All three graphs here keep the values in their natural order on a number line, from smallest to largest. A dotplot shows every value as a dot. A stem-and-leaf plot shows every value as digits. A histogram groups values into bins and shows how many fall in each.
1What these graphs show
Thirty students wrote down how many minutes they spent on homework last night. Sorted from smallest to largest, the list is:
12, 18, 20, 22, 25, 25, 28, 30, 30, 32, 35, 35, 38, 40, 40, 40, 42, 45, 45, 48, 50, 52, 55, 60, 60, 65, 70, 75, 85, 110
The list holds everything, but it is hard to see the pattern. Are most students near 30 minutes? Near 60? Is anyone far from the rest? A graph answers those questions at a glance. Each of the three graphs below shows how often each value, or each range of values, occurs. That pattern is the distribution of the variable.
Unlike the categories of a bar chart, the values of a quantitative variable have a natural order. Every graph here keeps that order: smaller values on the left (or bottom), larger on the right (or top).
2Dotplots
A dotplot shows each value of a quantitative variable as a dot. Each dot sits above (or beside) the number on the axis that matches its value, and values that are equal or nearly equal stack on top of each other.
To draw one: make a number line that covers the smallest and largest values with even spacing, then place one dot per value. Count the dots at the end; there should be one for every observational unit.
Number of siblings
Fifteen students reported their number of siblings: 0, 1, 1, 1, 2, 2, 2, 2, 3, 3, 4, 1, 0, 2, 5. Describe the dotplot, and use it to find how many students have more than 2 siblings.
- 1Draw a number line from 0 to 5 that covers every value, with equal spacing between whole numbers.
- 2Put one dot above the matching number for each student, stacking dots when values repeat. Count first: 0 appears 2 times, 1 appears 4 times, 2 appears 5 times, 3 appears 2 times, 4 and 5 once each.
- 3Check the total number of dots: \(2 + 4 + 5 + 2 + 1 + 1 = 15\).
- 4More than 2 siblings means 3, 4, or 5: \(2 + 1 + 1 = 4\) dots.
3Stem-and-leaf plots
A stem-and-leaf plot splits each value into two parts. The stem is the first digit or digits. The leaf is usually the single digit that comes after the stem. Both stems and leaves are written in order, from smallest to largest.
Three habits make a stem-and-leaf plot correct: list every stem in the range, even those with no leaves; write each leaf as one digit, in order; and include a key that says what one stem and leaf mean, with units. When one stem holds too many leaves, you can split each stem into two lines, one for leaves 0 to 4 and one for leaves 5 to 9.
Quiz scores out of 50
Eighteen students took a 50-point quiz: 23, 31, 35, 36, 38, 40, 41, 41, 42, 44, 45, 45, 46, 47, 48, 48, 49, 50. Make a stem-and-leaf plot. Then show it with split stems.
- 1Use the tens digit as the stem and the ones digit as the leaf. The stems run from 2 to 5.
- 2Write each leaf next to its stem, in order:
2 | 3,3 | 1 5 6 8,4 | 0 1 1 2 4 5 5 6 7 8 8 9,5 | 0. - 3Add a key:
4 | 1means 41 points. - 4Stem 4 holds 12 leaves, which crowds the picture. Split each stem in two: leaves 0 to 4 on the first line, 5 to 9 on the second. Stem 4 becomes
4 | 0 1 1 2 4and4 | 5 5 6 7 8 8 9.
Leaving out stems 9 and 10 would slide 110 up right under 85 and hide the large gap before it. And without a key, nobody knows whether 4 | 2 means 42 minutes, 4.2 minutes, or 420. List every stem and always write the key.
4Histograms
A histogram places the values into ordered intervals called bins along the horizontal axis. Each bar stands for one bin, and its height is the frequency (count) or relative frequency of the values in that bin.
Make the bins equal in width and start them at a convenient round number. Decide once where a value on a boundary goes. The usual rule, and the one most calculators use, puts a value on a boundary into the bin that starts there: 50 goes in the 50 to 60 bin, not the 40 to 50 bin.
| Bin (minutes) | Count | Relative frequency |
|---|---|---|
| 10 to 20 | 2 | 0.067 |
| 20 to 30 | 5 | 0.167 |
| 30 to 40 | 6 | 0.200 |
| 40 to 50 | 7 | 0.233 |
| 50 to 60 | 3 | 0.100 |
| 60 to 70 | 3 | 0.100 |
| 70 to 80 | 2 | 0.067 |
| 80 to 90 | 1 | 0.033 |
| 90 to 100 | 0 | 0.000 |
| 100 to 110 | 0 | 0.000 |
| 110 to 120 | 1 | 0.033 |
| Total | 30 | 1.000 |
The bars of a histogram touch, because the bins sit next to each other on the number line with no gaps. A gap appears only where a bin holds no values. A histogram can also be drawn sideways, with the bins on the vertical axis and the bars running horizontally; it carries the same information.
Homework minutes
Use the histogram in Figure 3. How many of the 30 students spent at least 50 minutes on homework? What fraction is that? Can you tell how many spent exactly 45 minutes?
- 1“At least 50” means every bin from 50 upward: \(3 + 3 + 2 + 1 + 0 + 0 + 1 = 10\) students.
- 2As a fraction of the class: \(10 \div 30 \approx 0.333\), about one third.
- 3The 40 to 50 bar only says that 7 values landed somewhere from 40 up to 50. A histogram does not show the values inside a bin, so it cannot tell you how many were exactly 45.
Homework minutes
Turn the bin counts from Figure 3 into relative frequencies. What changes on the graph?
- 1Divide each count by the total, 30. The 40 to 50 bin: \(7 \div 30 \approx 0.233\). The 30 to 40 bin: \(6 \div 30 = 0.20\).
- 2Do the same for every bin. The relative frequencies add to 1.
- 3Draw the same bars, but label the vertical axis “Relative frequency,” from 0 to about 0.25.
The value 40 could seem to belong to both “30 to 40” and “40 to 50.” Pick the rule (a boundary value goes in the bin that starts there) and use it for every value. Then check that the counts add to the number of values, here 30.
A bar of height 7 over 40 to 50 says that 7 values fall somewhere in that bin. It does not say what they are. Questions about single values, like “how many said 45?”, need a dotplot, a stem-and-leaf plot, or the data list.
5Bin width changes the picture
The same data can look quite different depending on the width of the bins.
There is no single correct width. Choose bins narrow enough to show where the values pile up and wide enough that most bins hold more than one or two values. If the overall pattern changes a lot when you change the width a little, describe it with care.
If one bin covers 10 to 20 minutes and the next covers 20 to 60, the wide bin collects more values just because it is wider, and its tall bar makes that range look more common than it is. Keep every bin the same width.
6Choosing a display
| Display | Shows each value? | Best for | Watch out for |
|---|---|---|---|
| Dotplot | Yes | Small data sets, especially with repeated values | Gets crowded with many values |
| Stem-and-leaf plot | Yes | Small to medium data sets where you want shape and exact values | Needs a key; awkward for very large or very spread out data |
| Histogram | No, only counts per bin | Medium to large data sets | Bin width changes the look; cannot read single values |
Three data sets
Choose a dotplot, a stem-and-leaf plot, or a histogram for each data set, and give a reason.
- Battery life, in hours, of 2,000 phones tested by a magazine.
- The number of goals a soccer team scored in each of its 14 games.
- The ages of the 26 teachers at a school, where you want to see the shape and still be able to read each age.
- 11. 2,000 values would make a dotplot of thousands of dots and a stem-and-leaf plot pages long. A histogram groups them into bins. Histogram.
- 22. 14 small whole numbers, with many repeats. A dotplot shows each game and the stacks show the common scores. Dotplot.
- 33. 26 two-digit ages. A stem-and-leaf plot shows the shape and keeps every age. Stem-and-leaf plot.
- The axis is a number line with even spacing, labeled with the variable and its units.
- Every value is shown: one dot, one leaf, or counted in one bin.
- A stem-and-leaf plot has a key and keeps its empty stems.
- Histogram bins are equal in width, the bars touch, and boundary values follow one rule.