MAD control lines
Overview
Median Absolute Deviation (MAD) is a robust statistical measure of variability that quantifies how dispersed observations are around the median.
Unlike standard deviation, MAD is resistant to the influence of outliers and extreme values. This makes it particularly useful in laboratory quality control, analytical chemistry and other applications where occasional anomalous measurements may occur. MAD can be used to identify unusual observations by comparing the deviation of each result from the dataset median.
In QC Analytical Results, MAD is used on the Precision charts when “Control line method” is set to MAD (RD v Mean Pairs, RD v Sequence, RD v Percentile, RD v Density/Histogram, the normal Q-Q chart, the cumulative distribution chart, and Scatter when “Use SQC to detect outliers” is ticked). It is applied to the RD values of the duplicate pairs above the threshold, separately for each check stage, in place of the mean and standard deviation.
When to use
MAD is commonly used for laboratory quality control, assay performance monitoring, outlier detection, process monitoring with non-normal data and robust statistical analysis. It is often preferred over standard deviation when datasets contain extreme values that could distort traditional variability measures.
Formula
Step 1: M = median(x) Step 2: Di = |xi − M| Step 3: MAD = median(Di)
| Symbol | Description |
|---|---|
| xi | Individual observation |
| M | Median of the observations |
| Di | Absolute deviation from the median |
| MAD | Median of all absolute deviations |
Robust standard deviation and the modified Z-Score
MAD is turned into a robust standard deviation, which QC Analytical Results uses in place of the standard deviation. The modified Z-Score is the number of robust standard deviations a result lies from the median:
Modified Z = 0.6745 (xi − M) / MAD Robust SD = MAD / 0.6745 = 1.4826 × MAD
The constant 0.6745 makes MAD comparable to standard deviation for normally distributed data. QC Analytical Results draws its control lines at the median ± 2 robust SD (warning) and ± 3 robust SD (action), the same multiples as its SD-based (SQC) lines.
| Modified Z-Score | Assessment |
|---|---|
| 2 or less | Within the warning limits |
| 2 to 3 | Between the warning and action limits |
| More than 3 | Beyond the action limit (outlier) |
A threshold of 3.5 is often used elsewhere (Iglewicz and Hoaglin). QC Analytical Results uses 3, so that its MAD and SQC lines can be compared directly.
When the MAD is 0
When more than half the values are the same, the MAD is 0. With duplicates this happens when many pairs have identical results, often at the detection limit (RD 0). The lines would then all sit on the median and every other value would count as an outlier. QC Analytical Results then uses the mean absolute deviation from the median instead, as Iglewicz and Hoaglin do for the modified Z-Score, and says so under the chart:
Robust SD = 1.2533 × mean |xi − M| (when MAD = 0)
A threshold factor that leaves out the pairs near the detection limit usually gives a better picture.
Worked example
Ten observations: 100, 101, 99, 102, 100, 101, 98, 100, 99, 110.
Sorted, they are 98, 99, 99, 100, 100, 100, 101, 101, 102, 110, so the median M = (100 + 100) / 2 = 100.
| Obs | Value | Absolute deviation | Modified Z-Score | Status |
|---|---|---|---|---|
| 1 | 100 | 0 | 0.00 | Normal |
| 2 | 101 | 1 | 0.67 | Normal |
| 3 | 99 | 1 | −0.67 | Normal |
| 4 | 102 | 2 | 1.35 | Normal |
| 5 | 100 | 0 | 0.00 | Normal |
| 6 | 101 | 1 | 0.67 | Normal |
| 7 | 98 | 2 | −1.35 | Normal |
| 8 | 100 | 0 | 0.00 | Normal |
| 9 | 99 | 1 | −0.67 | Normal |
| 10 | 110 | 10 | 6.75 | Beyond action limit (outlier) |
The sorted deviations are 0, 0, 0, 1, 1, 1, 1, 2, 2, 10, so MAD = (1 + 1) / 2 = 1. Robust SD = 1.4826 × MAD = 1.48, so QC Analytical Results’ warning limits are 100 ± 2.97 and its action limits are 100 ± 4.45.
For Observation 10:
Modified Z = 0.6745 × (110 − 100) / 1 = 6.75
Since 6.75 > 3, Observation 10 is beyond the action limit (median + 3 robust SD) and is shown as an outlier.
Interpretation
- Observations 1–9 cluster closely around the median of 100.
- Observation 10 is substantially higher than the rest of the dataset.
- Because MAD is based on the median rather than the mean, the extreme value does not significantly influence the measure of variability.
- MAD provides a more reliable assessment than standard deviation when datasets contain occasional extreme values.
Advantages
| Advantage | Description |
|---|---|
| Robust to outliers | Extreme values have minimal effect |
| Simple calculation | Easy to compute and interpret |
| Non-parametric | Does not require normally distributed data |
| Reliable screening | Effective for identifying anomalous observations |
| Complementary to Z-Scores | Provides a robust alternative when standard deviation is distorted |
Summary
The Median Absolute Deviation (MAD) is a robust measure of variability that quantifies the typical distance of observations from the dataset median. Because it is resistant to extreme values, MAD is particularly useful for quality control and outlier detection in real-world datasets. When combined with the modified Z-Score, MAD provides an effective and statistically robust method for identifying unusual observations while minimising the influence of outliers on the analysis.
References
- Hampel, F.R. (1974). The influence curve and its role in robust estimation. Journal of the American Statistical Association, 69(346), 383–393.
- Iglewicz, B. and Hoaglin, D.C. (1993). How to Detect and Handle Outliers. ASQC Quality Press, Milwaukee.
- Rousseeuw, P.J. and Croux, C. (1993). Alternatives to the median absolute deviation. Journal of the American Statistical Association, 88(424), 1273–1283.
- Duplicates and precision: the articles and workbooks on paired samples
- Identifying Outliers when Assessing Precision (article, 2018)
- The Impact of Geological Variation when Quality Controlling Precision (article, 2017)