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 numbers and sort them from smallest to largest. The sorted values are the order statistics. We write the smallest as , the next as , and so on up to the largest, . 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 is the product of the individual probabilities. If each draw has cumulative distribution , then
The minimum works the mirror-image way: the minimum exceeds only if every draw exceeds , so
Both come straight from "all of them at once = multiply." The general -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 and the minimum's survival is — both because "all draws at once" means multiplying independent probabilities. Extremes are governed by products, which is why they behave so differently from averages.
Worked example: the expected max of five uniform draws
Suppose you draw five independent numbers uniformly from to . Where do you expect the largest to land? A beautiful result says that for the uniform on to , the -th smallest of draws has expected value
The draws chop the interval into gaps that are equal on average, so the sorted values sit at the fence-posts. With : the expected minimum is , the expected median is , and the expected maximum is . Notice the maximum crawls toward only slowly — even with it's not at , it's at . Adding more draws pushes it up as , a stubbornly gradual climb.
Worked example: first failure among many
Order statistics of the exponential have a clean shortcut. If 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 machines and each has a mean life of days (rate per day). The first failure among the ten is exponential with rate , so its mean is
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 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 is driven entirely by the far tail of . 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