Boxplots
Imagine a fisheries biologist comparing body length in three trout populations. Each is sampled from a different river, with 40–200 fish. A table of raw measurements is unreadable. Even means and standard deviations can mislead. This happens if one river's fish have a lopsided, skewed distribution. It also happens with a few enormous outlier trout. What the biologist needs is a compact picture. It should show center, spread, shape, and unusual points all at once. It should also let three rivers sit side by side for instant comparison. That picture is the boxplot. Boxplots (also called box-and-whisker plots) are the workhorse graphic of comparative Descriptive Statistics in biology. They compress an entire distribution into five numbers. These are minimum, first quartile, median, third quartile, maximum, adjusted for outliers. They are displayed as a box with whiskers. Boxplots need no assumption of normality. So they handle the skewed, zero-inflated, and outlier-prone data that biology constantly produces. Examples include gene expression counts, parasite loads, enzyme activities, reaction times, clutch sizes. The big picture is comparison. A single histogram tells you about one sample. A wall of histograms is hard to scan. Line up boxplots for five, ten, or fifty groups instead. Patterns in median, spread, and skew jump out immediately. This is exactly why boxplots dominate figures in ecology, genomics, and clinical trials. They trade some resolution for a huge gain in comparability across many groups. For instance, you cannot see multimodality in a boxplot. This article teaches you to read a boxplot precisely. It teaches you to build one by hand from real numbers. It also explains the rule that flags outliers. Finally, it helps you recognize classic experiment-adjacent uses and abuses of the plot in published biology. It builds directly on The Interquartile Range and Boxplots and Histograms. It also sets up later material on Outliers in Biological Data and Displaying Data Honestly.
- A boxplot displays the five-number summary: minimum, Q1, median, Q3, maximum (with outliers shown separately).
- The box spans the interquartile range (IQR = Q3 − Q1) and contains the middle 50% of the data.
- Whiskers extend to the most extreme point within 1.5 × IQR of the box edges; points beyond that are plotted as individual outlier dots.
- Median line position within the box, and whisker length asymmetry, reveal skew without fitting any distribution.
- Boxplots let you compare many groups' center, spread, and outliers side by side — their main comparative advantage over histograms.
- They hide multimodality and exact sample distribution shape, so pairing them with a strip plot or histogram is often wise.
A boxplot summarizes a distribution's median, spread (IQR), and outliers in one compact shape, making it the standard tool for comparing many biological groups at a glance.
The core idea
A boxplot represents a batch of numbers using five landmark values, computed after sorting the data from smallest to largest. The median (Q2) splits the data into a lower and upper half. The first quartile (Q1) is the median of the lower half; the third quartile (Q3) is the median of the upper half. The interquartile range, IQR = Q3 − Q1, measures the spread of the middle 50% of observations and is the plot's core spread statistic, exactly as introduced in The Interquartile Range and Boxplots. The box itself is drawn from Q1 to Q3, with a line inside it marking the median. From each end of the box, a whisker extends outward — not to the true minimum and maximum, but to the most extreme data point that still lies within a fence set at 1.5 × IQR beyond the box edge. Any observation further out than that fence is plotted individually as a point (or asterisk), flagged as a candidate outlier. This convention, formalized by John Tukey in the 1970s, is what separates a boxplot from a simple "min-to-max" range bar: it builds in an automatic, distribution-free outlier detector. Reading a boxplot is reading shape without a curve. If the median line sits near the center of the box and whiskers are roughly equal, the batch is close to symmetric. If the median sits near one edge of the box, or one whisker is much longer than the other, the batch is skewed in the direction of the longer whisker/more distant edge. Multiple boxplots placed on a common axis let you compare medians (typical value), box heights (spread of the central mass), whisker lengths (spread of the extremes), and the number and position of outlier points — across as many groups as fit on the page.
Mechanism — building and reading a boxplot step by step
Step 1 — Sort the data. All quartile calculations require the observations in ascending order. For n observations, this is the foundation for every later step.
Step 2 — Find the median (Q2). If n is odd, it is the middle value. If n is even, it is the average of the two middle values.
Step 3 — Find Q1 and Q3. Split the sorted data at the median into a lower half and upper half. (When n is odd, some conventions include the median in both halves — the "inclusive" method — others exclude it; be consistent and state which you used.) Q1 is the median of the lower half; Q3 is the median of the upper half.
Step 4 — Compute the IQR. IQR = Q3 − Q1. This is the height of the box.
Step 5 — Compute the fences. Lower fence = Q1 − 1.5 × IQR. Upper fence = Q3 + 1.5 × IQR. These fences are not drawn on the plot; they are working boundaries used only to decide whisker length and outlier status.
Step 6 — Draw whiskers. The lower whisker extends to the smallest data value that is still ≥ the lower fence. The upper whisker extends to the largest data value that is still ≤ the upper fence. Whiskers therefore always end on an actual data point, never on the fence itself.
Step 7 — Plot outliers. Any data point beyond either fence is drawn as an individual dot (sometimes with open circles for "mild" outliers beyond 1.5 × IQR and asterisks for "extreme" outliers beyond 3 × IQR — a refinement some software applies automatically). The constant "1.5" is a convention, not a law of nature: for data that are exactly normally distributed, it flags roughly 0.7% of observations per tail as outliers, a calibration Tukey chose because it worked well across many real datasets without being applied through any formal probability model — the boxplot's whole appeal is that it needs no distributional assumption to compute.
The evidence — Tukey's rule and its empirical justification
Boxplots were not "discovered" through a single crucial experiment the way, say, Meselson-Stahl confirmed DNA replication — they are a graphical convention, and their justification is methodological and statistical rather than a single decisive laboratory result. Still, the design was tested and refined empirically, and understanding that process is the "evidence" a biostatistics student needs. John W. Tukey introduced the boxplot in his 1977 book Exploratory Data Analysis, building on earlier "range bar" and "schematic plot" ideas used informally by statisticians for decades. Tukey's key innovation was the 1.5 × IQR fence rule for separating "ordinary" tail values from suspected outliers, chosen after examining how the rule behaved across many empirical and simulated datasets, including approximately normal distributions. The evidence for the 1.5 × IQR convention comes from probability calculations combined with simulation, not a wet-lab experiment: For data drawn from a true normal distribution, the theoretical quartiles are Q1 = μ − 0.6745σ and Q3 = μ + 0.6745σ, so IQR = 1.349σ. The fences sit at Q1 − 1.5×IQR ≈ μ − 2.698σ and Q3 + 1.5×IQR ≈ μ + 2.698σ, roughly ±2.7 standard deviations. Under the normal curve, only about 0.35% of observations fall beyond each fence — about 0.7% total, or roughly 1 observation in 143. That means for a perfectly normal sample of 200 points, you'd expect around 1–2 "outliers" flagged by pure chance — a manageable false-positive rate Tukey judged acceptable, since the goal of exploratory analysis is to flag candidates for scrutiny, not to make a formal hypothesis-test decision. Subsequent statisticians tested the rule's behavior on skewed and heavy-tailed distributions — exactly the shapes common in biological data (parasite counts, income, gene expression) — and found that the fixed 1.5 multiplier tends to over-flag outliers in right-skewed data, because the upper tail is genuinely longer than the lower tail even without any anomalous individual. This finding motivated adjusted variants such as the adjusted boxplot (Hubert & Vandervieren, 2008), which modifies the fence multiplier based on a robust skewness statistic (the medcouple) rather than using 1.5 uniformly. The existence and adoption of these adjustments is itself evidence: it confirms empirically that the classic rule's performance depends on distribution shape, and that biologists working with skewed data (very common in ecology and physiology) should interpret flagged "outliers" as candidates for inspection, not automatic exclusions. A separate, genuinely experimental line of evidence concerns how well people read boxplots. Perceptual studies in statistical graphics research (e.g., work descending from Cleveland & McGill's 1984 graphical-perception experiments) tested subjects' accuracy at judging quantities from different chart types. These controlled experiments — showing participants charts and measuring estimation error — established that people compare positions along a common scale (like quartile lines) far more accurately than they compare angles or areas, which is part of why the boxplot's design (aligned boxes and lines on a shared numeric axis) is graphically efficient for the comparative task biologists use it for: judging medians and spreads across many groups at a glance.
Worked examples
Example 1 — Parasite load in two lizard populations (asymmetric, skewed data). Ectoparasite mite counts on 11 lizards from Population X (disturbed habitat): 2, 3, 3, 4, 5, 6, 7, 8, 9, 22, 31 Sorted already. n = 11 (odd). Median (Q2): the 6th value = 6. Lower half (positions 1–5, excluding median): 2, 3, 3, 4, 5 → median of these = 3 = Q1. Upper half (positions 7–11): 7, 8, 9, 22, 31 → median of these = 9 = Q3. IQR = 9 − 3 = 6. Fences: Lower fence = 3 − 1.5(6) = 3 − 9 = −6 (no data below this, so lower whisker goes to the true minimum, 2). Upper fence = 9 + 1.5(6) = 9 + 9 = 18. Largest value ≤ 18 is 9 itself is inside the box... check the data beyond Q3: 22 and 31 both exceed the upper fence of 18. Upper whisker extends only to the largest value ≤ 18, which is 9 — wait, 9 is Q3 itself, so we need the largest upper-half value at or below 18 that is not itself an outlier. Scanning upper-half values (7, 8, 9, 22, 31): 7, 8, 9 are ≤ 18; 22 and 31 exceed it. So the upper whisker extends to 9, and 22 and 31 are flagged as outliers. This boxplot instantly shows: a tight, low cluster of mite counts (2–9) with two heavily infested outlier lizards (22, 31) — a pattern a mean and SD alone would badly obscure, since those two points would inflate the mean and SD without revealing that the bulk of the population is lightly infested. This is exactly the situation where a boxplot outperforms a bar-and-error-bar plot.
Example 2 — Comparing enzyme activity across three genotypes (reading, not building). Suppose a boxplot figure reports superoxide dismutase (SOD) activity (units/mg protein) in leaf tissue for wild-type, heterozygous, and homozygous knockout Arabidopsis lines, n = 15 plants per genotype:
| Genotype | Q1 | Median | Q3 | Whisker range | Outliers |
|---|---|---|---|---|---|
| Wild-type | 40 | 52 | 60 | 30–72 | none |
| Heterozygous | 30 | 38 | 48 | 18–58 | 1 point at 65 |
| Homozygous KO | 10 | 14 | 22 | 4–30 | none |
Reading this table/plot:
- Median SOD activity drops roughly 73% from wild-type (52) to homozygous knockout (14), consistent with a dose-dependent gene effect.
- The heterozygote median (38) sits between the two homozygous classes but closer to the knockout, suggesting the wild-type allele is not fully dominant for this biochemical trait (incomplete dominance at the enzymatic level) — a pattern worth follow-up, though a boxplot alone cannot establish dominance or statistical significance; that requires a formal test such as ANOVA or a Kruskal-Wallis test.
- IQR shrinks from 20 (wild-type) to 12 (knockout), meaning the knockout plants are more uniformly low — plausible if residual SOD activity in knockouts comes from a single alternate pathway with little plant-to-plant variability, whereas wild-type activity may vary more due to additional regulatory inputs.
- The single outlier in the heterozygote group (65 units) is a candidate for follow-up: possibly a genotyping error, a contaminant, or genuine biological variation (e.g., an unusually active alternate SOD isoform) — the boxplot flags it, but does not explain it.
Common misconceptions & traps
| Misconception | Why it's wrong |
|---|---|
| "The whiskers show the full range (min to max) of the data." | Whiskers stop at the last non-outlier point within 1.5×IQR of the box; true extremes beyond that are shown as separate dots, not whisker ends. |
| "Points outside the whiskers are definitely errors and should be deleted." | The 1.5×IQR rule is a heuristic, not a statistical test; roughly 0.7% of normal data are flagged by chance, and skewed biological data are flagged even more often. Flag ≠ discard. |
| "A wider box always means a larger sample size." | Box width encodes spread (IQR) of the values, not n; some software scales box width to sample size (variable-width boxplots), but by default width is arbitrary/aesthetic. |
| "The line in the box is the mean." | It is the median. Mean and median coincide only for symmetric distributions; for skewed data they differ, and boxplots by default do not show the mean at all (though some add a separate mean marker). |
| "Boxplots show you if the data are bimodal." | They cannot — two overlapping peaks compress into the same quartile summary as one broad peak. A histogram or violin plot is needed to see multimodality. |
| "Non-overlapping boxes always mean a statistically significant difference." | Overlap in the boxes (or lack of it) is not equivalent to a formal hypothesis test; formal comparison requires an actual test (t-test, Mann-Whitney, ANOVA) with the sample sizes taken into account. |
The scientist behind it
Origins · 1 minJohn Wilder Tukey and how this was discovered
Tukey trained first as a chemist and mathematician at Brown University and Princeton, earning a PhD in mathematics in 1939, before turning his enormous analytical energy toward statistics during and after World War II work on gunnery and code-breaking-adjacent problems. At Bell Labs and Princeton he became one of the most inventive statisticians of the century, coining the terms "bit" (binary digit) and "software," co-inventing the Fast Fourier Transform algorithm with James Cooley, and pioneering robust statistics — methods designed to work well even when data don't follow tidy textbook distributions. His 1977 book Exploratory Data Analysis argued that before you test a hypothesis, you should look hard at your data using simple, assumption-light graphical tools — stem-and-leaf plots, and the box-and-whisker plot among them. The boxplot embodies his broader philosophy: let the data's shape, spread, and outliers show themselves visually, cheaply, and without committing to a distributional model in advance.
Where this matters today
Boxplots appear throughout modern biology wherever many groups need honest, assumption-light comparison. In genomics, RNA-seq quality-control pipelines routinely display a boxplot of log-expression values per sample across dozens of samples in a single figure, letting analysts spot a failed library prep instantly by an outlier-shifted box before running any downstream statistics. In clinical trials, boxplots compare biomarker distributions (e.g., blood pressure, viral load, tumor size) across treatment arms, flagging patients with extreme responses for individual chart review — often the first step toward finding adverse-event patterns or non-responders. In conservation biology, boxplots of body condition indices, contaminant loads, or genetic diversity metrics across populations or protected areas support management decisions, since they communicate variability and outlier individuals to non-specialist stakeholders more effectively than a table of statistics. In agriculture and plant breeding, boxplots compare yield, disease resistance scores, or nutrient content across cultivar trials with many treatment levels, a direct descendant of the enzyme-activity comparison worked through above. And in quality control and diagnostics, clinical laboratories use boxplot-style control charts (closely related to Shewhart charts) to monitor assay performance and flag values outside expected ranges, connecting directly to the coming discussion of Outliers in Biological Data and to the broader ethical and design questions covered in Displaying Data Honestly — since a poorly chosen or manipulated axis, bin, or omitted outlier can turn an honest boxplot into a misleading one.
Ask the tutor: How do I decide whether to use a boxplot, a violin plot, or a strip plot for a given biological dataset?
Why does the median line sometimes sit off-center in the box?
Because Q1 and Q3 are not symmetric around the median unless the data are symmetric. If the median line sits closer to Q1 (bottom of the box), the lower 25%-to-50% chunk of data is compressed into a smaller range than the upper 50%-to-75% chunk, indicating the data pile up below the median with a longer stretch above it — a signature of right skew. Combined with whisker asymmetry (a longer upper whisker), this is one of the clearest visual skew signals a boxplot offers, and it requires no distribution fitting to read.
Can two boxplots look identical even though the underlying data are very different?
Yes, and this is the single biggest limitation of the boxplot. Because it reduces a dataset to five summary landmarks, any distribution shape consistent with the same Q1, median, Q3, and whisker ends will produce an identical picture — a unimodal symmetric distribution and a bimodal (two-peaked) distribution can share the same five-number summary. This is why many modern biology papers pair boxplots with a jittered strip plot of the raw data points (sometimes called a "boxplot with data overlay") or use a violin plot, which draws the estimated density shape around the box.
How should I handle a flagged outlier in my own dataset?
Never delete it automatically just because the software drew it as a dot. First check for a data-recording or measurement error (transposed digits, wrong units, instrument malfunction) — if found, correct or legitimately exclude it. If no error is found, the observation may be genuine biological variation (a naturally extreme individual), and you should generally keep it, but consider reporting results both with and without it, or use a robust/non-parametric method less sensitive to extreme values (e.g., median-based tests) so your conclusions don't hinge on one point.
What's the difference between a boxplot and a violin plot?
A boxplot shows only the five-number summary (quartiles, whiskers, outliers); a violin plot adds a mirrored, smoothed density curve around that summary, showing the full estimated shape of the distribution, including multiple modes. Violin plots are more informative about shape but require a reasonably large sample size for the density estimate to be trustworthy and require choosing a smoothing bandwidth, an extra analytical decision the boxplot avoids entirely. Many modern figures overlay a boxplot on top of a violin plot to get both the reliable five-number summary and the shape information.
Do boxplots require the data to be normally distributed?
No — this is precisely their advantage over methods built on the mean and standard deviation. Quartiles and the median are computed directly from ranked data with no distributional assumption, so boxplots work equally well for symmetric, skewed, bounded, or heavy-tailed biological data (parasite counts, reaction times, gene expression ratios). This robustness is why boxplots, rather than mean ± SD bar charts, are increasingly required or recommended by journals for datasets with fewer than roughly 10–15 points per group, or with any suspected skew.
What does a "notched" boxplot add, and when should I use one?
Notches carve a V-shaped indentation into each side of the box around the median, with notch width based roughly on ±1.57 × IQR / √n. If the notches of two groups' boxplots do not overlap, that is reasonably good (though not proof-level) visual evidence that the two medians differ, roughly analogous to non-overlapping 95% confidence intervals. Notches are most useful for quick visual triage across many groups (e.g., dozens of gene-expression boxplots) before running formal pairwise tests, but they are only reliable with a sample size of roughly n ≥ 20 or so per group; with small n, notches become unstable and are best avoided.
How do I build a boxplot by hand if my sample size is even?
Sort the data, then find the median as the average of the two central values. For Q1 and Q3, split the data into a lower half (values below the median position) and upper half (values above), each containing exactly n/2 observations, and take the median of each half using the same odd/even rule recursively. For example, with n = 12, the median is the mean of the 6th and 7th sorted values; Q1 is the median of the first 6 values, and Q3 is the median of the last 6. Different software packages (e.g., R's seven quantile algorithms) can give slightly different Q1/Q3 values for the same data — always report which method you used if precision matters.