AP Statistics · Topic 1.5 · Reading guide, about 6 min

Histograms, dotplots and stemplots

Build and read histograms, dotplots and stem-and-leaf plots for quantitative data, and see how bin width changes a histogram.

In one minute

Quantitative data need graphs that keep the numbers in order. A histogram, a dotplot and a stem-and-leaf plot all do this: each shows where values are bunched, where they are sparse and how far they spread, without hiding the order of the values.

This topic is about building the graphs and reading them accurately. Describing what they show, in words, is the work of topic 1.6.

Key terms

Histogram
A graph for quantitative data where bars over ordered intervals show how many values fall in each interval; the bars touch.
Bin
One interval of values in a histogram, such as 20 up to but not including 30.
Bin width
The length of each interval; all bins in a histogram normally have the same width.
Relative frequency histogram
A histogram whose bar heights are the proportion of values in each bin instead of the count.
Dotplot
A graph that stacks one dot above a number line for each data value.
Stem-and-leaf plot
A display that splits each value into a stem (leading digits) and a leaf (last digit), listed in order.
Key
A note in a stemplot saying what a stem and leaf stand for, such as 2 | 4 means 24 minutes.
Frequency
The number of data values that fall in a bin or at a particular value.

Histograms

A histogram splits the number line into equal-width bins and draws a bar over each bin whose height shows how many values lie in it. The bars touch, because the bins run continuously along a number line with no gaps between categories; the only space you will see is an empty bin, which shows a gap in the data. This is the main visual difference from a bar chart, which is for categories and has gaps.

You need a rule for a value that lands exactly on a bin boundary. A common one is that each bin includes its left endpoint and excludes its right one, so a value of 30 goes into the bin from 30 up to 40, not the bin from 20 up to 30. Say which rule you use. Heights can be counts or relative frequencies (count divided by nn); the shape is identical either way. Some software draws the bars horizontally, with the number line running up the side, which changes nothing about how to read it.

Bin width changes the picture. Wide bins smooth the data and can hide features such as two peaks or gaps. Very narrow bins show every wiggle, including random ones. No bin width is the right one; if a feature appears or disappears when you change the width, be cautious about claiming it.

Dotplots and stemplots

A dotplot puts one dot for each observation above its value on a number line, stacking dots when values repeat. It is quick for small data sets and shows every individual value. A stem-and-leaf plot writes the leading digits as the stem and the final digit as the leaf. For the value 24, the stem is 2 and the leaf is 4. Leaves on each stem are listed in increasing order, and a key explains the scale, for example "2 | 4 means 24 minutes".

All three displays keep the numerical order of the values. That is why they suit quantitative variables and why you must not rearrange the bars, dots or stems the way you could with categories. A stemplot also keeps the exact data, while a histogram only gives counts in intervals.

Choosing a display for a quantitative variable
DisplayBest forKeeps individual values?
DotplotSmall to moderate data sets, repeated valuesYes
Stem-and-leaf plotSmall data sets, when exact values matterYes
HistogramLarger data sets, overall patternNo, only counts in bins

Worked example

Invented data: the times in minutes that 16 students took to finish a puzzle, in order: 12, 15, 17, 21, 22, 22, 24, 28, 31, 33, 35, 36, 38, 41, 47, 52.

Stemplot with stems 1 to 5. Row 1 holds leaves 2, 5, 7. Row 2 holds 1, 2, 2, 4, 8. Row 3 holds 1, 3, 5, 6, 8. Row 4 holds 1, 7. Row 5 holds 2. The key is "2 | 4 means 24 minutes". The leaf counts 3+5+5+2+1=163 + 5 + 5 + 2 + 1 = 16 match nn.

Histogram with bin width 10 (left endpoint included). The bins and counts are 10 to under 20: 3 (values 12, 15, 17); 20 to under 30: 5 (21, 22, 22, 24, 28); 30 to under 40: 5 (31, 33, 35, 36, 38); 40 to under 50: 2 (41, 47); 50 to under 60: 1 (52). The counts total 16. Relative frequencies are 3/16=0.18753/16 = 0.1875, 5/16=0.31255/16 = 0.3125, 0.31250.3125, 2/16=0.1252/16 = 0.125 and 1/16=0.06251/16 = 0.0625, which add to 11.

Now change the bin width to 5. The counts become: 10 to under 15: 1; 15 to under 20: 2; 20 to under 25: 4; 25 to under 30: 1; 30 to under 35: 2; 35 to under 40: 3; 40 to under 45: 1; 45 to under 50: 1; 50 to under 55: 1. These total 1+2+4+1+2+3+1+1+1=161 + 2 + 4 + 1 + 2 + 3 + 1 + 1 + 1 = 16. With width 10 the graph looks fairly flat in the middle; with width 5 the bar at 20 to 25 stands out as a small peak, and the data look more ragged. Both are honest pictures of the same 16 values.

Reading it: most students finished between 20 and 40 minutes, and one finished slowly, in 52 minutes. Always put such statements in context, with the variable and units.

How it connects

  • Back to 1.2: these graphs are for quantitative variables; categorical variables use the bar and pie charts of 1.4.
  • Back to 1.4: a histogram looks like a bar chart but its bars touch and its bins are ordered intervals.
  • Forward to 1.6: you will describe the shape, center, spread and unusual features of these graphs in words.
  • Forward to 1.8: a boxplot summarizes the same kind of data using five numbers.

Common mistakes

  • Leaving gaps between histogram bars. Bars touch. Gaps belong to bar charts of categories.
  • Using a histogram for categories. If the variable is categorical, draw a bar chart.
  • Placing a boundary value in the wrong bin. Pick one rule (usually left endpoint included) and apply it to every value.
  • Reading bar height as the data value. Height is how many values fall in the bin; the horizontal axis holds the values.
  • Forgetting the key on a stemplot. Without it nobody knows whether 2 | 4 means 24 or 2.4.

How it shows up on the exam

  • You are given a list of data and asked to construct a histogram, dotplot or stemplot, or to read counts from one.
  • A question shows two histograms of the same data with different bin widths and asks what changed and what did not.
  • A question asks which display is appropriate for a described variable, or which graph shows a particular feature.

Check yourself

  1. Why does a histogram have no gaps between bars but a bar chart does?
  2. In a stemplot with key "3 | 7 means 37", what values are in the row 4 | 0 2 2 9?
  3. How can using a narrower bin width reveal or hide a feature of the data?
  4. What is the difference between a histogram of counts and a relative frequency histogram?

Practice this topic. AP Practice questions on exactly what this lesson covers, with an explanation for every answer.