COLLEGE STATISTICS • DESCRIPTIVE STATISTICS

Histograms & Distribution Plots — Histograms, Dotplots, and Stem-and-Leaf Plots

Visualizing the shape, center, and spread of quantitative data through three foundational graphical displays.

Historical Context & Motivation

Long before modern computing made data visualization instantaneous, statisticians and scientists grappled with a fundamental challenge: how to compress a large collection of numerical observations into a single, interpretable picture. Raw data tables, no matter how meticulously organized, fail to reveal the overall distributional shape of a dataset—whether values cluster symmetrically, skew toward one tail, or exhibit multiple peaks. The graphical displays we study in this lesson—histograms, dotplots, and stem-and-leaf plots—were each invented to solve this problem, and their historical development mirrors the evolution of statistics itself from a branch of state record-keeping into a rigorous inferential science.

1662
John Graunt's Life Tables
John Graunt published Natural and Political Observations Made upon the Bills of Mortality, one of the earliest systematic analyses of demographic data. Although Graunt did not create histograms, his tabular frequency counts laid the conceptual groundwork for grouping continuous data into categories.
1786
William Playfair's Bar Charts
Scottish engineer William Playfair invented the bar chart and line graph in his Commercial and Political Atlas. His rectangular bar representation for categorical data directly inspired the histogram's visual language of adjacent bars encoding magnitude.
1895
Karl Pearson Coins 'Histogram'
Karl Pearson introduced the term histogram in his University College London lectures, deriving the name from the Greek histos (mast or web) and gramma (drawing). Pearson formalized the histogram as a tool for approximating continuous probability distributions.
1977
John Tukey's Stem-and-Leaf Plot
In Exploratory Data Analysis, John Tukey introduced the stem-and-leaf plot alongside the boxplot. Tukey's philosophy emphasized looking at data before fitting models, and the stem-and-leaf display preserved individual data values while providing a histogram-like shape—a hallmark of exploratory data analysis (EDA).
1990s
Digital Dotplots and Interactive Graphics
With the rise of statistical software (Minitab, JMP, R), the dotplot gained renewed popularity as a display for small-to-moderate datasets. Modern interactive environments allow users to toggle between histograms, dotplots, and density curves, reinforcing the idea that each display offers a complementary perspective on the same distribution.

The central question these plots answer has remained unchanged for over a century: What does the overall pattern of a quantitative variable look like, and what features—shape, center, spread, outliers—characterize its distribution? Understanding these three graphical tools equips you to perform the first—and arguably most critical—step in any statistical analysis: visualizing the data before computing summaries or fitting models.

Core Principles & Definitions

Before constructing any distribution plot, it is essential to internalize several foundational ideas that govern how raw observations are transformed into visual summaries. These principles apply equally to histograms, dotplots, and stem-and-leaf displays, and they guide decisions about bin width, axis scaling, and interpretation.

1

Frequency Distribution

A frequency distribution organizes data by counting how many observations fall within each class or value. It is the numerical backbone behind every histogram and dotplot. Relative frequency divides each count by the total sample size n, expressing proportions that sum to 1.
2

Bins (Class Intervals)

A bin is a contiguous interval on the number line into which observations are grouped. The choice of bin width fundamentally shapes a histogram's appearance: too few bins oversmooth the distribution, while too many create noisy spikes. Common guidelines include Sturges' rule (k ≈ 1 + 3.322 log₁₀ n) and the Freedman–Diaconis rule.
3

Shape Vocabulary

Statisticians describe distributions using a shared vocabulary: symmetric, left-skewed (long tail toward smaller values), right-skewed (long tail toward larger values), unimodal, bimodal, and uniform. Identifying shape is the primary purpose of distribution plots.
4

Data Preservation vs. Aggregation

Histograms aggregate data into bins, losing individual values. Dotplots and stem-and-leaf plots preserve individual observations (or nearly so). This trade-off between detail retention and visual clarity determines which plot is most appropriate for a given sample size and analytical goal.
5

