# Median absolute deviation

In statistics, the median absolute deviation (MAD) is a robust measure of the variability of a univariate sample of quantitative data. It can also refer to the population parameter that is estimated by the MAD calculated from a sample.

For a univariate data set X1X2, ..., Xn, the MAD is defined as the median of the absolute deviations from the data's median:

${\displaystyle \operatorname {MAD} =\operatorname {median} _{i}\left(\ \left|X_{i}-\operatorname {median} _{j}(X_{j})\right|\ \right),\,}$

that is, starting with the residuals (deviations) from the data's median, the MAD is the median of their absolute values.

## Example

Consider the data (1, 1, 2, 2, 4, 6, 9). It has a median value of 2. The absolute deviations about 2 are (1, 1, 0, 0, 2, 4, 7) which in turn have a median value of 1 (because the sorted absolute deviations are (0, 0, 1, 1, 2, 4, 7)). So the median absolute deviation for this data is 1.

## Uses

The median absolute deviation is a measure of statistical dispersion. Moreover, the MAD is a robust statistic, being more resilient to outliers in a data set than the standard deviation. In the standard deviation, the distances from the mean are squared, so large deviations are weighted more heavily, and thus outliers can heavily influence it. In the MAD, the deviations of a small number of outliers are irrelevant.

Because the MAD is a more robust estimator of scale than the sample variance or standard deviation, it works better with distributions without a mean or variance, such as the Cauchy distribution.

## Relation to standard deviation

In order to use the MAD as a consistent estimator for the estimation of the standard deviation σ, one takes

${\displaystyle {\hat {\sigma }}=K\cdot \operatorname {MAD} ,\,}$

where K is a constant scale factor, which depends on the distribution. [1]

For normally distributed data K is taken to be ${\displaystyle 1/\left(\Phi ^{-1}(3/4)\right)\approx 1.4826}$, where ${\displaystyle \Phi ^{-1}}$ is the inverse of the cumulative distribution function for the standard normal distribution, i.e., the quantile function. This is because the MAD is given by:

${\displaystyle {\frac {1}{2}}=P(|X-\mu |\leq \operatorname {MAD} )=P\left(\left|{\frac {X-\mu }{\sigma }}\right|\leq {\frac {\operatorname {MAD} }{\sigma }}\right)=P\left(|Z|\leq {\frac {\operatorname {MAD} }{\sigma }}\right).}$

Hence

${\displaystyle \sigma \approx 1.4826\ \operatorname {MAD} .\,}$

In other words, the expectation of 1.4826 times the MAD for large samples of normally distributed Xi is approximately equal to the population standard deviation.

The population MAD is defined analogously to the sample MAD, but is based on the complete distribution rather than on a sample. For a symmetric distribution with zero mean, the population MAD is the 75th percentile of the distribution.

Unlike the variance, which may be infinite or undefined, the population MAD is always a finite number. For example, the standard Cauchy distribution has undefined variance, but its MAD is 1.

The earliest known mention of the concept of the MAD occurred in 1816, in a paper by Carl Friedrich Gauss on the determination of the accuracy of numerical observations.[4][5]

## Notes

1. Rousseeuw, P. J., & Croux, C. (1993). Alternatives to the median absolute deviation. Journal of the American Statistical Association, 88(424), 1273–1283, http: //dx.doi.org/10.1080/01621459.1993.10476408.
2. [1]
3. Leys, C., et al., Detecting outliers: Do not use standard deviation around the mean, use absolute deviation around the median, Journal of Experimental Social Psychology (2013), http://dx.doi.org/10.1016/j.jesp.2013.03.013
4. {{#invoke:Citation/CS1|citation |CitationClass=journal }}
5. {{#invoke:citation/CS1|citation |CitationClass=book }}

## References

• {{#invoke:citation/CS1|citation

|CitationClass=book }}

• {{#invoke:citation/CS1|citation

|CitationClass=book }}

• {{#invoke:citation/CS1|citation

|CitationClass=book }}