Quant Memo
Foundational

Five-Number Summary and Box Plots

A compact way to describe a batch of numbers — minimum, first quartile, median, third quartile, maximum — and the standard picture (a box plot) that turns those five numbers into a shape you can compare across many groups at a glance.

Prerequisites: Order Statistics, Standard Deviation

You have a year of daily P&L for a strategy and want to describe it in a sentence before diving into anything fancier. "The mean daily P&L was $1,200" tells you almost nothing on its own — a single $500,000 blow-up day and 250 quiet days averaging $800 can produce the exact same mean as 250 consistently solid $1,200 days, yet those are completely different risk profiles. The mean is easily dragged around by a few extreme values, and standard deviation shares the same weakness. What you often want first is a description built entirely from positions in the sorted list — which value is in the middle, which values mark off the middle chunk, which values are the extremes — because those don't budge much just because one day was wild.

An analogy: a classroom's height lineup

Line up thirty students from shortest to tallest. Five landmarks describe the whole line without you needing to write down all thirty heights: the shortest student, the tallest student, the student standing exactly in the middle, and two more students — one a quarter of the way along the line, one three-quarters of the way along. Those five positions tell you the full spread of the line, where the crowded middle sits, and how far the extremes stick out, all without being thrown off if one kid happens to be freakishly tall. That's the whole idea of the five-number summary: describe the shape of a batch of numbers using landmarks in the sorted order, not an average that any one extreme value can drag around.

The five numbers, one symbol at a time

Sort your nn observations from smallest to largest. The five landmarks are:

  • Minimum, min\min — the smallest value.
  • First quartile, Q1Q_1 — the value one-quarter of the way through the sorted list (25% of observations lie below it).
  • Median, Q2Q_2 — the value exactly in the middle (50% of observations lie below it).
  • Third quartile, Q3Q_3 — the value three-quarters of the way through (75% of observations lie below it).
  • Maximum, max\max — the largest value.

The middle 50% of the data, from Q1Q_1 to Q3Q_3, is called the interquartile range:

IQR=Q3Q1.IQR = Q_3 - Q_1 .

In plain English: the IQR is the width of the box that contains the "typical" middle half of your observations, ignoring the bottom and top quarters entirely — a spread measure that a single wild outlier can barely move, unlike the standard deviation.

A box plot draws this directly: a box from Q1Q_1 to Q3Q_3 with a line at the median, and whiskers extending out to the most extreme point still within

[Q11.5×IQR,    Q3+1.5×IQR],[\,Q_1 - 1.5 \times IQR,\;\; Q_3 + 1.5 \times IQR\,] ,

with any points beyond that range plotted individually as dots — flagged as candidate outliers. In plain English: the whiskers stretch to cover "normal-looking" spread beyond the box, using 1.5 box-widths as a conventional cutoff, and anything further out gets drawn separately so it doesn't silently stretch the whisker to hide how far away it really is.

Worked example 1: eleven days of P&L by hand

Sorted daily P&L ($000s): 8,3,1,0,2,4,5,6,9,12,40-8, -3, -1, 0, 2, 4, 5, 6, 9, 12, 40. With n=11n=11, the median is the 6th value: Q2=4Q_2 = 4. Q1Q_1 is the median of the lower half (values 8,3,1,0,2-8,-3,-1,0,2): the middle of those five is Q1=1Q_1 = -1. Q3Q_3 is the median of the upper half (5,6,9,12,405,6,9,12,40): Q3=9Q_3 = 9. So:

IQR=9(1)=10.IQR = 9 - (-1) = 10 .

The whisker fence is Q11.5×10=16Q_1 - 1.5 \times 10 = -16 on the low side and Q3+1.5×10=24Q_3 + 1.5 \times 10 = 24 on the high side. Every value except 40 falls inside [16,24][-16, 24], so the upper whisker stops at 12 (the largest point still inside the fence) and 40 is flagged as an outlier, plotted as an isolated dot. The five-number summary — (8,1,4,9,40)(-8, -1, 4, 9, 40) — immediately tells you the typical day nets a few thousand dollars, half the days fall between −$1,000 and $9,000, and there's one exceptional $40,000 day sitting well outside the normal pattern, all without a mean or standard deviation calculation that $40,000 day would have dominated.

Worked example 2: comparing two strategies side by side

Two strategies, summarized:

MinQ1Q_1MedianQ3Q_3MaxIQR
Strategy A8-81-1449940401010
Strategy B2-21133559944

Strategy A has a higher median (44 vs 33) but a much wider IQR (1010 vs 44) — its typical middle-half spread is 2.5× wider. Strategy B's box sits in a tight band from 1 to 5, meaning most days cluster close together, while A's box from 1-1 to 99 shows a much more dispersed "normal" outcome even before considering the $40,000 outlier day. If you only compared the two means, you might miss that A's slightly higher average return comes with meaningfully more day-to-day variability in the typical (non-outlier) range — exactly the comparison a five-number summary is built to surface at a glance.

-10 40 Strategy A Strategy B
Strategy A's box is taller (larger IQR) and sits higher, with a flagged outlier dot above its whisker. Strategy B's box is tight and low, with no outliers — a comparison that a table of means alone would not show as clearly.
min Q1 median Q3 max whisker outlier
Anatomy of one box plot: the box spans Q1 to Q3 with a line at the median, whiskers extend to the furthest non-outlier point, and points beyond the fence are plotted individually.

What this means in practice

Box plots are the fastest way to eyeball dozens of strategies, factors, or backtests side by side — lining up their boxes reveals which ones are tightly consistent versus wildly dispersed, and which have outlier days worth investigating individually, before you compute a single formal statistic. Because the five-number summary is built from sorted positions rather than sums, it's naturally robust to the exact kind of fat-tailed, outlier-prone data that finance produces constantly, which is precisely where mean-and-standard-deviation summaries are least trustworthy. It's a description, not an inference — a box plot tells you what the data looks like, not whether a difference between two groups is statistically significant, for which you'd reach for a formal test.

The five-number summary (min, Q1Q_1, median, Q3Q_3, max) and the box plot that draws it describe a batch of data using positions in the sorted order rather than a mean, making them resistant to the exact kind of extreme values that finance data is full of. The interquartile range, Q3Q1Q_3 - Q_1, measures the spread of the typical middle half and is the basis for the standard 1.5×IQR rule for flagging outliers.

The classic mistake is treating the 1.5×IQR whisker rule as a definition of "real" outliers to be deleted, rather than a visualization convention for what to look at more closely. A point outside the whiskers might be a data error worth removing — or it might be the single most informative observation in the dataset, like the one day a strategy's tail-risk hedge paid off. Never automatically drop box-plot outliers before understanding, case by case, why each one is there.

Related concepts

Practice in interviews

Further reading

  • Tukey, Exploratory Data Analysis, ch. 2
  • Wasserman, All of Statistics, ch. 6
ShareTwitterLinkedIn