Outliers and Gaps

Distribution plots make outliers—observations far removed from the bulk of the data—immediately visible. Gaps between clusters may indicate distinct subpopulations. These features are often invisible in summary statistics alone, underscoring the importance of graphical exploration.
KEY TAKEAWAY
Think of a distribution plot as an aerial photograph of a city. A histogram is like a satellite image that groups buildings into city blocks—you see the density pattern but lose individual addresses. A dotplot is like a drone photograph where every building is visible but the image becomes unwieldy for a metropolis. A stem-and-leaf plot is a clever compromise: a map that shows every street number while arranging them so the skyline shape emerges. The best analysts choose their 'camera altitude' based on the size and purpose of the dataset.

Visual Explanation — Histogram Anatomy

The diagram below illustrates the anatomy of a histogram constructed from a sample of 30 exam scores. Each bar spans a class interval (bin) of width 10, and its height represents the frequency—the count of observations falling within that interval. Notice how the bars are adjacent with no gaps, signaling that the horizontal axis is a continuous quantitative scale, not a set of discrete categories. The tallest bar (the modal class) indicates the most commonly occurring range of scores, while the single dot far to the left suggests a potential outlier.

A frequency histogram of 30 exam scores grouped into bins of width 10. The modal class (80–90) contains 10 observations. Adjacent bars with no gaps indicate a continuous quantitative variable. A potential outlier near 40 is flagged at the left margin.

Several features are immediately apparent from the histogram that would be difficult to discern from raw data alone. First, the distribution is left-skewed (negatively skewed), with a long tail stretching toward lower scores and the bulk of the data concentrated at higher values. Second, the distribution is unimodal, possessing a single prominent peak. Third, the gap between the 40–50 bin and the rest of the data raises a question about whether the leftmost observation represents a genuinely unusual case. These qualitative observations—shape, modality, and outliers—form the essential first step before computing numerical summaries like the mean or standard deviation.

Mathematical Framework

While distribution plots are primarily graphical tools, several quantitative relationships underpin their construction and interpretation. Understanding these formulas helps you make principled decisions about bin width, properly compare distributions of different sample sizes using relative frequency, and connect histograms to the concept of probability density.

RELATIVE FREQUENCY
Relative Frequency of class i = fᵢ / n
where fᵢ is the frequency (count) in class i and n is the total sample size. The sum of all relative frequencies equals 1. When the y-axis displays relative frequency instead of raw counts, histograms from samples of different sizes become directly comparable.
FREQUENCY DENSITY
Density of class i = fᵢ / (n × w)
where w is the bin width. In a density histogram, the area of each bar (height × width) equals the relative frequency, and the total area under all bars equals 1. This normalization connects the histogram to the probability density function (pdf) in probability theory.
STURGES' RULE (NUMBER OF BINS)
k = ⌈1 + 3.322 × log₁₀(n)⌉
where k is the suggested number of bins and n is the sample size. Sturges' rule assumes an approximately normal distribution and tends to undersmooth for large or highly skewed datasets. The Freedman–Diaconis rule (bin width = 2 × IQR × n⁻¹ᐟ³) is often preferred for robustness.
BIN WIDTH
w = (max − min) / k
where max and min are the largest and smallest observations (or convenient round numbers that bracket the data), and k is the number of bins. In practice, w is rounded to a 'nice' number (e.g., 5, 10, 25) for readability.
⚠️ Density vs. Frequency
When all bins have equal width, a frequency histogram and a density histogram have identical shapes—only the y-axis scale changes. When bins have unequal widths (rare but possible), you must use density on the y-axis so that area—not height—represents proportion. Plotting raw frequency with unequal bins produces a misleading graph.

Dotplots & Stem-and-Leaf Plots — Detailed Breakdown

Dotplots

