AP Statistics · Study guide

The axis is a number line.

AP® Statistics · Unit 1 · Exploring One-Variable Data and Collecting Data

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.

The idea in one paragraph

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.

Figure 1. Each dot is one student, placed above that student’s number of minutes. Equal values stack, so tall stacks show common values. You can still read off every single value.

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.

Worked Example 1 Build and read a dotplot

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.

  1. 1Draw a number line from 0 to 5 that covers every value, with equal spacing between whole numbers.
  2. 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.
  3. 3Check the total number of dots: \(2 + 4 + 5 + 2 + 1 + 1 = 15\).
  4. 4More than 2 siblings means 3, 4, or 5: \(2 + 1 + 1 = 4\) dots.
Answer: The tallest stack is at 2 siblings (5 students). Four of the 15 students have more than 2 siblings.

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.

Figure 2. The stems run down the left in order, and each value’s last digit is written as a leaf beside its stem, smallest to largest. Turned on its side, the rows of leaves look like a histogram, and every original value can still be read back.

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.

Worked Example 2 Build a stem-and-leaf plot

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.

  1. 1Use the tens digit as the stem and the ones digit as the leaf. The stems run from 2 to 5.
  2. 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.
  3. 3Add a key: 4 | 1 means 41 points.
  4. 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 4 and 4 | 5 5 6 7 8 8 9.
Answer: Four stems, or seven lines with split stems. Most scores sit in the 40s, and the split version shows that the upper 40s are the most crowded part.
Common Mistake 1 · Skipping empty stems or the key

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.

Figure 3. Each bar covers one bin of the number line, and its height is how many values fall in that bin. The bars touch because the bins are next to each other on the number line. The two empty bins, 90 to 100 and 100 to 110, are part of the picture.

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)CountRelative frequency
10 to 2020.067
20 to 3050.167
30 to 4060.200
40 to 5070.233
50 to 6030.100
60 to 7030.100
70 to 8020.067
80 to 9010.033
90 to 10000.000
100 to 11000.000
110 to 12010.033
Total301.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.

Worked Example 3 Read a histogram

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. 1“At least 50” means every bin from 50 upward: \(3 + 3 + 2 + 1 + 0 + 0 + 1 = 10\) students.
  2. 2As a fraction of the class: \(10 \div 30 \approx 0.333\), about one third.
  3. 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.
Answer: 10 students, about 33% of the class. The histogram cannot say how many spent exactly 45 minutes; the dotplot or the stem-and-leaf plot can (2 students).
Worked Example 4 From counts to a relative frequency histogram

Homework minutes

Turn the bin counts from Figure 3 into relative frequencies. What changes on the graph?

  1. 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\).
  2. 2Do the same for every bin. The relative frequencies add to 1.
  3. 3Draw the same bars, but label the vertical axis “Relative frequency,” from 0 to about 0.25.
Answer: The bars keep their shape; only the vertical scale changes. The 40 to 50 bin holds about 23% of the students.
Common Mistake 2 · Counting a boundary value twice, or in the wrong bin

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.

Common Mistake 3 · Reading exact values from a histogram

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.

Figure 4. Narrow bins make the picture jagged, with many bars of 0, 1 or 2. Wide bins lump different values together and hide where the data pile up. The middle choice shows the pattern best. Changing the bin width changes how a histogram looks, so try more than one.

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.

Common Mistake 4 · Using bins of different widths

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

DisplayShows each value?Best forWatch out for
DotplotYesSmall data sets, especially with repeated valuesGets crowded with many values
Stem-and-leaf plotYesSmall to medium data sets where you want shape and exact valuesNeeds a key; awkward for very large or very spread out data
HistogramNo, only counts per binMedium to large data setsBin width changes the look; cannot read single values
Worked Example 5 Pick a display

Three data sets

Choose a dotplot, a stem-and-leaf plot, or a histogram for each data set, and give a reason.

  1. Battery life, in hours, of 2,000 phones tested by a magazine.
  2. The number of goals a soccer team scored in each of its 14 games.
  3. The ages of the 26 teachers at a school, where you want to see the shape and still be able to read each age.
  1. 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.
  2. 22. 14 small whole numbers, with many repeats. A dotplot shows each game and the stacks show the common scores. Dotplot.
  3. 33. 26 two-digit ages. A stem-and-leaf plot shows the shape and keeps every age. Stem-and-leaf plot.
Answer: Histogram for large data sets, dotplot for small sets with repeated values, stem-and-leaf plot when you want the shape and the exact values.
Checklist for any graph of a quantitative variable
  1. The axis is a number line with even spacing, labeled with the variable and its units.
  2. Every value is shown: one dot, one leaf, or counted in one bin.
  3. A stem-and-leaf plot has a key and keeps its empty stems.
  4. Histogram bins are equal in width, the bars touch, and boundary values follow one rule.