The median absolute deviation (MAD) is a measure of dispersion in statistics. It is the median of the absolute differences between observations and their median. Because it depends on the middle of the distribution of deviations rather than their sum or squared sum, it is relatively insensitive to extreme observations. The MAD is widely used in robust statistics as an alternative to the standard deviation, especially when data contain outliers or have heavy tails.
Definition
For observations , first calculate the sample median,
The unscaled sample MAD is then
For an even number of observations, a common convention defines the median as the arithmetic mean of the two middle ordered values. This convention is applied both to the original observations and to their absolute deviations.
For a random variable with a specified population median , the population MAD is
For distributions with nonunique medians, the definition requires a convention for selecting the relevant medians. If the cumulative distribution function is continuous and strictly increasing, is the unique nonnegative solution to
Thus the interval contains half the probability. For distributions with point masses, an interval of this form can contain more than half the probability.
The abbreviation MAD is also sometimes used for mean absolute deviation. That is a different statistic: it averages absolute deviations rather than taking their median. The center used in a mean absolute deviation must also be specified.
Calculation and example
Consider the ordered data
Their median is . The absolute deviations from are
After sorting these deviations,
their median is , so the MAD equals .
Replacing by changes the largest deviation but leaves both the sample median and the MAD unchanged. In contrast, the standard deviation increases substantially.
A direct implementation sorts the observations and then sorts the deviations, requiring time in asymptotic notation. Median-selection algorithms can avoid full sorting and compute the MAD in linear time; whether that guarantee is expected or worst-case depends on the selection algorithm.
Scaling to estimate a standard deviation
The raw MAD and the standard deviation measure spread differently, so their numerical values are generally not equal. Under a normal distribution, they have a fixed relationship.
If , the population median is , and
where is the standard normal cumulative distribution function. Setting this probability equal to gives
Consequently, the normal-consistent scaled MAD is
Here, is the standard normal distribution’s 75th-percentile quantile.
Under independent sampling from a normal population, this scaled statistic is a consistent estimator of : it approaches the population standard deviation as sample size increases. The factor is not a universal conversion from MAD to standard deviation. Other distributional assumptions generally require different factors, and some distributions have no finite standard deviation.
Normal consistency also does not imply exact finite-sample unbiasedness. Additional corrections may depend on sample size and the median convention; they concern estimator bias, not the definition of the raw MAD.
Software conventions differ. A function named “MAD” may return either the raw statistic or a scaled value, so its scaling convention is part of the result’s interpretation.
Robustness and statistical properties
Resistance to contamination
The MAD is resistant to a minority of arbitrarily extreme observations because such observations need not change the middle absolute deviation substantially. By contrast, a single observation taken arbitrarily far away can make the sample variance and standard deviation arbitrarily large.
The MAD has an asymptotic replacement breakdown point of for nondegenerate continuous populations. Informally, contamination approaching half the sample can be required to make this scale estimate arbitrarily large or collapse it to zero. Exact finite-sample thresholds depend on sample size, median conventions, and ties. A dataset that already has many identical values can have zero MAD without any additional contamination.
A high breakdown point does not mean that contamination has no effect below that threshold. It describes resistance to arbitrarily severe failure, not complete stability.
Translation and scale behavior
For ,
Adding a constant therefore leaves the MAD unchanged, while multiplying the observations by a constant multiplies the MAD by its absolute value. The statistic has the same physical units as the observations.
Efficiency under normality
Robustness involves a trade-off. Under independent, exactly normal sampling, the scaled MAD has an asymptotic relative efficiency of approximately compared with the usual sample standard deviation when estimating . It therefore requires roughly times as many observations to achieve the same large-sample precision under that model.
This comparison is model-specific. With contaminated or heavy-tailed data, the usual standard deviation may be much less stable, and its normal-model efficiency advantage need not persist.
No moment requirement
The population MAD does not require a finite expected value or variance. For example, a Cauchy distribution with location and scale has median and MAD , although its mean and variance are undefined.
Applications
The MAD is commonly reported alongside the median to describe a distribution’s center and spread. It is also used to estimate noise scale, standardize residuals, and construct outlier-screening statistics.
One common modified z-score is
provided the raw MAD is positive. Equivalently, this divides the centered observation by the normal-consistent scaled MAD. Under an approximately normal model, its scale resembles that of an ordinary z-score, but using estimated medians and MADs does not give it an exact standard normal distribution. A threshold applied to this statistic is not automatically a calibrated hypothesis test.
In time-series analysis, a rolling MAD can describe local variability. Its interpretation depends on the window length, local trends, and serial dependence. In regression, the MAD of residuals can provide a robust scale estimate, although a robust residual-scale calculation does not by itself make the fitted regression resistant to influential observations.
Limitations and related measures
The MAD can equal zero even when some observations differ. For example,
has median and MAD . This occurs when a strict majority of observations coincide, and can be common with discrete, rounded, or zero-heavy data. Standardization by the MAD is then undefined.
For skewed distributions, the MAD combines deviations on both sides of the median into a single number. It does not describe asymmetry or distinguish upper-tail from lower-tail behavior. Quantiles or separate measures of spread on each side can describe features that the MAD omits.
The interquartile range, defined as the difference between the 75th and 25th percentiles, is another robust measure of dispersion. Unlike the MAD, it uses two quantiles of the original observations rather than the median of centered absolute deviations. The two measures need not be proportional outside particular distribution families.
Finally, a small MAD does not imply that extreme observations are unimportant. The statistic deliberately limits their influence; it is not designed to summarize maximum deviations, tail risk, or the frequency of rare extremes.