A dotplot places a dot above a number line for each observation in the dataset. When multiple observations share the same value, dots are stacked vertically. The resulting display reveals the distribution's shape, center, and spread while retaining every individual data point—making it ideal for small-to-moderate samples (n ≤ 50–75). Unlike a histogram, a dotplot requires no binning decisions, so its appearance is fully determined by the data. However, for large datasets, the stacking becomes impractical and the plot degenerates into an illegible tower of dots; in such cases, a histogram or kernel density estimate is preferred.

Stem-and-Leaf Plots

A stem-and-leaf plot (also called a stemplot) splits each observation into a stem (all digits except the last) and a leaf (the final digit). Stems are listed vertically in ascending order, and the leaves for each stem are written in a row to the right, also in ascending order. When you rotate a stem-and-leaf plot 90° counterclockwise, its profile resembles a histogram—but unlike a histogram, every original data value is recoverable from the display. This dual function (shape + data retention) is the plot's great advantage. A back-to-back stem-and-leaf plot extends this idea by placing leaves from two groups on opposite sides of a shared stem column, enabling direct visual comparison of two distributions.

Side-by-side comparison of a dotplot (left) and stem-and-leaf plot (right) for the same 20-observation dataset. Both preserve individual data values. The stem-and-leaf key '2 | 5 = 25' tells the reader how to reconstruct each observation. The value 52 (in red) appears isolated in both displays.

Both displays tell the same story: the data concentrate in the 20s and 30s, producing a roughly right-skewed distribution with a single mode in the twenties. The observation 52 separates noticeably from the rest, flagging it as a possible outlier. The stem-and-leaf display adds an interpretive convenience: a reader can immediately verify that, for example, the stem '2' row contains the values 21, 23, 23, 25, 27, 28, and 29—no return to a raw data list is necessary. In contrast, the dotplot requires careful reading of axis positions to recover exact values but provides a slightly more intuitive visual of spacing and clustering.

💡 When to Split Stems
If most data values share only a few stems, the stem-and-leaf plot collapses into a few overly long rows, obscuring shape. A common remedy is to split stems: each stem appears twice, with leaves 0–4 on the first line and leaves 5–9 on the second. This doubles the number of rows and reveals finer structure, analogous to halving the bin width in a histogram.

Worked Example — Building All Three Displays

Suppose you collect the following 25 commute times (in minutes) from a sample of college students: 5, 8, 10, 12, 12, 14, 15, 15, 18, 20, 22, 22, 23, 25, 25, 25, 28, 30, 32, 35, 38, 40, 42, 50, 65. Construct a histogram, dotplot, and stem-and-leaf plot, and describe the distribution's key features.

Constructing a Histogram, Dotplot, and Stem-and-Leaf Plot
1
Step 1 — Determine the Range and Bin WidthThe minimum value is 5 and the maximum is 65, giving a range of 65 − 5 = 60. Using Sturges' rule: k = ⌈1 + 3.322 × log₁₀(25)⌉ = ⌈1 + 3.322 × 1.398⌉ = ⌈5.65⌉ = 6 bins. A convenient bin width is w = 60 / 6 = 10 minutes. We choose the bins [5, 15), [15, 25), [25, 35), [35, 45), [45, 55), [55, 65].
6 bins, each of width 10 minutes
2
Step 2 — Tally FrequenciesCount the observations in each bin. [5, 15): 5, 8, 10, 12, 12, 14 → f = 6. [15, 25): 15, 15, 18, 20, 22, 22, 23 → f = 7. [25, 35): 25, 25, 25, 28, 30, 32 → f = 6. [35, 45): 35, 38, 40, 42 → f = 4. [45, 55): 50 → f = 1. [55, 65]: 65 → f = 1. Check: 6 + 7 + 6 + 4 + 1 + 1 = 25 ✓.
Frequencies: 6, 7, 6, 4, 1, 1
3
Step 3 — Draw the HistogramOn the horizontal axis, mark the bin boundaries from 5 to 65. On the vertical axis, mark frequencies from 0 to at least 7. Draw adjacent bars with heights corresponding to the frequencies computed above. The tallest bar (the modal class) is [15, 25) with f = 7.
Modal class: [15, 25) with frequency 7
4
Step 4 — Draw the DotplotDraw a horizontal number line from 0 to 70. For each observation, place a dot above its value. Stack dots for repeated values. For instance, the value 25 appears three times, so three dots are stacked vertically above 25. The value 12 appears twice, so two dots are stacked above 12.
25 has the tallest stack (3 dots)
5
Step 5 — Construct the Stem-and-Leaf PlotUse the tens digit as the stem and the units digit as the leaf. Stem 0: 5, 8. Stem 1: 0, 2, 2, 4, 5, 5, 8. Stem 2: 0, 2, 2, 3, 5, 5, 5, 8. Stem 3: 0, 2, 5, 8. Stem 4: 0, 2. Stem 5: 0. Stem 6: 5. Include a key: 2 | 5 = 25 minutes.
Longest row is stem 2 (8 leaves), confirming the mode region
6
Step 6 — Describe the DistributionAll three displays show a right-skewed, unimodal distribution. The center is approximately in the low-to-mid twenties (the median is the 13th ordered value = 23 minutes). Most commute times cluster between 10 and 35 minutes, with the right tail extending to 65. The observation at 65 minutes is a potential outlier, isolated from the next nearest value (50) by a gap of 15 minutes.
Right-skewed, unimodal; center ≈ 23 min; possible outlier at 65 min

