Quant Memo
Core

Order Statistics

What you get when you sort a random sample — the minimum, the maximum, the median, the k-th smallest. The tools for reasoning about extremes, records, and worst cases.

Prerequisites: Random Variables & Distributions, Common Distributions

Take a random sample of nn numbers and sort them from smallest to largest. The sorted values are the order statistics. We write the smallest as X(1)X_{(1)}, the next as X(2)X_{(2)}, and so on up to the largest, X(n)X_{(n)}. The minimum, the maximum, the median, the 90th percentile of a sample — these are all order statistics, and they answer the questions that plain averages can't: how bad is the worst case, how long until the first failure, how big is the record so far.

The reason order statistics need their own theory is that even when your raw draws are independent and identically distributed, the sorted values are neither: the minimum and maximum are tied together by the very act of sorting. So we build their distributions from scratch.

The two easy ones: max and min

The maximum is small only if every draw is small. Since the draws are independent, the probability they're all below a level xx is the product of the individual probabilities. If each draw has cumulative distribution F(x)=P(Xx)F(x) = P(X \le x), then

P(X(n)x)=F(x)n.P(X_{(n)} \le x) = F(x)^n .

The minimum works the mirror-image way: the minimum exceeds xx only if every draw exceeds xx, so

P(X(1)>x)=(1F(x))n.P(X_{(1)} > x) = \bigl(1 - F(x)\bigr)^n .

Both come straight from "all of them at once = multiply." The general kk-th order statistic has a tidier-looking density built from the same logic, but the max and min carry most of the intuition.

The maximum's distribution is F(x)nF(x)^n and the minimum's survival is (1F)n(1-F)^n — both because "all nn draws at once" means multiplying nn independent probabilities. Extremes are governed by products, which is why they behave so differently from averages.

0 1 min X(1) median X(3) max X(5) five draws, sorted — evenly spaced on average
Sort five draws and they line up as order statistics. For draws that are uniform on 0 to 1, the sorted values sit at the marks that cut the interval into equal pieces — on average 1/6, 2/6, …, 5/6.

Worked example: the expected max of five uniform draws

Suppose you draw five independent numbers uniformly from 00 to 11. Where do you expect the largest to land? A beautiful result says that for the uniform on 00 to 11, the kk-th smallest of nn draws has expected value

E[X(k)]=kn+1.E\bigl[X_{(k)}\bigr] = \frac{k}{n+1} .

The nn draws chop the interval into n+1n+1 gaps that are equal on average, so the sorted values sit at the fence-posts. With n=5n = 5: the expected minimum is 160.167\tfrac{1}{6} \approx 0.167, the expected median is 36=0.5\tfrac{3}{6} = 0.5, and the expected maximum is 560.833\tfrac{5}{6} \approx 0.833. Notice the maximum crawls toward 11 only slowly — even with n=5n = 5 it's not at 0.990.99, it's at 0.830.83. Adding more draws pushes it up as nn+1\tfrac{n}{n+1}, a stubbornly gradual climb.

Worked example: first failure among many

Order statistics of the exponential have a clean shortcut. If nn components each fail at an independent exponential time, the minimum — the first failure — is itself exponential, but with the rates added together. Say you run 1010 machines and each has a mean life of 100100 days (rate 1100\tfrac{1}{100} per day). The first failure among the ten is exponential with rate 10×1100=11010 \times \tfrac{1}{100} = \tfrac{1}{10}, so its mean is

E[first failure]=110 per day    10 days.E\bigl[\text{first failure}\bigr] = \frac{1}{10} \text{ per day} \;\Rightarrow\; 10 \text{ days}.

Ten machines fail first ten times sooner than one machine fails on its own. This is exactly why systems built from many parts break far earlier than any single part's average life suggests.

For exponentials, the minimum of nn of them is exponential with the rates summed. The more parallel parts you run, the sooner the first one dies — a fact that quietly governs reliability, race conditions, and "first to hit a level" problems.

Pitfalls

  • Extremes are volatile. The maximum and minimum have much larger sampling variability than the mean; a single new record can be far from the last one, so never treat an observed max as a stable estimate.
  • The tail shape is everything. The behaviour of X(n)X_{(n)} is driven entirely by the far tail of FF. Heavy tails make the maximum wander enormously, which is why fat-tailed markets produce record moves that a normal model would call impossible.
  • Independence and identical distribution are assumed. Sorting correlated or non-identical draws breaks the clean product formulas above.

Don't read the sample maximum as "roughly the true worst case." Extreme order statistics have fat sampling variance, and their behaviour hangs entirely on the tail of the distribution — the exact region where real data disagrees most with tidy models.

Related concepts

Practice in interviews

Further reading

  • David & Nagaraja, Order Statistics
  • Casella & Berger, Statistical Inference, ch. 5
ShareTwitterLinkedIn