Order Statistics
Sort a sample and each position becomes a statistic: the smallest, the median, the largest. Each has its own exact distribution you can write down.
Why Does This Exist?
Models ship on extremes and quantiles: worst-case latency, median income, top-1 retrieval score. Sample means have the CLT; extremes do not, and their behavior surprises people who only know averages. The maximum of 100 draws sits far above the mean, and its distribution has a closed form.
Order statistics give that form. For i.i.d. draws with CDF : and . They ground descriptive statistics in sampling theory and feed tolerance intervals in confidence intervals.
The one idea you need first
Sorting does not create information; it renames it by rank. The median of is , the third of five sorted values. Ranks turn "how big" into "how many fall below".
Think of It Like This
Race finish order
Five runners finish in some order. Nobody records times, only places: first, middle, last. The middle finisher's time estimates the typical pace; the winner's time estimates the frontier.
Knowing the pack's time distribution predicts each place's time distribution. Where it stops: runners interact and pace each other, while the clean formulas need i.i.d. draws with no jostling.
How It Actually Works
For i.i.d. continuous draws with pdf and CDF , the -th order statistic has density . In words: draws below, one near , above, times arrangements. The joint law of all is on the sorted simplex.
Worked example
Sample sorted is : median , max , range . If draws are Uniform, then and . Expected max is , so 8.9 runs slightly hot but well within range.
Code
import numpy as np
rng = np.random.default_rng(6)draws = rng.uniform(0, 10, size=(50000, 5))print(round(float(draws.max(axis=1).mean()), 3)) # -> 8.333Fifty thousand groups of five average a max of 8.333, matching . Medians average near 5.0 by symmetry.
Watch Out For
Treating the max like a mean
The max has no CLT at the usual rate and skews hard: it piles near the top with a long left tail. Averaging maxima across folds and reporting symmetric error bars understates downside risk.
Model extremes with or extreme-value theory, not with . Plot the max's histogram before quoting it.
Using iid formulas on dependent data
Time series, retrieval lists, and beam outputs correlate, so overstates how fast the max concentrates. The effective sample size is smaller than .
Estimate the max's law by block bootstrap or by modeling dependence. If shuffling the data moves the max's histogram, independence fails.
The Quick Version
- Sorted draws to name the min, median, max, and range.
- I.i.d. maximum: ; minimum mirrors with survival powers.
- Five Uniform draws average a max of about 8.333, not 5.
- The -th density counts arrangements of below, near, and above.
- Extremes skew and need their own theory, never mean-style error bars.
- Dependence breaks ; verify with shuffles or block resampling.