Histograms
A biologist measures the wing length of 200 fruit flies. This results in 200 numbers. What do they look like as a group? A frequency distribution table can answer this. But a table of numbers is hard to "see." The histogram is the tool that turns a column of raw measurements into a picture. It creates a skyline of bars whose heights reveal where values cluster, how spread out they are, and whether the pattern is symmetric or lopsided. Histograms matter because almost all quantitative biology starts with a distribution of measurements. Examples include heights, enzyme rates, gene expression levels, blood pressures, and clutch sizes. Before any statistical test is legitimate, a researcher should look at the shape of the data. Is it bell-shaped, bimodal, skewed, full of outliers? A histogram is the fastest, most honest way to do that look. Many statistical procedures (t-tests, ANOVA, regression) assume data are drawn from a roughly normal distribution. A histogram is the first and best check of that assumption. The big picture: a histogram is a bar chart built specifically for continuous numerical data. The data have first been sorted into contiguous, non-overlapping intervals called bins. Bar height reflects how many observations fall in each bin. Unlike a bar chart of categories, the bars touch, because the underlying variable is continuous. There is no gap between "60–65 mm" and "65–70 mm." This article builds the histogram from the frequency distribution up. It covers how bins are chosen, and how bin width changes the story the picture tells. It explains the classic pitfalls. It also shows how histograms set the stage for later ideas about distribution shape, skewness, and the boxplot as a compact alternative summary.
- A histogram displays a frequency distribution of continuous data as adjacent bars with no gaps between them.
- Data are grouped into bins (class intervals); bar height = frequency (or relative frequency/density) of values in that bin.
- Bin width is a critical choice: too few bins hides structure, too many bins shows only noise.
- Common bin-count rules (Sturges', Rice, √n) give reasonable starting points, not fixed laws.
- Histogram shape reveals central tendency, spread, symmetry, skew, and multiple modes — before any formal test is run.
- Histograms are built from Frequency Distributions and lead directly to formal descriptions of The Shape of Distributions and Skew and to compact summaries like Boxplots.
A histogram turns a table of frequencies into a shape you can see, and the shape — not just the average — is the first fact you need about any dataset.
The core idea
A histogram is a graphical display of a frequency distribution for a continuous (or nearly continuous) numerical variable. The x-axis is divided into a series of equal-width, non-overlapping intervals called bins (or class intervals), spanning the full range of the data. The y-axis shows how many observations fall into each bin — the frequency — or, equivalently, the relative frequency (proportion of the total) or the density (frequency divided by bin width, used when bins are unequal). Bars are drawn with height equal to that count and, crucially, are drawn touching one another, because the variable being measured is continuous: there is no gap in nature between a fly with a 2.31 mm wing and one with a 2.32 mm wing, and the histogram's unbroken skyline reflects that. This is the key visual and conceptual difference from an ordinary bar chart, which displays counts of discrete, unordered categories (species, blood types, treatment groups) and conventionally leaves gaps between bars to emphasize that the categories are separate and could be reordered without changing meaning. A histogram's bins have a fixed, meaningful order (they run along the number line), and moving them would destroy the picture. Students who confuse the two often build "bar charts" of continuous data with gaps, which visually implies breaks in the variable that do not exist. The single decision that determines everything about a histogram's appearance — though not the underlying data — is the bin width. The same 200 flies can be displayed as a lumpy, blocky staircase with 4 huge bins, a smooth well-resolved bell shape with 15 well-chosen bins, or a chaotic, spiky mess with 60 tiny bins. The data never change; only how finely they are sliced changes. Choosing bin width is therefore not a cosmetic detail but a substantive analytical choice, closely related to choosing class-interval width when first building a frequency distribution table.
Mechanism — how a histogram is actually built
Step 1 — Determine the range. Find the minimum and maximum values in the dataset. The range, R = maximum − minimum, sets the total span the bins must cover.
Step 2 — Choose the number of bins (k) or the bin width (w). These two choices are linked by:
Several rules of thumb help pick a reasonable starting k for a sample of size n:
| Rule | Formula for k | Example, n = 200 |
|---|---|---|
| Square-root rule | k ≈ √n | √200 ≈ 14 |
| Sturges' rule | k ≈ 1 + log₂(n) | 1 + log₂(200) ≈ 8.6 → 9 |
| Rice rule | k ≈ 2·n^(1/3) | 2·(200)^(1/3) ≈ 11.7 → 12 |
None of these is "correct" — they are starting points. Sturges' rule (1926) assumes roughly normal data and can under-bin large or non-normal samples; the square-root and Rice rules are more generous and often work better for exploratory biological data. In practice, a biologist tries two or three bin widths and picks the one that reveals structure (modes, skew, gaps, outliers) without drowning it in sampling noise.
Step 3 — Define bin boundaries. Bins must be contiguous and non-overlapping, and every value in the dataset must fall in exactly one bin. A common convention is "left-inclusive, right-exclusive": a bin of [60, 65) contains values from 60 up to but not including 65. Boundaries should, where possible, be placed at values no data point can equal exactly (e.g., using one more decimal place than the data), so that no observation sits ambiguously on a boundary line.
Step 4 — Tally frequencies. Count how many observations fall into each bin. This is exactly the tally step used to build a frequency distribution table — the histogram is that table's picture.
Step 5 — Draw the bars. Plot bins on the x-axis in order, with height equal to frequency (a frequency histogram), relative frequency (a relative frequency histogram, useful for comparing samples of different total size), or density (frequency ÷ bin width, essential when bins are unequal, so that bar area — not height — represents the count). Bars are drawn adjacent, sharing edges, with no horizontal gaps.
Step 6 — Read the shape. Once built, the histogram is inspected for: number of peaks (modes), symmetry versus skew (a long tail to one side), spread (wide and flat versus narrow and tall), and unusual isolated bars (possible outliers or data entry errors).
Step 7 — Effect of bin width on the same data. The figure below shows one simulated, right-skewed dataset (mimicking, e.g., parasite loads or reaction times) rendered at three bin widths. Too-wide bins (left) obscure the skew and any secondary bump; too-narrow bins (right) fragment the data into a spiky, noisy pattern driven by sampling variation rather than biology; a well-chosen intermediate width (middle) reveals the true right-skewed shape clearly.
The evidence — how histograms became a standard biological tool
Histograms are older than modern statistics itself, but their role in biology was cemented by the same foundational work that established the normal distribution and quantitative variation as central to heredity and evolution.
Quetelet and the "average man" (1830s–1840s). The Belgian astronomer-turned-statistician Adolphe Quetelet compiled large tables of human measurements — chest circumferences of Scottish soldiers, heights of French conscripts — and, when he grouped them into class intervals and plotted frequencies, found the now-familiar bell-shaped curve. He argued this shape reflected the operation of many small, independent causes of variation around a true mean, drawing an explicit analogy to the distribution of random errors in astronomical measurement. This was one of the first systematic demonstrations that a biological measurement, tabulated into bins and plotted, produces a reproducible, describable shape rather than an unstructured scatter of numbers.
Francis Galton and biological variation (1870s–1889). Galton, measuring sweet-pea seed diameters and human heights, went further: he built physical and graphical devices — notably the quincunx ("Galton board"), in which falling beads are diverted left or right by rows of pins and collect in bins at the bottom — to show that independent, additive small effects generate a bell-shaped histogram mechanically, not just by biological coincidence. Galton's bead experiment is a direct physical analogue of building a histogram: many independent random events, tallied into bins, produce the same characteristic mound shape seen in real biological measurements. This gave a causal mechanism (many small additive effects — later formalized as the Central Limit Theorem) for why so many biological traits, from seed size to human stature, produce histograms with a single central peak and roughly symmetric tails.
Karl Pearson and the formalization of frequency curves (1890s). Pearson, building directly on grouped frequency data (including crab carapace measurements that first suggested to Walter Weldon that some biological distributions are not simply symmetric), developed a general family of frequency curves to fit histograms of real biological data, including skewed and bimodal shapes. Weldon's 1893 measurements of the frontal breadth of Naples crabs, when histogrammed, showed a distribution with an odd secondary bump — challenging the assumption that all biological variation is Gaussian and prompting Pearson to develop skewness statistics and, eventually, ideas that fed into modern methods for describing non-normal shapes (foreshadowing formal treatments of The Shape of Distributions and Skew).
What this history established, as evidence: (1) that grouping continuous measurements into bins and plotting frequency reliably reveals reproducible population-level shape, not just noise; (2) that many biological traits cluster around a mean in an approximately symmetric, unimodal way because of additive small causes (Galton's mechanical demonstration); and (3) that departures from that simple bell shape — skew, multiple modes — are real biological signals (Weldon's crabs) rather than errors, detectable only because someone histogrammed the data and looked.
Worked examples
Example 1 — Choosing bins for a real dataset (enzyme activity). A student measures lactase activity (units/mg protein) in 50 intestinal biopsy samples. The minimum value is 12 and the maximum is 84. Range: R = 84 − 12 = 72. Using the square-root rule: k ≈ √50 ≈ 7.07 → 7 bins. Bin width: w ≈ R / k = 72 / 7 ≈ 10.3 → round to a convenient width, w = 10. Bin boundaries, starting just below the minimum (say 10) so all data are included:
| Bin (units/mg) | Frequency |
|---|---|
| 10–19.9 | 3 |
| 20–29.9 | 9 |
| 30–39.9 | 14 |
| 40–49.9 | 12 |
| 50–59.9 | 7 |
| 60–69.9 | 3 |
| 70–79.9 | 1 |
| 80–89.9 | 1 |
Total = 3+9+14+12+7+3+1+1 = 50 ✓ (matches n). Plotting these as adjacent bars shows a single peak around 30–40 units/mg with a long right tail out to 84 — a right-skewed distribution, plausible biologically because activity is bounded below by zero but can spike high in a few individuals with unusually efficient lactase expression. Sturges' rule here would suggest k ≈ 1 + log₂(50) ≈ 6.6 → 7 bins, essentially agreeing — but with a highly skewed variable like this, a biologist might deliberately use unequal, wider bins in the sparse right tail (e.g., one bin covering 60–89.9) to avoid many nearly-empty bars, using a density histogram (height = frequency ÷ bin width) so that bar area, not height, still correctly represents proportion of the sample.
Example 2 — Reading shape to infer biology: bimodality in a field survey. An ecologist measures shell length (mm) in 120 snails collected from a single tide pool and plots a histogram with 1 mm bins. Instead of one bell-shaped peak, the histogram shows two distinct peaks: one centered near 8 mm and a second, smaller peak centered near 22 mm, with very few individuals in between (10–15 mm). What does this shape tell us, and what does it not?
- It does not by itself prove two species are present — the axis is a within-species trait (shell length),
and the histogram alone cannot distinguish "two species" from "one species with two age cohorts."
- A biologically reasonable interpretation, given ecological knowledge of the species (a fast-growing intertidal
snail with discrete annual recruitment), is that the histogram reflects two age cohorts: this year's juveniles (small peak) and last year's survivors, now nearly a year older and grown to adult size (second peak), with the gap reflecting the period of most rapid juvenile growth, through which individuals pass quickly and are therefore rarely captured mid-size.
- This bimodal shape is a real biological signal that would be invisible in a summary statistic like the mean
(which would report a meaningless value near 14–15 mm, in the trough between the two real clusters) — a clear demonstration of why a histogram must be inspected before reporting a single average, and a preview of why later tools like Boxplots, which show quartiles but not multimodality directly, are best used alongside a histogram rather than instead of one.
Common misconceptions & traps
| Misconception / trap | Why it's wrong |
|---|---|
| "A histogram is just a bar chart of numbers." | Bar charts show unordered categories with gaps; histograms show ordered, continuous bins with no gaps, and reordering the bars would destroy the meaning. |
| "There's one correct number of bins." | Rules like Sturges' or the square-root rule give reasonable starting points, not a single correct answer; the best bin width depends on sample size and the questions being asked. |
| "Bar height always equals the count." | True only for equal-width bins. With unequal bin widths, height must be density (count ÷ width) so that bar area represents frequency correctly. |
| "A single peak means the data are normal." | Unimodal is necessary but not sufficient for normality; the distribution could still be strongly skewed or have heavy tails (see The Shape of Distributions and Skew). |
| "More bins always shows more truth." | Beyond a point, more bins just displays sampling noise (see Figure 2, panel C) — each bar becomes an unreliable estimate based on very few observations. |
| "The tallest bar is 'the mode' with precision." | The modal bin depends on where bin edges fall; shifting bin boundaries by even a small amount can shift which bin looks tallest, especially with small samples. |
The scientist behind it
Karl Pearson (1857–1936) is the figure most responsible for turning the histogram from an illustrative sketch into a rigorous analytical tool in biology. Trained in mathematics at Cambridge, Pearson became the first holder of the Galton Chair of Eugenics at University College London and, together with Walter Weldon and Francis Galton, founded the discipline that became known as biometry — the systematic, quantitative study of biological variation. Pearson insisted that biological claims be backed by carefully tabulated, carefully binned frequency data rather than by a handful of illustrative specimens, and he built much of the mathematical machinery — the chi-squared test, the Pearson correlation coefficient, moment-based skewness and kurtosis statistics — needed to describe precisely what a histogram's shape was telling you. His work on Weldon's asymmetric crab-carapace data pushed him to develop families of frequency curves well beyond the simple normal bell, formalizing the idea that histograms can and do show genuine, biologically meaningful skew and multimodality, not just noisy approximations to a bell curve.
Origins · 1 minKarl Pearson and how this was discovered
Where this matters today
Histograms remain the first analytical step in nearly every quantitative biological workflow. In flow cytometry, cell populations are distinguished by histogramming fluorescence intensity across thousands of single cells per second, with distinct peaks marking distinct cell subtypes (e.g., separating CD4+ from CD4− lymphocytes). In genomics, histograms of sequencing read-depth or gene-expression counts are used to spot technical artifacts, batch effects, and to check whether a normalization method has produced the expected shape before downstream statistical testing. In clinical medicine, histograms of a biomarker (blood glucose, tumor size, hospital length of stay) across a patient population reveal whether "normal ranges" should be defined from a symmetric or a skewed reference distribution — misapplying a symmetric-normal-range rule to a skewed biomarker like triglycerides systematically misclassifies patients. In conservation biology, histograms of body size or age-at-death in a sampled population can reveal recruitment failure (missing young cohorts) or size-selective harvesting (a truncated upper tail), both directly visible as gaps or cut edges in the bar pattern. In agriculture and plant breeding, histograms of yield or trait measurements across a breeding trial are the standard first check for whether a trait is roughly continuous and additive (supporting quantitative-trait methods) or shows discrete clusters suggestive of a single major gene. In every one of these settings, the histogram is not decoration — it is the first, fastest test of whether the data mean what a naive summary statistic would suggest, and it directly motivates the more formal descriptions of shape and spread — skewness, kurtosis, and the quartile-based boxplot — that follow it.
Ask the tutor: How do I decide, in practice, whether an odd bump in my histogram is real biology or just sampling noise from too few observations?
Is a histogram the same thing as a frequency distribution?
Not quite — they are closely related but not identical. A frequency distribution is the underlying table: a list of bins (class intervals) and the count or proportion of observations in each. A histogram is the graphical representation of that table, plotted as adjacent bars along a number line. You can always construct a frequency distribution without drawing a histogram, but you cannot draw a histogram without first (explicitly or implicitly) building the underlying frequency distribution. Think of the frequency table as the data and the histogram as the picture of that data.
Why do histogram bars touch while bar chart bars usually have gaps?
The gap convention encodes a claim about the variable's structure. Bar charts display discrete, unordered categories (e.g., species A, B, C), and the gaps signal that categories are distinct, could be reordered, and have no meaningful "in-between" values. Histograms display continuous numerical variables sliced into contiguous bins along an ordered axis; there genuinely is no gap in nature between a 65 mm and a 65.1 mm measurement, so drawing separated bars would misleadingly suggest breaks or discontinuities that do not exist in the underlying variable.
How many bins should I actually use for my data?
There is no single correct number — start with a rule of thumb (√n, Sturges' k ≈ 1 + log₂n, or Rice's 2·n^(1/3)) to get a reasonable starting count, then adjust by eye. Try two or three different bin widths and see which reveals stable, interpretable structure (a clear peak, a clear skew, a clear gap) without changing wildly between adjacent widths. If the overall shape (unimodal vs. bimodal, symmetric vs. skewed) stays consistent across several reasonable bin widths, you can trust that the shape reflects real biology rather than an artifact of binning choice.
What's the difference between a frequency histogram and a relative frequency histogram?
A frequency histogram plots raw counts on the y-axis — how many observations fell in each bin. A relative frequency histogram plots the proportion (count ÷ total n) instead, so bar heights sum to 1 (or 100%). The shapes are identical; only the y-axis scale changes. Relative frequency histograms are essential for comparing two samples of different sizes (e.g., 40 control flies versus 250 treated flies), since raw counts from the larger sample would otherwise dominate any visual comparison even if the underlying proportions were similar.
Can a histogram tell me if my data are normally distributed?
A histogram gives a strong first impression — normal data should look roughly symmetric, unimodal, and bell-shaped — but it cannot formally prove normality, especially with small samples, where random sampling variation alone can make normal data look lumpy or skewed. For rigorous assessment, biologists typically pair a histogram with a quantile-quantile (Q-Q) plot and/or a formal normality test (e.g., Shapiro-Wilk), and reserve final judgment for when sample size is reasonably large. The histogram's real value is as a fast, honest diagnostic that flags obvious problems — strong skew, multiple modes, extreme outliers — before more detailed methods are applied.
What is bin width doing statistically — why does it matter so much?
Bin width controls a bias–variance tradeoff in visualizing the distribution's shape. Very wide bins smooth away real structure (peaks, gaps, skew) — this is high bias, low visual noise. Very narrow bins let each bar be determined by very few observations, so bars fluctuate wildly due to sampling error — this is low bias, high noise. The "best" bin width balances these: fine enough to reveal genuine structure, coarse enough that each bar reflects enough observations to be a stable estimate of the true underlying density in that region.
My histogram has one huge bar and several tiny ones far off to the right. What should I check first?
This pattern usually signals either a genuinely skewed biological variable (e.g., many biomarkers, parasite loads, and reaction times are naturally right-skewed, bounded at zero with rare high values) or a data-entry error (a misplaced decimal point creating a false outlier far from the rest of the data). First, verify the extreme values in the raw data are real measurements and not typos. If they are real, consider whether a transformation (e.g., log scale) or a non-normal statistical approach is more appropriate than treating the mean and standard deviation as adequate summaries — this is exactly the situation that motivates formally characterizing The Shape of Distributions and Skew.