Histograms
Quick Reference
| Field | Value |
|---|---|
| Textbook | Moore, McCabe, Craig, Introduction to the Practice of Statistics (IPS), 9th edition |
| Location | Chapter 1 (Looking at Data: Distributions), Section 1.2 (Displaying Distributions with Graphs) |
| Subsection | Displaying quantitative variables with a histogram |
| Pages | Page numbers pending faculty verification. |
| Course | MATH380 |
| Role | First graph for quantitative data. It is the picture students will read for the rest of Chapter 1 when they describe shape, center, and spread, and it is the discrete cousin of the density curve in Section 1.4. |
Try This First
Here are the ages, in whole years, of 20 people waiting in a clinic lobby.
4 6 9 11 12 14 18 19 21 22
23 25 27 31 34 36 41 48 52 63
Before reading any definition, do three things on paper.
- Group the ages into classes 10 years wide: 0 to under 10, 10 to under 20, 20 to under 30, and so on up to 60 to under 70. Count how many ages fall in each class.
- Draw a horizontal axis for age and a vertical axis for the count. Over each class, draw a bar whose height is its count, and let neighboring bars touch.
- Predict, before you finish drawing: where will the tallest bar sit, and will the picture lean to one side?
Check your three answers
The counts by class:
| Class (age) | Count |
|---|---|
| 0 to under 10 | 3 |
| 10 to under 20 | 5 |
| 20 to under 30 | 5 |
| 30 to under 40 | 3 |
| 40 to under 50 | 2 |
| 50 to under 60 | 1 |
| 60 to under 70 | 1 |
| Total | 20 |
The counts add to 20, which is the number of people, so no age was dropped or double counted. Two classes tie for the tallest bar, the 10-to-under-20 class and the 20-to-under-30 class, each with a count of 5. The picture has a longer tail stretching to the right, toward the older ages, so it leans (is skewed) to the right.
A wrong turn while grouping is common and worth understanding. The most frequent slip is an age landing in two classes at once, or in none, because the class boundaries were not stated clearly. There is no need to rush this. Deciding once, in plain words, which class an exact boundary value belongs to is what makes a histogram unambiguous, and the next section turns that decision into a rule.
The Big Idea: A Histogram Is a Distribution Drawn to Scale
A quantitative variable can take many distinct values, often too many to list one bar per value. A histogram solves that by slicing the number line into adjacent classes of equal width and reporting how the data spread across those classes.
Think of a histogram as a small process. The input is a list of numbers. The process sorts each number into the one class that contains it, counts the numbers in each class, and draws a bar whose height is that count. The output is a single picture of the whole distribution: where the data cluster, how far they reach, and whether they lean to one side.
Two features make this picture honest and readable:
- The classes are adjacent intervals on one numerical scale, so the bars touch with no gaps. A gap on the axis would falsely claim that no data exist in a region the classes actually cover.
- Every class has the same width, so a taller bar always means more data, never a wider window. Equal width is what lets the eye compare heights directly.
Two representations of the same distribution
| Representation | What it shows |
|---|---|
| Frequency table | Each class and its count, in exact numbers |
| Histogram | The same counts as bar heights, as a shape the eye reads at once |
Translate both directions. Given the table from the opener, you should be able to point to the two tallest bars and the right-leaning tail. Given a finished histogram, you should be able to read each bar height back into a count and rebuild the table.
Prerequisite Hub
Builds on
A histogram pulls together four earlier skills. Each link below opens the node it names.
categorical-vs-quantitative-variables: a histogram is only for quantitative data; categorical data get a bar graph instead.distribution-of-a-variable: a histogram is a distribution made visible, so the idea of a distribution comes first.reading-a-graph-and-its-axes: reading a bar height against a labeled vertical axis is the core act a histogram asks of the reader.proportions-and-percentages: a percent histogram plots each class’s share of the whole, which is part-to-whole arithmetic.
Unlocks
describing-distribution-shape-center-spread: once the histogram exists, the next step is naming its shape, locating its center, and measuring its spread.density-curves: smoothing a percent histogram into a continuous curve leads directly to the density curve of Section 1.4.
Cross-course prerequisites
- (None.) MATH 380 assumes only the introductory arithmetic and graph-reading review.
The Official Definition
Histogram. A histogram displays the distribution of a quantitative variable by dividing the range of values into classes (intervals) of equal width and drawing a bar over each class whose height is the count or the percent of observations falling in that class. Because the classes are adjacent intervals on a numerical scale, the bars touch with no gaps between them.
Source: Moore, McCabe, Craig, IPS 9th edition, Section 1.2 (Displaying Distributions with Graphs); corroborated by OpenStax Introductory Statistics 2e, histogram defined as an x-y display of a data set where x is the data and y is the frequency or relative frequency (https://openstax.org/books/introductory-statistics-2e/pages/2-key-terms).
There are no named theorems for this skill. What follows directly from the definition are two arithmetic facts worth keeping in view:
- The class counts add to the total number of observations $n$. In the opener, $3 + 5 + 5 + 3 + 2 + 1 + 1 = 20$, the number of people. A column of counts that misses this total signals a miscount or a value that slipped through a class boundary.
- A percent histogram plots the relative frequency of each class, the count in the class divided by $n$ and rescaled to a percent. For a class with count $n_{\text{class}}$ out of $n$ total observations:
\[ \text{percent in class} = 100 \cdot \frac{n_{\text{class}}}{n}. \]
Switching from counts to percents changes only the vertical scale, not the shape. The 20-to-under-30 class above holds $\frac{5}{20} = 0.25$ of the data, which is $25\%$; the bars that were tallest in counts are still tallest in percents.
Choosing Classes and Boundary Rules
A histogram is a choice, not a fixed object. Two reasonable people can draw different histograms of the same data by choosing different class widths, and both can be correct. The choices that have to be made:
- How many classes. Too few classes hide the shape (a single wide bar tells you nothing); too many classes leave most bars at height 1 and the picture looks ragged. A common starting point is somewhere between 5 and 20 classes, then adjust until the shape reads clearly.
- Equal width. Every class spans the same number of units. This is what makes bar heights directly comparable.
- A boundary rule. Decide once where an exact boundary value goes. A standard convention is that each class includes its lower endpoint and excludes its upper endpoint, so the classes read “0 to under 10,” “10 to under 20,” and so on. Under that rule, an age of exactly 10 belongs to the 10-to-under-20 class, never to both and never to neither.
State the boundary rule before counting. The most common counting error is an exact boundary value placed in two classes or in none, which throws off every count and the total.
Histogram Versus Bar Graph
These two pictures look similar and are constantly confused, yet they display different kinds of data and follow different drawing rules.
| Feature | Histogram | Bar graph |
|---|---|---|
| Variable type | Quantitative (numbers) | Categorical (labels) |
| Horizontal axis | A numerical scale, divided into classes | A list of category names, in any order |
| Bars | Touch (no gaps), because classes are adjacent | Have gaps, because categories are separate |
| Width meaning | Width is the class interval and is equal across bars | Width carries no meaning |
| Order of bars | Fixed by the number line | Can be rearranged freely |
The single fastest check: if the bars touch and the horizontal axis is a number line, it is a histogram; if the bars are separated and the horizontal axis lists names, it is a bar graph.
Worked Examples
Example 1: From counts to a histogram, and reading it back
Twelve quiz scores out of 20 are recorded:
7 8 9 11 12 12 13 14 15 16 18 19
Build a histogram with classes 5 units wide starting at 5: 5 to under 10, 10 to under 15, 15 to under 20.
Predict first. The scores bunch in the low teens, so expect the middle class to be the tallest.
Build the table. Sort each score into its class using the “include the lower endpoint, exclude the upper” rule.
| Class (score) | Tally | Count |
|---|---|---|
| 5 to under 10 | 7, 8, 9 | 3 |
| 10 to under 15 | 11, 12, 12, 13, 14 | 5 |
| 15 to under 20 | 15, 16, 18, 19 | 4 |
| Total | 12 |
Draw the bars. Over each class draw a bar at its count height; the bars touch because the classes are adjacent.
count
5 | ┌─────┐
4 | │ │┌─────┐
3 | ┌─────┤ ││ │
2 | │ │ ││ │
1 | │ │ ││ │
0 +--┴─────┴─────┴┴─────┴----- score
5 10 15 20
Check against the prediction. The middle class (10 to under 15) is tallest with a count of 5, matching the prediction. The counts add to $3 + 5 + 4 = 12$, the number of scores, so nothing was dropped. Reading the picture back gives exactly the table, which is the test that the histogram is faithful.
Example 2: The same data as a percent histogram
Convert the quiz-score histogram above to percents. The total is $n = 12$.
Predict first. Switching to percents rescales the vertical axis but keeps the shape, so the middle class stays tallest and the percents must add to 100.
Compute each share.
| Class | Count | Proportion $\frac{n_{\text{class}}}{12}$ | Percent |
|---|---|---|---|
| 5 to under 10 | 3 | $3/12 = 0.25$ | $25\%$ |
| 10 to under 15 | 5 | $5/12 \approx 0.417$ | $\approx 41.7\%$ |
| 15 to under 20 | 4 | $4/12 \approx 0.333$ | $\approx 33.3\%$ |
| Total | 12 | 1.00 | 100% |
Check. The proportions add to $0.25 + 0.417 + 0.333 = 1.00$ and the percents add to about 100. The tallest bar is still the middle class. Only the axis label changed, from “count” to “percent.”
Example 3: How the class width changes the picture
Take eight measurements:
2 3 3 4 5 6 8 9
Build two histograms, one with width 2 and one with width 4, and compare.
Width 2 (classes 2 to under 4, 4 to under 6, 6 to under 8, 8 to under 10):
| Class | Count |
|---|---|
| 2 to under 4 | 3 |
| 4 to under 6 | 2 |
| 6 to under 8 | 1 |
| 8 to under 10 | 2 |
Width 4 (classes 2 to under 6, 6 to under 10):
| Class | Count |
|---|---|
| 2 to under 6 | 5 |
| 6 to under 10 | 3 |
What changed. Both histograms describe the same eight numbers, and both sets of counts add to 8. The width-2 picture shows a small dip in the middle (the 6-to-under-8 class is lowest); the width-4 picture flattens that detail into two bars and hides the dip. Wider classes smooth the shape and can erase real structure; narrower classes show more detail but can look ragged with few data. Neither is wrong; they answer the question at different resolutions, which is exactly why the class width is a reported choice.
Example 4: Reading a histogram without the raw data
A histogram of the wait times (in minutes) for 50 callers has these bar heights, read off the vertical count axis:
| Class (minutes) | Count |
|---|---|
| 0 to under 5 | 18 |
| 5 to under 10 | 14 |
| 10 to under 15 | 9 |
| 15 to under 20 | 5 |
| 20 to under 25 | 4 |
Answer three questions from the picture alone.
(a) Do the counts account for all 50 callers? Sum the heights: $18 + 14 + 9 + 5 + 4 = 50$. Yes, every caller is counted once.
(b) What percent of callers waited under 10 minutes? The first two classes cover 0 to under 10 minutes, with $18 + 14 = 32$ callers. As a percent, $\frac{32}{50} \times 100 = 64\%$.
(c) Which way does the distribution lean? The tall bars sit on the left (short waits) and the bars shrink toward the right (long waits), so the distribution is skewed to the right. A few long waits stretch the tail without a matching number of very short-then-shorter waits on the other side.
Common Misconceptions
a histogram is a literal picture of the data values. The height of a bar is not a data value; it is a count of how many values fall in that class. A bar of height 5 does not mean a value of 5, and a tall bar does not mean large numbers. The horizontal position locates the values; the vertical height counts them. Confusing the two leads a reader to say “the data go up to 5” when the tallest bar simply holds 5 observations. Read the two axes as answering two different questions: where (horizontal) and how many (vertical).
a histogram and a bar graph are the same chart. They display different data and follow different rules. A histogram is for quantitative data on a number line and its bars touch; a bar graph is for categorical labels and its bars are separated by gaps. Drawing gaps between histogram bars falsely suggests empty stretches of the number line, and ordering bar-graph categories as if they were numbers reads meaning into an order that is not there. The check is the horizontal axis: a number line means histogram, a list of names means bar graph.
unequal class widths are fine as long as the heights are counts. When classes have different widths, a count height stops being comparable across bars, because a wider class catches more values just by being wider, not because the data cluster there. Equal width is what lets the eye read “taller equals more data.” Statistics handles unequal widths with density (area, not height), which is the bridge to the density curve in Section 1.4; for the histograms in this section, keep every class the same width.
Practice Problems
A chart has a horizontal axis labeled “favorite pizza topping” with bars for pepperoni, mushroom, and cheese, and the bars are separated by gaps. Is this a histogram or a bar graph? Give the one feature that decides it.
Here are 10 test scores: 52, 61, 63, 68, 74, 75, 79, 83, 88, 91. Using classes 10 units wide starting at 50 (50 to under 60, 60 to under 70, and so on), build the count for each class and confirm the total.
A histogram of 40 commute times has class counts 6, 14, 12, 6, and 2. Convert each class to a percent of the 40 commuters and confirm the percents close to 100.
A histogram of 60 daily high temperatures (in degrees Fahrenheit) has these class counts:
| Class | Count |
|---|---|
| 30 to under 40 | 4 |
| 40 to under 50 | 10 |
| 50 to under 60 | 22 |
| 60 to under 70 | 16 |
| 70 to under 80 | 8 |
(a) Confirm the counts account for all 60 days. (b) What percent of days had a high of at least 60 degrees? (c) Is the distribution roughly symmetric, skewed left, or skewed right? Justify the answer from the bar heights.
A data set of 16 reaction times (in tenths of a second) is:
2 2 3 3 4 4 4 5 6 7 8 8 9 9 10 10
(a) Build a histogram with width 1 (classes 2 to under 3, 3 to under 4, and so on through 10 to under 11). (b) Build a histogram with width 3 (classes 2 to under 5, 5 to under 8, 8 to under 11). (c) Explain what the wide-class picture hides that the narrow-class picture reveals, and state which width you would report and why.
Ask Why
- Justify it to a classmate. A friend draws a histogram of exam scores with gaps between the bars, “to make them easier to tell apart.” Explain why the gaps misrepresent quantitative data, and what the touching bars are meant to say about the number line.
- Tie the picture back to the situation. In the clinic-age histogram from the opener, the 20-to-under-30 class is one of the two tallest bars, with a count of 5. Say in plain words what that bar height means about the people in the lobby, and why it does not mean “the most common age is 5.”
- Reverse it (high ceiling). You are handed only a finished percent histogram of 200 observations, with class percents 10, 25, 40, 20, and 5. Recover the count in each class. Then describe a general rule for turning any percent histogram back into counts when the total $n$ is known.
Mastery Checklist
Novice (Level 1-2):
Competent (Level 3-4):
Proficient (Level 5):
Connections
Looking back:
- Categorical vs quantitative variables decides that a histogram is the right display, because the variable is quantitative.
- Distribution of a variable is the idea a histogram makes visible.
- Reading a graph and its axes supplies the axis-reading the histogram depends on.
Looking ahead:
- Describing distribution shape, center, and spread reads those three features off the histogram you now know how to build.
- Density curves smooth a percent histogram into a continuous curve, the next step in Section 1.4.
Real-world connections:
- Test-score reports, income surveys, and wait-time studies are routinely summarized as histograms so a reader sees the spread at a glance.
- The shape a histogram reveals (one peak, two clusters, a long tail) drives which summary number, the mean or the median, describes the center honestly.
Resources
- Textbook (IPS). Moore, McCabe, Craig, Introduction to the Practice of Statistics, 9th edition, Chapter 1, Section 1.2 (Displaying Distributions with Graphs), the histogram for quantitative variables. Page numbers pending faculty verification.
- OpenStax Introductory Statistics 2e, Chapter 2 Key Terms (histogram, frequency, relative frequency): https://openstax.org/books/introductory-statistics-2e/pages/2-key-terms
| Previous | Up | Next |
|---|---|---|
| Distribution of a Variable | Skills Index | Describing Distribution: Shape, Center, Spread |
Last updated: 2026-06-16