SECTION 1
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
1786 • William Playfair's Bar Charts
1895 • Karl Pearson Coins 'Histogram'
1977 • John Tukey's Stem-and-Leaf Plot
1990s • Digital Dotplots and Interactive Graphics
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.
SECTION 2
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.
Frequency Distribution
Bins (Class Intervals)
Shape Vocabulary
Data Preservation vs. Aggregation
Outliers and Gaps
KEY TAKEAWAY
SECTION 3
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.
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.
SECTION 4
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
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
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)
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
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
SECTION 5
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.
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
SECTION 6
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 Width
The 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 Frequencies
Count 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 Histogram
On 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 Dotplot
Draw 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 Plot
Use 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 Distribution
All 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
SECTION 7
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.
| Feature | Histogram | Dotplot | Stem-and-Leaf |
|---|---|---|---|
| Preserves individual values | No — values are aggregated into bins | Yes — every observation is a dot | Yes — every value is recoverable from stem + leaf |
| Ideal sample size | Moderate to large (n ≥ 20) | Small to moderate (n ≤ 50–75) | Small to moderate (n ≤ 50–100) |
| Bin-width sensitivity | High — different widths produce different shapes | None — no bins | Moderate — splitting stems changes resolution |
| Reveals exact duplicates | No | Yes — stacked dots | Yes — repeated leaves |
| Back-to-back comparison | Possible (overlay or side-by-side) | Possible (parallel dotplots) | Natural — back-to-back stemplot |
| Software support | Excellent (R, Python, Excel, SPSS, JMP, etc.) | Good (R, JMP, Minitab) | Limited (R's stem() function; rarely used in publication) |
Comparison of histogram, dotplot, and stem-and-leaf plot characteristics
KEY TAKEAWAY
SECTION 8
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.
| Introductory Concept | Advanced Extension | Key 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 histogram | Probability 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. |
| Dotplot | Beeswarm / Jitter Plots | For 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 plot | Violin Plot / Ridgeline Plot | Modern 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 Measures | Skewness (3rd standardized moment) and kurtosis (4th standardized moment) quantify the shape features you currently assess visually, enabling formal hypothesis testing for normality. |
Mapping introductory distribution displays to advanced statistical techniques
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.
SECTION 9
Practice Problems
Question 1: CONCEPTUAL
Show answer
Question 2: BASIC CALCULATION
Show answer
Question 3: INTERMEDIATE
Show answer
Question 4: APPLIED
Show answer
Question 5: CRITICAL THINKING
Show answer
SUMMARY
Lesson Summary
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.