From Individual Values to Intervals
In Back-to-Back Stemplots for Two Groups, you used a shared scale to compare two quantitative distributions while keeping individual values visible. A frequency histogram also displays quantitative data, but it groups values into intervals and shows how many observations fall in each interval. It gives a compact view of the distribution rather than showing every data value.
Before drawing, identify the variable and its units, find the range of observed values, and set up consecutive intervals. Each interval is called a bin (or class interval). Choose a bin width that suits the values and the detail you want to show. In this tutorial, the examples use simple widths such as 5 or 10 units; choosing among different widths in more detail is the topic of the next tutorial.
A frequency histogram has a horizontal axis labeled with the quantitative variable and units, and a vertical axis labeled with frequency or count. The horizontal scale marks the bin boundaries. The vertical scale begins at zero and uses evenly spaced values that cover the largest frequency. Each bar spans one interval, and its height reaches the frequency for that interval.
The boundary rule matters. A useful convention is to include a bin’s lower boundary and exclude its upper boundary: \([10,15)\) includes values \(x\) such that \(10 \le x < 15\). Then a value exactly equal to 15 goes into the next interval, \([15,20)\), not both intervals. If the largest observation is exactly at the final right boundary, include it in the final bin. State or label the convention clearly enough that a reader can tell where boundary values go.
A Routine for Constructing a Histogram
Keep a tally as you work through the data rather than trying to estimate the bar heights by eye. First set the bin boundaries to cover every observation. Next, assign each value using the same boundary rule, count the values in each bin, and check the total. Then draw one bar per interval, with adjacent bars touching. As in Choosing Between Bar Chart, Pie Chart, and Histogram, the variable’s meaning determines the graph: a histogram is for quantitative values, not categorical labels.
Name the quantitative variable and units. Find the minimum and maximum so the bins cover the full data range.
Choose a bin width and write all boundaries in order. Use a consistent rule for values exactly on a boundary.
Count every observation in exactly one interval. Add the bin frequencies and check that the sum equals the number of observations.
Place bin boundaries on the horizontal axis and frequency on the vertical axis. Draw touching bars to the counted heights, then label the graph with its variable and units.
Equal-width bins make the bar heights easy to compare as counts. Keep the intervals and widths consistent across the graph; do not leave gaps between bars or leave an interval out of the numerical scale. A bar’s height indicates a frequency, not the value of the observations inside it. For instance, a bar over \([20,25)\) with height 4 means four observations are from 20 up to, but not including, 25.
Worked Example: Histogram of Commute Times
Worked Example: Histogram of Commute Times
These invented data are the one-way commute times, in minutes, for 18 people: 12, 14, 15, 17, 19, 20, 20, 22, 24, 25, 25, 27, 28, 30, 31, 33, 34, and 35. Construct a frequency histogram using bins of width 5 minutes.
Set the bins and boundary convention. The observed times range from 12 to 35 minutes. Use \([10,15)\), \([15,20)\), \([20,25)\), and \([25,30)\), followed by a final bin from 30 through 35 minutes, including 35. These bins cover all the observations. Values exactly at 15, 20, 25, or 30 go into the interval that begins at that value.
Count the observations. The first bin contains 12 and 14, so its frequency is 2. The second contains 15, 17, and 19, giving 3. The third contains 20, 20, 22, and 24, giving 4. The fourth contains 25, 25, 27, and 28, also giving 4. The last bin contains 30, 31, 33, 34, and 35, giving 5. The frequency total is \(2+3+4+4+5=18\), which matches the 18 commute times.
| Commute time (minutes) | Frequency |
|---|---|
| 10 to less than 15 | 2 |
| 15 to less than 20 | 3 |
| 20 to less than 25 | 4 |
| 25 to less than 30 | 4 |
| 30 through 35, including 35 | 5 |
| Total | 18 |
Draw the bars. Label the horizontal axis “Commute time (minutes)” and mark 10, 15, 20, 25, 30, and 35. Label the vertical axis “Frequency” and use a scale from 0 through at least 5. Draw five bars with heights 2, 3, 4, 4, and 5 over the intervals in the table. The bars touch because the intervals are consecutive.
The following table is a compact schematic of those heights: each filled square represents one frequency unit. In a hand-drawn graph, use adjacent bars over the numerical intervals rather than treating the bins as separate categories.
| Frequency level | 10–<15 | 15–<20 | 20–<25 | 25–<30 | 30–35 |
|---|---|---|---|---|---|
| 5 | ■ | ||||
| 4 | ■ | ■ | ■ | ||
| 3 | ■ | ■ | ■ | ■ | |
| 2 | ■ | ■ | ■ | ■ | ■ |
| 1 | ■ | ■ | ■ | ■ | ■ |
Check the display. All 18 observations have been counted once, the tallest bar has height 5, and the final bin includes the maximum value of 35 minutes. The histogram shows that the largest count is in the 30-through-35-minute interval. It summarizes these 18 observed commute times; it does not show the individual times within each interval.
Worked Example: Assign Values on Bin Boundaries
Worked Example: Assign Values on Bin Boundaries
A fictional shipping station records package weights, in kilograms: 1.1, 1.4, 1.9, 2.0, 2.0, 2.3, 2.8, 3.0, 3.1, 3.7, 4.0, 4.2, 4.8, and 5.0. Use one-kilogram bins, starting at 1 kilogram, and construct the frequency table needed for a histogram.
Write the intervals first. Use \([1,2)\), \([2,3)\), \([3,4)\), and a final interval \([4,5]\) that includes the right endpoint. Thus, 2.0 belongs in \([2,3)\), 3.0 belongs in \([3,4)\), and 5.0 is counted in the final bin. Values at these boundaries cannot be counted in the bin below and the bin above.
Tally each bin. The values 1.1, 1.4, and 1.9 give frequency 3 in \([1,2)\). The values 2.0, 2.0, 2.3, and 2.8 give frequency 4 in \([2,3)\). The values 3.0, 3.1, and 3.7 give frequency 3 in \([3,4)\). The values 4.0, 4.2, 4.8, and 5.0 give frequency 4 in \([4,5]\).
| Package weight (kilograms) | Frequency |
|---|---|
| 1 to less than 2 | 3 |
| 2 to less than 3 | 4 |
| 3 to less than 4 | 3 |
| 4 through 5, including 5 | 4 |
| Total | 14 |
Finish the histogram. Label the horizontal axis “Package weight (kilograms)” with boundaries 1, 2, 3, 4, and 5. Label the vertical axis “Frequency” and use a scale reaching at least 4. Draw four touching bars with heights 3, 4, 3, and 4. The total \(3+4+3+4=14\) confirms that all 14 recorded weights have been assigned exactly once.
Worked Example: Build Wider Bins for Quiz Scores
Worked Example: Build Wider Bins for Quiz Scores
A fictional group of students earned these quiz scores, in points: 41, 44, 46, 49, 50, 52, 56, 59, 60, 61, 63, 67, 69, and 70. Construct a histogram using bins of width 10 points.
Cover the observed scores. The minimum is 41 and maximum is 70, so use \([40,50)\), \([50,60)\), and a final bin \([60,70]\) that includes 70. The bin width is 10 points in each case. Under this rule, a score of 50 is counted in the second bin, and a score of 60 is counted in the third.
Count and check. The scores 41, 44, 46, and 49 fall in \([40,50)\), so the frequency is 4. The scores 50, 52, 56, and 59 fall in \([50,60)\), also giving 4. The scores 60, 61, 63, 67, 69, and 70 fall in the final bin, giving 6. The total is \(4+4+6=14\), equal to the number of scores listed.
| Quiz score (points) | Frequency |
|---|---|
| 40 to less than 50 | 4 |
| 50 to less than 60 | 4 |
| 60 through 70, including 70 | 6 |
| Total | 14 |
Draw and describe. Mark 40, 50, 60, and 70 on the horizontal axis labeled “Quiz score (points).” Mark frequency from 0 through at least 6 on the vertical axis. Draw touching bars of heights 4, 4, and 6. The two lower score intervals have equal frequencies, while the 60-through-70 interval has the greatest frequency. The graph describes the scores in this group, not all students’ possible quiz scores.
Common Mistakes and Full-Credit Communication
- Leaving gaps between bars. Histograms display consecutive numerical intervals, so the bars touch. Gaps are used for separated categories in a bar chart, not for neighboring bins in a histogram.
- Counting a boundary value twice or not at all. Decide which bin receives an exact boundary value and apply that rule throughout. With intervals \([10,15)\) and \([15,20)\), the value 15 belongs to the second interval.
- Forgetting the maximum at the last boundary. If the maximum equals the right endpoint of the final interval, include it there or extend the bin coverage. Do not silently omit that observation.
- Using bar heights that do not match the counts. Make a frequency table or tally first, then use those frequencies as heights. Check that their sum equals the number of observations.
- Leaving the axes unclear. A complete histogram names the quantitative variable and units on the horizontal axis and identifies frequency on the vertical axis. Its scales should be evenly spaced and cover all bins and counts.
- Making the intervals overlap or skip a range. Consecutive bins should meet at a boundary without sharing values. Every observed value must fall in one and only one bin.
- Describing bar height as a data value. A bar height is a count. Say, “Four recorded weights were from 2 up to but not including 3 kilograms,” rather than suggesting the weights themselves were 4 kilograms.
For full-credit construction, show the bin boundaries and boundary convention, give a frequency count for every interval, and check that the total matches the number of observations. Then label both axes, draw touching bars at the correct heights, and describe any pattern in the context of the variable and its units.
Check Your Understanding
Use a consistent boundary rule and check that the bins cover every value.
- Using bins \([5,10)\) and \([10,15)\), which bin contains an observation equal to 10?
- A data set has 22 observations. What should the sum of the frequencies in its histogram bins be?
- Why do the bars in a histogram touch, while bars in a usual bar chart are separated?
- For the values 12, 15, 15, 18, and 20, find the frequencies in \([10,15)\) and \([15,20]\), with the final interval including 20.
- What labels should appear on the horizontal and vertical axes of a frequency histogram of plant heights measured in centimeters?