Order statistic Created 2026-09-24 Updated 2026-10-14
An order statistic is a value selected by its position in a sorted statistical sample. For real observations , writeThe th order statistic is the th smallest value, counting repeated values separately. The parentheses distinguish sorted position from the original observation label: and need not be equal. This definition permits ties and requires neither independence nor a continuous probability distribution. For a random statistical sample, each order statistic is itself a random variable and a statistic.
For example, the five fixed observationssort toTheir original indices in sorted order are , so . Their ranks of observations, listed in original observation order, are . Here is the minimum, is the sample maximum, and is the sample median. These are deliberately chosen observations, rather than simulated draws.
Order statistics put extremes and typical values in one language: the first and last locate the minimum and sample maximum, while intermediate positions give sample quantiles and the sample median. Under the existing generalized-inverse convention, the sample quantile at level is . For the five observations, the sample quantiles at are . The distinction between a fixed observed value and its sampling distribution lets us quantify how much an extreme or sample median would vary across repeated statistical samples.
The useful counting identity isFor independent and identically distributed random variables with a continuous cumulative distribution function , the count on the right has binomial distribution with parameters , givingThis cumulative distribution function is a binomial distribution tail: a question about sorting becomes a question about counting successes in Bernoulli trials. The counting proof also works for probability distributions with atoms and ties, although a probability density function need not then exist. For a uniform order statistic, on , which makes the formula particularly explicit.
Past exam of the mathematics course of the University of Cambridge 2005 iii Paper 41 1 Solution Created 2026-10-03 Updated 2026-10-14
scan reads the numerical prices, including the three missing-value markers, into a vector. The data must be read row by row for the subsequent factor construction to match them. The sample size available for analysis is therefore , rather than . The numerical summary describes the observed prices: the sample median is £43.54 and the sample mean is £46.94. The upper tail, particularly the boots, raises the sample mean above the sample median. These summaries mix very different products and are not adjusted country comparisons.The two character scans create labels.
gl(8,5,length=40,labels=item) makes a regression factor with each of eight item labels repeated five times. gl(5,1,length=40,labels=country) cycles through the five country labels once for each item. For a regression factor and numerical response, the two plot commands produce grouped box plots. The country box plots suggest lower US prices, while the item box plots show particularly expensive boots and inexpensive cardigans. They are descriptive displays of this small basket, with different item compositions where prices are missing; they cannot separate country effects from item effects.The first
lm fits an additive two-way analysis of variance:The constraints are R's usual treatment coding. The normal linear model used for the printed tests assumes independent errors with common variance and approximately a normal distribution, and no item-by-country interaction in the mean. Missing prices are omitted, leaving responses and independent mean coefficients. Thus the residual degrees of freedom are . This deletion is defensible for the conditional price model when missingness does not depend on the unobserved error after conditioning on the two factors; the output itself does not establish such a missing-data mechanism.The
anova tables report sequential sums of squares, rather than order-independent adjusted effects. If are the residual sums of squares from the intercept-only, country-only, item-only and additive fits, the first order allocates to country and to item. The second order allocates to item and to country. Both allocations sum to the same total explained sum of squares, and both end with the same residual sum of squares . The three missing combinations destroy balanced factorial orthogonality, so the allocation changes with order. To test country after allowing for items, use the country row in the second table; to test item after allowing for countries, use the item row in the first table. The first-entered rows do not supply those adjusted tests.Each mean square in ANOVA divides its sum of squares in ANOVA by its statistical degrees of freedom, and each printed F-statistic divides that mean square in ANOVA by . In particular, the adjusted country partial F-test haswith an reference F-distribution and p-value approximately . The adjusted item partial F-test gives on statistical degrees of freedom. Both factors contribute strongly under the additive normal linear model. The larger item sum of squares in ANOVA measures the much greater differences between these products, but is not evidence that every pair of items differs significantly.
The intercept is the fitted UK price for the reference jeans, not their observed price and not the overall sample mean. Each country regression coefficient is its adjusted price difference from the UK, assumed common across items: Sweden is £5.224 lower, France £10.708 lower, Germany £7.676 lower and the US £21.328 lower. Each item regression coefficient is its adjusted difference from the reference jeans, assumed common across countries. Thus the fitted UK boots price is , and the fitted US boots price is .
The coefficient standard errors come from , where and is the design matrix. Dividing each estimate by its standard error gives the displayed Student t-test statistic, with statistical degrees of freedom. The stars summarize the corresponding two-sided p-values. The individual tests compare each indicated country or item with its reference level, conditional on all other additive terms; they are neither tests of every pairwise comparison nor a simultaneous confidence interval procedure. In particular, Sweden's p-value provides weaker evidence than the other country contrasts, and does not establish equality with the UK. The intercept test has little substantive relevance, and interpreting many individual stars also raises multiple hypothesis testing issues.
The residual standard error measures unexplained prices in pounds. With total corrected sum of squares , the coefficient of determination and adjusted coefficient of determination areMuch of this impressive fit is due to the large differences between items. The overall F-test compares the additive fit with a constant mean: on statistical degrees of freedom. It tests that all eleven non-intercept coefficients vanish, not that the additive model is adequate. Regression diagnostics should examine regression residuals, changing price variability across items and possible interaction. Percentage differences may be more plausible than common pound differences, motivating a natural logarithm of price. No random sample of countries or products, and no independent replication of a price within a cell, is supplied; broad claims about all designer goods or the causes of country differences require more than these conditional tests.
Finally,
Item*Country expands to both main effects and their full interaction. A cell-means parameterization has one separate fitted mean for every observed cell. With one response per cell its design matrix has row matrix rank , while the full layout nominally has coefficients. Three coefficient combinations are aliased because their cells are missing. This is saturation of an unreplicated two-factor regression: every observed price is fitted exactly and the residual degrees of freedom are zero. The final fit has zero residuals, and no residual-based estimate of the error variance or ordinary interaction significance test. The printed numerical summary will mark three coefficients unestimable; coefficient standard errors, tests and adjusted involve undefined division by zero, potentially appearing as NaN or Inf according to numerical roundoff. Perfect interpolation here is a consequence of a saturated statistical model, not evidence for a superior predictive model. Past exam of the mathematics course of the University of Cambridge 2005 iii Paper 42 4 i Solution Created 2026-10-03 Updated 2026-10-14
At the standard normal distribution, symmetry and the odd Huber score give population root zero. For , the derivative of the clipped score is except at its two corners, which have zero normal probability. Put and write for the standard normal density. The sandwich variance of an M-estimator has numeratorUsing and integration by parts,ThereforeAs checks, it tends to as , the sample mean limit, and to as , the sample median limiting variance. The estimator variance for a sample of size is approximately this quantity divided by .
Past exam of the mathematics course of the University of Cambridge 2005 iii Paper 42 6 vi Solution Created 2026-10-03 Updated 2026-10-14
Population influence functions describe infinitesimal contamination; finite-sample analogues examine actual changes to an empirical sample. For its empirical distribution , add an observation and define the sensitivity curveUnder suitable differentiability it approximates the influence function. A replacement version is , approximately . Their supremum magnitudes quantify finite one-observation sensitivity.
The empirical influence function instead substitutes directly in . For a differentiable M-estimator this gives . For quantile functionals, a discrete unsmoothed empirical law may not admit the required density derivative; a sensitivity curve or a smoothed empirical law is then preferable.
Global contamination is measured by finite-sample maximum bias , where counts replacements. Under the convention of the first fraction that causes unbounded bias,This is the finite-sample replacement breakdown point. The largest replacement fraction still guaranteed bounded is one grid step smaller, so the conventions must be specified. One replacement sends a sample mean arbitrarily far, giving , while the ordinary scalar sample median has first-breaking fraction with the usual midpoint convention for even samples. Its limiting value is . Local influence and global breakdown answer different questions; a bounded influence function is not by itself a proof of a high breakdown point.
Past exam of the mathematics course of the University of Cambridge 2006 iii Paper 42 1 ii Solution Created 2026-10-03 Updated 2026-10-14
This is a symmetric beta distribution with parameters , so its mean and median are both . At the median its probability density function is , giving asymptotic variance for the sample median. Direct integration givesConsequently . The sample median has times the asymptotic variance of the sample mean, with asymptotic relative efficiency
Past exam of the mathematics course of the University of Cambridge 2006 iii Paper 42 1 i Solution Created 2026-10-03 Updated 2026-10-14
For the standard normal distribution, and , so the sample median has asymptotic variance under scaling by . The central limit theorem gives for the sample mean. Thus the sample median has times the asymptotic variance of the sample mean, and its asymptotic relative efficiency against the sample mean is
Past exam of the mathematics course of the University of Cambridge 2006 iii Paper 42 1 Solution 2026-10-14
The empirical distribution function gives each observation mass :The Glivenko-Cantelli theorem asserts the uniform, almost sure convergenceNo continuity of the distribution function is required. Here is a proof that also handles its jumps. Let be independent uniform random variables on , and write , where . The generalized inverse property gives , so, if is the empirical distribution function of the , then .
For a fixed positive integer , the strong law of large numbers applied at each of the finitely many grid points shows that almost surely. If , monotonicity sandwiches between its endpoint values, whenceTake the probability-one intersection of these events over all . On that event the limit superior is at most for every , hence is zero. Therefore . The coupled sequence has the same joint law as any independent sample from , which proves the asserted almost sure conclusion for the original sample.
For , the sample quantile iswhere denotes the th order statistic, with repeated observations retained. Suppose the population median is unique and is continuously differentiable in a neighbourhood of , with probability density function . ThenTo see the variance directly, fix and count observations below . This count has a binomial distribution with success probability . The event that the sample median is below this point is that the count is at least . The central limit theorem for this binomial triangular array gives a limiting probability , exactly the displayed normal distribution. Centering is necessary for stating the limiting distribution; subtracting the deterministic population median has no effect on the asymptotic variance requested in the comparisons.
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 31 1 Solution Created 2026-10-03 Updated 2026-10-07
The expected check loss is finite because . It is also Lipschitz in its location argument, with constant at most one. For any fixed , the continuous distribution function makes . The derivative of with respect to , away from that null event, is . Difference quotients are bounded by one, so the dominated convergence theorem givesThe continuous, strictly increasing distribution function has limits zero and one. Its derivative expression changes sign exactly once, from negative to positive, and henceEquivalently the difference between the expected losses at and is , positive whenever . This proves population quantiles minimize check loss directly.
For the regression argument, define the population risk and its empirical version . Boundedness of and integrability of the error give integrability of and of all these losses. Conditional on , the conditional distribution of the error has unique -quantile zero. Applying the preceding calculation conditionally shows that its expected loss is uniquely minimized when the fitted displacement equals zero. Thuswith strict inequality whenever that displacement is nonzero on an event of positive probability. The stated identifiability assumption therefore makes the unique population minimizer. This is conditional quantile identification.
The Lipschitz property of the check loss givesContinuity of and its uniform bound, followed by dominated convergence, show that is continuous on .
For the intended estimator constrained to , here is the entire argmin consistency under uniform convergence in probability argument, rather than an invocation of an M-estimator theorem. For a fixed , let . If this set is empty, there is nothing to prove. Otherwise it is compact, and continuity and uniqueness give a strictly positive gapLet . If minimizes , thenConsequentlyThe constrained estimator is consistent. Existence of a constrained minimum follows from continuity of the sample criterion and compactness. The argument applies to any measurable choice of minimizer.
There is an actual domain defect in the printed definition: its minimization is over all of , whereas the assumed uniform convergence in probability is only on . That literal unconstrained consistency claim is false. The preceding conclusion needs minimization over , or another assumption that confines the selected minimizers to a set where the convergence and separation arguments apply. No change of question heading is needed to make this qualification explicit.
Here is a counterexample satisfying even identifiability over the whole line. Take a constant covariate, independent standard normal errors, , , , andThis is bounded and continuous, has range , and vanishes only at zero. The conditional error distribution function is continuous and strictly increasing with median zero. The compact-set uniform law of large numbers also holds: the loss is , Lipschitz in , so a finite grid in reduces its uniform difference to finitely many integrable sample averages plus an arbitrarily small grid error. The weak law of large numbers then gives the asserted convergence.
Let be a sample median, and put . Absolute loss over the range is minimized at . Choose the following global empirical minimizer:Solving the quadratic in shows , so this really minimizes the criterion over the whole line. For odd , symmetry and continuity give . Moreover in probability: for each fixed positive , the proportion of observations below converges to a number greater than one half, and the analogous proportion below converges to a number less than one half. Thereforealong odd . The selected unconstrained estimator is not consistent. This illustrates why a global argmin may escape a compact convergence set.
Past exam of the mathematics course of the University of Cambridge 2021 iii Paper 223 1 a Solution 2026-09-28
Let . Since has an everywhere positive density, it is continuous and strictly increasing, so . Membership in the Kolmogorov neighborhood of a distribution givesBy the symmetry of the standard normal distribution,The stated asymptotic-bias formula for the sample median therefore yields
Past exam of the mathematics course of the University of Cambridge 2021 iii Paper 223 3 a Solution Created 2026-09-28 Updated 2026-10-03
Write . If is odd, the sample median equals one observation, with equally many below and above it; the corresponding terms cancel and the median term is zero. If is even, the conventional median lies strictly between the two middle observations when the are distinct, so exactly half the terms are and half are . In either caseHence is a Scale M-estimator.
Past exam of the mathematics course of the University of Cambridge 2022 iii Paper 223 2 c Solution Created 2026-09-28 Updated 2026-10-03
As , the Huber estimating equation approaches the sign equationwhose solution is the sample median. Hence the most B-robust location M-estimator is the median, with minimum gross-error sensitivity
Sample median Created 2026-09-28 Updated 2026-10-14
The sample median is a central value of an ordered statistical sample. The usual numerical convention selects the middle order statistic for odd sample size and the arithmetic mean of the two central order statistics for even sample size:NIST uses this convention. [ref]
https://www.itl.nist.gov/div898/handbook/eda/section3/eda351.htm. NIST: measures of location, median definition
. For , the sample median is ; for , it is , which need not be an observed value.More generally, every value between the two central order statistics in an even statistical sample is a median of its empirical distribution function. The generalized-inverse sample quantile at selects the lower central order statistic in that case, so it can differ from the midpoint convention. Ties are allowed in all these definitions.
The sample median measures the center using sorted positions. Changing the largest observation from to in the five-value example leaves the sample median at , while the sample mean rises from to . Its sampling distribution still depends on the population probability distribution: the mean found for five observations from a uniform distribution is a special calculation, and a sample median's expected value need not equal the population median in general.
For a concrete counterexample, three independent and identically distributed random variables with rate-one exponential distribution have sample median with expected value , by independent exponential order-statistic spacings. The population median instead solves , giving . Thus even the middle order statistic can have mean different from the population median.
