- Introduced by
- Rousseeuw & Croux
- Year
- 1993
- Type
- Robust scale estimator
What does it do?
Sn and Qn are robust estimators of scale (spread) proposed by Rousseeuw and Croux (1993) as alternatives to the median absolute deviation (MAD).
Both attain a 50% breakdown point and are more efficient than MAD under a Gaussian model, with Sn at about 58% and Qn at about 82% against MAD's 37%. Neither requires a separate location estimate, so the scale value is not anchored to a central point that outliers could shift first.
The intuition behind the method
Instead of measuring spread from each point's distance to a central value, these estimators work with the pairwise distances between observations. Sn takes, for each observation, the median of its distances to all the others, and then takes the median of those values. Qn instead selects a low-order value from the sorted list of all pairwise distances: the k-th smallest, with k chosen so that the selected value lies close to the 25% quantile of the distances. Because no central value is computed first, a small group of extreme observations has no centre to shift before the spread is calculated.
History
Peter Rousseeuw and Christophe Croux introduced Sn and Qn in 1993 in 'Alternatives to the Median Absolute Deviation', published in the Journal of the American Statistical Association. The paper aimed to improve on MAD in two respects: its orientation toward symmetric distributions and its Gaussian efficiency of about 37%. The authors studied the estimators through their influence functions, bias curves and finite-sample performance.
When to use it
Choose Sn or Qn when you need a measure of spread for continuous data that resists outliers and should be more efficient than MAD. They suit data where a few contaminating points could inflate the classical standard deviation, and where estimating a centre first is undesirable. Choose Qn when precision matters most, since its Gaussian efficiency is higher than that of Sn. Use them with care for very small samples, where the finite-sample correction factors matter most and the scale value is less reliable. If the data are clean and Gaussian, the classical standard deviation is the more efficient choice. If the question concerns location or a full model, Sn and Qn answer only part of it. The original paper also examines non-Gaussian models through influence functions and bias curves. For example, under the negative exponential model Sn has a lower gross-error sensitivity than MAD.
Limitations and considerations
- Finite-sample behaviour should be checked for small n. The correction factors matter most there, and the original paper studies finite-sample performance explicitly.
- Sn is less efficient than Qn under a Gaussian model (about 58% against 82%), so choosing Sn gives up precision that Qn would provide.
- Estimate dispersion only; they do not by themselves provide a model of the data.
- Relative performance depends on the distribution. Under non-Gaussian models the comparison with MAD changes, so the choice between Sn, Qn and MAD should be made with the data's shape in mind.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Attain a 50% breakdown point, so up to half of the observations can be contaminated before the estimate breaks down.
- Higher Gaussian efficiency than MAD: about 58% for Sn and about 82% for Qn, against about 37% for MAD.
- Need no separate location estimate, which removes the step where a central value could be distorted by outliers before the spread is computed.
- Computable in O(n log n) time with O(n) storage, according to the source.
Applications
- Estimating spread for continuous measurements that contain outliers.
- Supplying a resistant scale value for robust standardisation or outlier-screening rules.
- Replacing MAD as the scale estimate where higher Gaussian efficiency is wanted with the same 50% breakdown point.
How it works
How it works
Sn is built from pairwise absolute differences |xᵢ − xⱼ|. For each observation i the inner median is taken over j, then the outer median is taken over those inner medians, and the result is multiplied by the constant 1.1926 and a finite-sample correction factor cₙ. The factor cₙ depends on the sample size n and is needed to reproduce the scale value exactly. Its values are not reproduced on this page, so use the StatWise implementation or the original paper for them. The source names MAD's orientation toward symmetric distributions as one weakness that Sn was designed to address.
Formula
S_n = c_n \cdot 1.1926 \, \operatorname{med}_i \, \operatorname{med}_j \, |x_i - x_j|Qn takes all ½n(n−1) pairwise absolute differences |xᵢ − xⱼ| with i < j, sorts them, and returns the k-th value, where k = C(h,2) and h = ⌊n/2⌋ + 1. Because k is approximately one quarter of the total number of distances, the selected value approximates the 25% quantile described in the source. The result is scaled by 2.2219 and a finite-sample factor dₙ, which depends on n and is not reproduced here. The source reports a Gaussian efficiency of about 82% for Qn.
Formula
Q_n = d_n \cdot 2.2219 \, \{ |x_i - x_j| : i < j \}_{(k)}, \quad k = \binom{h}{2}, \; h = \lfloor n/2 \rfloor + 1Common pitfalls
- Applying Sn or Qn to a handful of observations and over-trusting the resulting scale.
- Dropping the finite-sample factors cₙ and dₙ from the formulas changes the reported scale, most noticeably when n is small.
- Treating strongly multimodal or heavily skewed data as if a single scale value were meaningful.
Frequently asked questions
How are Sn and Qn different from MAD?
MAD is the median of absolute deviations from the median. The source notes that it is aimed at symmetric distributions and has about 37% Gaussian efficiency. Sn and Qn use pairwise differences between observations, need no location estimate, keep the 50% breakdown point, and reach about 58% (Sn) and 82% (Qn) Gaussian efficiency.
What is a breakdown point?
The breakdown point is the fraction of contaminated observations an estimator can tolerate before producing arbitrary results. Sn and Qn both attain the maximum possible 50%, meaning nearly half the data can be outliers before the scale estimate is ruined.
When should I prefer Qn over Sn?
Qn has higher Gaussian efficiency (about 82% against about 58% for Sn), so it is usually the better choice when precision matters. Both need no separate location estimate and share the 50% breakdown point. Sn is simpler to describe, as a median of medians of pairwise distances.
Does sample size affect the estimate?
Yes. The finite-sample correction factors matter most when n is small. With very small samples, read the scale value with caution, since it may vary considerably from sample to sample.
Related methods
Sources
Rousseeuw, P. J., & Croux, C. (1993). Alternatives to the Median Absolute Deviation. Journal of the American Statistical Association, 88(424), 1273-1283.
Open DOI reference