Strengths, Limitations, and Choosing the Right Display

Each of the three distribution plots occupies a distinct niche in the statistician's toolkit. The following table summarizes their relative strengths and limitations, guiding your decision about which display to use for a given analytical context.

Comparison of histogram, dotplot, and stem-and-leaf plot characteristics
FeatureHistogramDotplotStem-and-Leaf
Preserves individual valuesNo — values are aggregated into binsYes — every observation is a dotYes — every value is recoverable from stem + leaf
Ideal sample sizeModerate to large (n ≥ 20)Small to moderate (n ≤ 50–75)Small to moderate (n ≤ 50–100)
Bin-width sensitivityHigh — different widths produce different shapesNone — no binsModerate — splitting stems changes resolution
Reveals exact duplicatesNoYes — stacked dotsYes — repeated leaves
Back-to-back comparisonPossible (overlay or side-by-side)Possible (parallel dotplots)Natural — back-to-back stemplot
Software supportExcellent (R, Python, Excel, SPSS, JMP, etc.)Good (R, JMP, Minitab)Limited (R's stem() function; rarely used in publication)
KEY TAKEAWAY
Choosing among these three displays is like choosing among a telescope, binoculars, and a magnifying glass. A histogram is the telescope: it works at any distance (sample size) and reveals large-scale structure, but individual stars blur together. A dotplot is the magnifying glass: superb for examining fine detail in a small field, but useless for surveying a galaxy. A stem-and-leaf plot is binoculars: it offers a useful middle ground, combining shape with individual detail, though it becomes cumbersome for very large datasets. The best practice is to produce multiple displays and cross-check the story they tell.

Connection to Advanced Distributional Analysis

Histograms, dotplots, and stem-and-leaf plots serve as the entry point into a much larger family of distributional display and estimation techniques. As you progress through statistics, the intuitions you build from these basic displays will transfer directly to more sophisticated tools. The table below maps each introductory concept to its advanced counterpart.

Mapping introductory distribution displays to advanced statistical techniques
Introductory ConceptAdvanced ExtensionKey Idea
Histogram (fixed bins)Kernel Density Estimation (KDE)Replaces discrete bins with smooth, continuous kernels (e.g., Gaussian) centered at each data point. The bandwidth parameter plays a role analogous to bin width.
Frequency histogramProbability Density Function (pdf)As bin width → 0 and n → ∞, the density histogram converges to the population pdf. This is the theoretical foundation connecting descriptive histograms to inferential probability models.
DotplotBeeswarm / Jitter PlotsFor larger datasets, beeswarm plots avoid overplotting by nudging overlapping dots sideways, preserving the dotplot philosophy while scaling to hundreds or thousands of points.
Stem-and-leaf plotViolin Plot / Ridgeline PlotModern alternatives that combine a mirrored density curve (violin) with distributional summaries. They handle large n and enable elegant group comparisons, extending the back-to-back stemplot idea.
Shape description (skew, modality)Moment-Based MeasuresSkewness (3rd standardized moment) and kurtosis (4th standardized moment) quantify the shape features you currently assess visually, enabling formal hypothesis testing for normality.

The transition from histograms to kernel density estimation is one of the most natural progressions in statistics. A histogram approximates the unknown density by counting observations in fixed intervals; a KDE replaces each observation with a smooth bump (kernel) and sums the bumps, producing a continuous curve. The bandwidth of the kernel serves exactly the same role as the bin width—controlling the bias-variance trade-off between oversmoothing and undersmoothing. Mastering histogram construction, with its attendant decisions about bin boundaries, directly prepares you for the more nuanced bandwidth-selection problem in nonparametric estimation.

Practice Problems

PROBLEM 1CONCEPTUAL
A histogram for a dataset has bars that touch each other (no gaps), whereas a bar chart for categorical data has gaps between bars. Explain the statistical reason for this design distinction and what it communicates about the nature of the variable being displayed.
PROBLEM 2BASIC CALCULATION
A sample of n = 40 observations has a minimum of 12 and a maximum of 97. Using Sturges' rule, determine the recommended number of bins k, compute the bin width w (rounded up to a convenient integer), and list the bin boundaries if the first bin starts at 10.
PROBLEM 3INTERMEDIATE
Consider the following stem-and-leaf plot (key: 3 | 7 = 37): 1 | 2 5 8 2 | 0 3 3 6 7 9 3 | 1 4 4 4 7 8 4 | 2 5 5 | 1 6 | 8 (a) How many observations are in the dataset? (b) Find the median. (c) Describe the shape of the distribution. (d) Identify any potential outliers and justify your assessment.
PROBLEM 4APPLIED
A hospital administrator records the waiting times (in minutes) for 50 emergency department patients. She constructs a histogram with bins [0, 15), [15, 30), [30, 45), [45, 60), [60, 90), [90, 120] and obtains frequencies of 8, 14, 12, 9, 5, 2. Notice that the last two bins are 30 minutes wide while the first four are 15 minutes wide. (a) Explain why plotting raw frequencies on the y-axis would be misleading. (b) Compute the frequency density for each bin and sketch the corrected density histogram. (c) What proportion of patients waited less than 45 minutes?
PROBLEM 5CRITICAL THINKING
A researcher claims that stem-and-leaf plots are strictly superior to histograms because they preserve all original data values. Critically evaluate this claim. Under what conditions might a histogram reveal distributional features that a stem-and-leaf plot obscures, and vice versa? In your answer, discuss the role of sample size, the flexibility of bin width, and the connection between histograms and continuous density estimation.

Lesson Summary

This lesson explored three foundational tools for visualizing the distribution of quantitative data. A histogram groups observations into bins and uses bar heights (or areas, in a density histogram) to represent frequency; it scales well to large datasets but sacrifices individual data values and is sensitive to bin-width choices. A dotplot preserves every observation as a dot on a number line, making it ideal for small samples where exact values and duplicates matter. A stem-and-leaf plot uniquely combines the shape-revealing profile of a histogram with the data-preservation property of a dotplot by splitting each value into a stem and a leaf.

Across all three displays, the primary analytical goal is identical: to describe the distribution's shape (symmetric, left-skewed, right-skewed, unimodal, bimodal), center, spread, and outliers. Key mathematical tools include relative frequency (fᵢ / n), frequency density (fᵢ / (n × w)), and bin-count guidelines such as Sturges' rule and the Freedman–Diaconis rule. These introductory displays lay the groundwork for advanced techniques including kernel density estimation, violin plots, and formal distributional testing.

Varsity Tutors • College Statistics • Histograms & Distribution Plots — Histograms, Dotplots, and Stem-and-Leaf Plots