Asymptotic distribution of a sample median Created 2026-09-24 Updated 2026-11-05
Let be independent and identically distributed random variables with unique median , and let their probability distribution have continuous probability density function with . For odd , the sample median satisfiesThe influence function of the sample median has mean zero and variance : each of its two nonzero values occurs with probability . Its asymptotic linear representation, followed by the central limit theorem, gives the displayed limit.
For a standard normal distribution, , so the asymptotic variance of the unscaled sample median is . The sample mean instead has variance in that model. This quantifies an efficiency cost at the reference model without contradicting the sample median's bounded response to an outlier.
Box plot 2026-10-14
A box plot compresses a statistical sample into a box spanning its lower and upper quartiles , a line at its median , and two whiskers. It makes location and central spread easy to compare across groups on a common value axis. The box represents the central half in terms of quantile levels; with ties or interpolated quartiles, it need not contain exactly half the observations. Whisker endpoints require a stated convention: they can be the observed extremes, or they can stop short of separately marked observations. [ref]
https://www.itl.nist.gov/div898/handbook/eda/section3/boxplot.htm. NIST/SEMATECH, Box Plot, definition and variants
Here is one explicitly toy dataset, reused under histogram: twelve invented, unitless values, with repeated values counted separately, already arranged as order statistics:For this box plot we choose the interpolated quartiles defined under quartile, using R's type-7 rule. This givesThe interquartile range is . Our whisker convention uses the fencesThe whiskers end at the smallest and largest observations in the closed interval : here and . Values strictly outside the fences receive separate outlier markers: here only . An observation exactly on a fence is retained within the whisker under this convention. The fences are thresholds, not observed whisker endpoints; the upper whisker is at , not . R's documented whisker rule likewise includes observations no more than box lengths away, although its box uses hinges, which can differ from our type-7 quartiles. [ref]
https://stat.ethz.ch/R-manual/R-devel/library/grDevices/html/boxplot.stats.html. R grDevices documentation, boxplot.stats, coef and hinges
A separate outlier marker is a prompt to investigate, not a finding that the value is bad data and not an instruction to delete it. A distant observation can be a recording error, a legitimate unusual outcome, or evidence that the assumed statistical model misses some behavior. Check its provenance and context before deciding how to analyze it. No measurement-error claim is possible for our invented : we deliberately put it there to demonstrate the rule. [ref]
https://www.itl.nist.gov/div898/handbook/eda/section3/eda35h.htm. NIST/SEMATECH, Detection of Outliers, labeling and investigation
The beauty of a box plot is its compact comparison of ordered positions rather than every observation. That compression also loses information: many different statistical samples have the same quartiles and whiskers, so the box alone cannot reveal every cluster or gap that a histogram might show. For example, replacing the two invented values by and leaves the type-7 quartiles, whiskers and separate marker unchanged. Displaying the individual values alongside the box plot is especially helpful for such a small statistical sample. Always state both the quartile rule and the whisker rule; changing either can change which values are marked.
Huber location response to one outlier 2026-10-18
Hold fixed and move only the sixth observation . For , the sample mean is , the sample median is , and the Huber location estimator with fixed stays at . Once , its Huber score is already ; moving it farther changes the Huber loss but leaves the root unchanged.
For a closer view of the transition, the exact Huber location estimator over isTo verify the first branch, when the score of is saturated and the other five scores sum with it to . When , the score of is saturated instead, giving the same expression. At , the moving observation saturates too, and the equation becomes . The piecewise formula is continuous at the transition.
The rising sample mean comes from an unbounded linear score, the flat distant-outlier response from a bounded Huber score. This is a finite-data response curve with a specified scale and threshold, rather than a population influence function or a general claim about arbitrary numbers of outliers.
Huber loss Created 2026-09-24 Updated 2026-10-18
The Huber loss is quadratic near zero and linear beyond a fixed cutoff; its derivative is the clipped Huber score.
For threshold , the Huber loss is the loss functionThe subtraction makes the values meet at ; the slopes also meet, so the Huber loss is continuously differentiable with Huber score as its derivative. It is a convex function, since that derivative is a monotone function. These quadratic and linear pieces define the original clipped location criterion.[ref]
For , , , and , whereas the squared criterion at is . Increasing a standardized difference from to raises the Huber loss by , but raises the squared criterion by . The compromise preserves quadratic sensitivity to small differences while limiting the slope for large ones. This makes the Huber loss useful when ordinary observations should retain their detailed distances yet isolated outliers should exert limited pull.
For a fixed finite dataset and scale, taking large enough that every difference from the sample mean lies within recovers that sample mean. Toward the other extreme, for each fixed , as , connecting the criterion to median minimizes expected absolute loss. The normalization is essential: putting into the unscaled Huber loss gives zero everywhere, not a usable median criterion.
Laplace median robustness example 2026-10-18
Choose the five numbers as an original illustration. Their sample median is 2 and their sample mean is 4. The sum of absolute losses at the sample median isIf these numbers were modeled as an independent and identically distributed Laplace distribution sample, the joint maximum-likelihood estimates would therefore be and . Using the sample mean instead gives , so it does not maximize this likelihood function.
Now replace only 10 by 100. The sample median stays at 2, while the sample mean becomes . The minimized sum of absolute losses rises to , and the fitted scale rises to . Stability of the fitted location therefore does not mean stability of every fitted parameter.
The left panel subtracts each objective's minimum so the two absolute loss curves can be compared despite the different totals. The right panel tracks the sample mean and sample median as the largest chosen value changes. This is an outlier sensitivity illustration, not actual observations or a check that a Laplace distribution fits any population. In applications, regression residuals and the data-generating assumptions need separate examination; a stable sample median alone does not validate a statistical model.
Laplace regression Created 2026-09-24 Updated 2026-10-18
For linear regression with fixed predictor vectors , assume conditionally independent responses with a common scale :Each conditional median and mean is . The log-likelihood function is , so maximum likelihood estimation minimizes the sum of absolute regression residuals:This is least absolute deviations. With only an intercept, it reduces to the Laplace location and scale maximum likelihood problem, so a sample median is a fitted intercept. Provided the minimum , the scale estimate is ; the conditional standard deviation is . If the scale is denoted instead of , the conditional standard deviation is .
Minimizing a sum of absolute losses does not automatically give a unique coefficient vector. Even an intercept-only fit to an even sample size can have an interval of solutions, and redundant predictor columns can introduce further nonuniqueness. If a fit makes every regression residual zero, the joint likelihood function is unbounded as , so there is no finite joint maximum-likelihood estimate with positive scale.
The linear growth of absolute loss limits sensitivity to an extreme response at fixed predictors compared with squared-error loss. It does not protect against every outlier: an extreme predictor can have large regression leverage. The numerical example above changes a response in an intercept-only problem, and makes no general claim of immunity to such predictor changes.
Location estimator 2026-11-05
A location estimator estimates the common shift in a location family, for example observations with a fixed error probability distribution. A translation-equivariant estimator obeysChanging the origin of measurement then shifts the estimate by the same amount. Both the sample mean and sample median have this property, but their sensitivity to an outlier differs.
For observations , both estimates equal . Replacing by changes the sample mean to while leaving the sample median at . This illustrates resistance to an extreme observation, not a claim that the sample median is optimal under every probability distribution. A location parameter need not be a population mean: a Cauchy distribution has a location parameter although its expected value does not exist.
Past exam of the mathematics course of the University of Cambridge 2010 iii Paper 37 1 Solution Created 2026-10-03 Updated 2026-10-14
The least-squares estimator minimizes . Differentiation gives , and the full column rank of makes positive definite. HenceThe fitted values are , where the hat matrix is . The regression residuals are . Since is the orthogonal projection matrix onto the column space of , andThis is a singular multivariate normal distribution supported on the -dimensional orthogonal complement of the column space: its components are generally correlated. The equality puts the fitted vector in that column space, while expresses fitted-residual orthogonality. No residual component lies in an explanatory direction that could improve the least-squares fit.
For the calibration model, write for a reading and for the known amount. The first fit assumes with independent errors. Its residual-versus-fitted plot has systematic changes in group means and an increasing within-group spread. These suggest both a nonlinear mean relationship and heteroscedasticity, rather than the random scatter expected from a satisfactory normal linear model.
The Box–Cox transformation plot is a profile log-likelihood for the power parameter . Its maximum is near ; the horizontal line gives an approximate 95% likelihood-ratio confidence interval, which excludes the untransformed value . Since affine rescaling of the response does not change the fitted mean space, fitting the raw power is equivalent to using with an intercept. The second model isIts residual spread is more even, but observation 17 has a conspicuously negative residual near . This motivates checking for an outlier or recording error. The third fit omits that observation; omission should be justified by that investigation, since choosing exclusions from residuals can affect inference. Some group pattern still remains, so the transformation alone does not certify a perfect model.
At an amount of nanograms, the third fit predicts the transformed meanSimply applying the inverse power gives . The requested expected reading needs bias correction after an inverse transformation, since for nonlinear . With and , a second-order Taylor expansion givesHere the correction uses the residual variance, rather than the variance of the estimated fitted mean. The power-transformed Gaussian model is an approximation for positive readings; the fitted mean is over 31 residual standard deviations above zero, so the negative tail has negligible effect on this local approximation. The ordinary inverse-transformed prediction is therefore essentially at the displayed precision.
At sample size 100, keep essentially the same numerical confidence interval, but treat its calibration as approximate. For independent heights with finite, nonzero variance, the central limit theorem makes the sample mean approximately normally distributed, and the sample variance consistently estimates the population variance. Hence the studentized sample mean is approximately standard normal even without a normal distribution for individual heights.
Using the permitted cutoff 2 givesA Student t-distribution cutoff gives a similar approximation for large sample size, but its justification at fixed sample size is no longer exact. Extreme skewness or influential outliers could make 100 observations insufficient for accurate coverage probability; abandoning normality alone supplies no specific numerical correction. The sampling with replacement assumption still precludes a finite population correction.
Robust estimator 2026-11-05
A robust estimator is an estimator whose behavior remains acceptably stable under specified departures from an assumed statistical model. “Stable” must identify a criterion, such as limited bias under contamination, bounded response to a single extreme observation, or resistance to replacing a fraction of the sample. It does not mean that the estimator is accurate under every possible probability distribution.
For example, consider data with . The sample mean is , whereas the sample median, using the midpoint convention for an even-sized sample, is . Sending to infinity makes the sample mean diverge without changing that sample median. The example concerns location estimation: the population median and population mean need not coincide outside a symmetric reference model.
One formal model is Huber contamination:where is a reference probability distribution, is an unspecified contaminating probability distribution, and is its proportion. A robustness claim can bound an estimator’s worst bias over allowed , rather than only calculating its variance when the reference model is exactly true. Peter J. Huber’s original location paper treats this tradeoff systematically.[ref]
Robust Estimation of a Location Parameter by Peter J. Huber. Introduction, contaminated normal location models; section 4(iii), clipped location criterion
A Huber location estimator illustrates how stability enters the calculation. With a specified positive scale , solveLarge residuals have bounded scores, so one increasingly extreme point cannot contribute an arbitrarily large term to this equation. By contrast, the squared-error score grows linearly with the residual and yields the sample mean. A practical analysis must also state how is obtained: a scale estimate that itself explodes under outliers can undermine the intended protection.
Different criteria answer different questions. An influence function studies an infinitesimal perturbation of a distribution, while a breakdown point concerns a finite amount of sample corruption. A robust estimator can sacrifice some model-specific statistical efficiency to improve performance away from that model, but the amount depends on the chosen tuning and departure. Reporting the target parameter, reference model and robustness criterion makes the claim testable.
Robust statistics Created 2026-09-24 Updated 2026-11-05
Robust statistics studies how estimators and other statistical procedures respond to departures from a reference statistical model. Such departures can include a small fraction of outliers, a heavier-tailed probability distribution, or an incorrect assumed shape. A robustness statement specifies both the permitted departure and the quantity whose change is controlled.
For data with , the sample median remains , whereas the sample mean is and grows without bound. This does not make the sample median an estimator of every desired expected value: the mean and median of an asymmetric probability distribution can differ. The estimand must therefore be specified before judging robustness.
Influence functions describe infinitesimal changes, breakdown points describe large finite-sample failures, and minimax asymptotic bias compares worst cases over a neighborhood. M-estimators connect these questions with an explicit loss function. Peter J. Huber's 1964 location paper developed a systematic treatment of estimation under contamination.[ref]
Robust Estimation of a Location Parameter by Peter J. Huber. Introduction and location estimation under contaminated normal models
Scale M-estimator Created 2026-09-28 Updated 2026-11-05
A Scale M-estimator estimates the spread of centered data by solvingfor a chosen function . If the center is estimated, residuals replace . The function and its normalization specify the population scale being estimated; an arbitrary choice need not have a positive or unique root.
For known center zero and at least one nonzero observation, choosing gives , the root mean square. This example is highly sensitive to an outlier. Bounded choices of can instead limit an observation's contribution to the estimating equation, but their influence function and breakdown point still require analysis.
If is an even function and the positive root is unique, multiplying the data by multiplies the root by : substitute into the equation. This is scale equivariance, the expected response to changing measurement units.



