Box Plots
Box plots summarise numerical data using a median, quartiles and whiskers that show selected extremes of the distribution. In brief: a box from Q₁ = 3 to Q₃ = 7 with a median at 5 shows the middle spread and centre. Under a common 1.5-IQR rule, sufficiently distant observations are plotted separately as potential outliers.
Different box-plot conventions use different quartile and whisker definitions, so the legend or stated method matters. This guide explains the five-number summary, constructs a complete example and shows how to compare groups without reading more information into the plot than it contains.
What do the parts of a box plot represent?
The box extends from the first quartile Q₁ to the third quartile Q₃. A line inside the box marks the median Q₂. The box length is the interquartile range, IQR = Q₃ − Q₁, which describes the central spread of the ordered observations.
Whiskers extend from the box toward lower and upper values according to a stated rule. Some elementary plots use the minimum and maximum. Modified box plots commonly use the most extreme observed values within 1.5 IQR of the quartiles and display more distant observations separately.
A box plot can be horizontal or vertical without changing its meaning. The numerical axis gives the measured values, and the other direction separates groups or provides room for the box. Read the scale carefully; equal-looking boxes can represent different spreads if separate panels use different numerical scales.
What is the five-number summary?
The five-number summary consists of minimum, first quartile, median, third quartile and maximum. It records the full observed span and three central landmarks. A simple minimum-to-maximum box plot uses these values directly, while a modified plot may place its whiskers inside the actual extremes.
Quartile conventions differ. Here, sort the data and use medians of the lower and upper halves, excluding the overall median from both halves when the sample size is odd. Stating this method makes the numerical example reproducible and helps explain differences from software that uses interpolation.
For 1, 2, 3, 4, 5, 6, 7, 8, 20, the median is 5. The lower half 1, 2, 3, 4 gives Q₁ = 2.5, and the upper half 6, 7, 8, 20 gives Q₃ = 7.5. The five-number summary is therefore 1, 2.5, 5, 7.5, 20.
How does the 1.5-IQR rule identify potential outliers?
Calculate IQR = Q₃ − Q₁, then define the lower fence as Q₁ − 1.5 IQR and the upper fence as Q₃ + 1.5 IQR. Observations below the lower fence or above the upper fence are flagged as potential outliers under this convention.
For the example, IQR = 7.5 − 2.5 = 5. The lower fence is 2.5 − 7.5 = −5, and the upper fence is 7.5 + 7.5 = 15. The observation 20 is above 15 and is therefore plotted separately, while values 1 through 8 lie within the fences.
The fences are thresholds, not usually the whisker endpoints. The whiskers end at the smallest and largest actual observations inside the fences, which are 1 and 8 here. Drawing the upper whisker at 15 would show an unobserved threshold instead of the required observed value.
How do you construct a box plot step by step?
Start with a labelled numerical axis covering the data range. Mark Q₁ = 2.5 and Q₃ = 7.5, then draw the box between them. Place the median line at 5. The centre line divides the ordered data, but it need not lie halfway across the box in every dataset.
For the modified plot, extend the lower whisker from 2.5 to 1 and the upper whisker from 7.5 to 8. Plot the value 20 as a separate point beyond the upper whisker. Include a note that the plot uses median-of-halves quartiles and the 1.5-IQR whisker rule.
A text summary can preserve the same information when a graphical figure is unavailable: lower whisker 1, box 2.5 to 7.5, median 5, upper whisker 8, separate point 20. This description is more precise than an unscaled decorative sketch and can be used to reconstruct the plot accurately.
- Sort the observations and state the quartile convention.
- Calculate Q₁, median, Q₃ and IQR.
- Calculate fences if using a modified box plot.
- Locate the extreme observed values within the fences.
- Draw the box, median and whiskers, then mark outside observations.
Worked box-plot summary table
The table separates raw-data extremes, quartile landmarks, fences and whisker endpoints. Keeping these categories distinct is important because a modified plot does not put every five-number-summary value at a whisker tip. The maximum remains 20 even though the upper whisker stops at 8.
If the same dataset were drawn using minimum-to-maximum whiskers, the upper whisker would extend to 20 and no separate outlier rule would be applied. Both plots could be valid under their stated conventions, but they would communicate the extreme value differently.
When reading an unfamiliar plot, look for its definition rather than assuming a universal whisker rule. The box and median usually have familiar meanings, but quartile algorithms, whisker thresholds and treatment of ties can differ. A clear caption makes the summary interpretable without requiring the reader to guess those choices.
| Feature | Value |
|---|---|
| Minimum | 1 |
| Q₁ | 2.5 |
| Median | 5 |
| Q₃ | 7.5 |
| Maximum | 20 |
| IQR | 5 |
| Lower and upper fences | −5 and 15 |
| Lower and upper whiskers | 1 and 8 |
| Separately plotted observation | 20 |
How do you compare groups using box plots?
Compare medians to assess differences in central position, then compare box lengths to assess IQR differences. A higher median indicates a higher central ordered value on the common scale. A longer box indicates a wider middle spread, not a larger sample size.
Compare whisker lengths and separate points to assess the displayed tails and extremes under the same convention. One group may have a narrow central box but several distant observations, while another has a broad box and no flagged points. These patterns describe different aspects of variation that a mean alone would conceal.
Use a common numerical scale and compatible measurement definitions across groups. Also report sample sizes when relevant, because ordinary box widths do not necessarily encode them. A visual difference between medians does not by itself establish statistical significance or a causal explanation for the group difference.
What can a box plot tell you about distribution shape?
Unequal whisker lengths or an off-centre median can suggest asymmetry. A long upper tail may indicate right-skewed data, while a long lower tail may indicate left-skewed data. These are clues rather than a complete reconstruction of the distribution, especially in small samples or datasets with ties.
A box plot does not show every observation, the exact mean or the detailed arrangement within each quartile region. Different datasets can share the same five-number summary while having different clusters or gaps. A dot plot or histogram can provide that additional detail when the internal distribution matters.
The background purpose of a box plot is compact comparison. It deliberately compresses a dataset into a small set of positional landmarks so multiple groups can be displayed efficiently. That compression is useful, but it also explains why the plot should not be treated as a complete picture of all data features.
What mistakes should you avoid when reading box plots?
Do not confuse a long box section with more observations. Quartiles divide ordered positions into roughly equal portions, while the widths show how spread out those portions are. With finite samples, ties and interpolation, statements about exactly 25% in every visible segment need careful interpretation.
Do not assume the median is the mean or that a point beyond a fence is necessarily erroneous. A flagged observation may be valid and informative. Investigate its context before deciding how to handle it, and avoid deleting points solely to make the plot more symmetric.
Finally, distinguish fences from whiskers and state conventions consistently. Check that every whisker endpoint is an actual permitted observation under the chosen rule, that all outside observations are marked and that the axis covers the full displayed range. These details make the plot a faithful summary rather than a generic box shape.