Standard deviation is the default way to measure spread β but it has a real weakness: a single extreme outlier can distort it dramatically, since squaring each deviation (as the standard deviation formula does) amplifies the influence of the largest values disproportionately. The median absolute deviation (MAD) measures spread using medians throughout instead of means and squares, making it far more resistant to exactly the kind of extreme values that derail standard deviation.
- The formula, and why using medians throughout makes it robust
- A full worked example showing MAD staying stable while standard deviation swings wildly
- How to rescale MAD to be comparable with standard deviation
- When MAD is the better choice, and when it isn't
The Formula
The median absolute deviation is computed in two steps: find the median of the dataset, then find the median of the absolute deviations from that median.
Every step uses a median rather than a mean β the outer median, computing the "typical" deviation, is exactly what gives MAD its resistance to outliers: a single wildly extreme value can pull a mean-based statistic (like the ordinary mean, or standard deviation) a long way, but it can shift a median by at most one rank position, regardless of how far out that extreme value actually sits.
Worked Example: A Salary Dataset With an Outlier
Problem: Five employees' salaries: $45,000, $48,000, $47,000, $46,000, $250,000 (one senior executive's salary included in the group by mistake, or genuinely an outlier). Compare the standard deviation and the MAD.
Sorted: 45,000, 46,000, 47,000, 48,000, 250,000. Median = $47,000.
Absolute deviations from the median: |45,000β47,000|=2,000, |46,000β47,000|=1,000, |47,000β47,000|=0, |48,000β47,000|=1,000, |250,000β47,000|=203,000.
Sorted absolute deviations: 0, 1,000, 1,000, 2,000, 203,000. Median of these = MAD = $1,000.
For comparison: the mean of this dataset is $87,200 β already badly distorted by the single outlier, nowhere near representative of four of the five actual salaries. The standard deviation is approximately $91,015 β an enormous number, almost entirely driven by that one $250,000 value, and not a remotely useful description of how the other four salaries actually vary among themselves.
The Same Data, Outlier Removed
Removing the $250,000 outlier and recalculating on the remaining four salaries (45,000, 46,000, 47,000, 48,000): the median stays exactly $47,000, and the MAD stays exactly $1,000 β completely unchanged by removing the outlier. The mean, by contrast, drops all the way from $87,200 to $47,000, and the standard deviation collapses from roughly $91,015 down to about $1,581 β both mean and standard deviation swing dramatically depending on whether that single outlier is included, while MAD doesn't move at all. This is the entire point of MAD: it describes the typical spread of the bulk of the data, largely unaffected by a small number of extreme values sitting far outside that bulk.
Rescaling MAD for Comparison With Standard Deviation
Raw MAD is, by construction, smaller than standard deviation for data that's genuinely normally distributed β multiplying by a constant scale factor makes it directly comparable:
The constant 1.4826 is specifically chosen so that, for normally distributed data with no outliers present, scaled MAD converges to the same value as the true standard deviation. For the outlier-free four-salary dataset above: scaled MAD = 1.4826 Γ 1,000 β $1,483, reasonably close to that dataset's own standard deviation of $1,581 β confirming the rescaling works roughly as intended on well-behaved data, while still leaving MAD dramatically more stable than raw standard deviation whenever an outlier is present.
When to Use MAD Instead of Standard Deviation
Data known or suspected to contain outliers or data-entry errors β exactly the salary example above, where a single mis-entered or genuinely atypical value would otherwise dominate a standard-deviation-based analysis.
Robust outlier detection itself β comparing each data point's distance from the median against a threshold based on MAD (rather than mean and standard deviation) is a well-established, more outlier-resistant alternative to the standard IQR- or z-score-based outlier detection methods, precisely because it doesn't let the outliers being searched for simultaneously distort the very yardstick used to detect them.
Heavily skewed distributions β where the median is already preferred over the mean as a measure of center (see mean, median, and mode), MAD pairs naturally with that same median-based approach to describing spread.
When Standard Deviation Is Still the Better Choice
For data genuinely free of significant outliers, especially data feeding into formulas that specifically require standard deviation (confidence intervals, hypothesis tests, and most of the inferential statistics covered elsewhere on this site), ordinary standard deviation remains the standard, more widely supported choice β MAD is a specialized, robust alternative for description and outlier-resistant summary statistics, not a universal replacement for standard deviation in every formula that currently uses it.
Real-World Uses
Financial risk analysis: asset returns often contain occasional extreme days (market crashes, sudden spikes) that would dominate an ordinary standard-deviation-based risk measure β MAD-based measures of volatility are used specifically to get a more stable read on typical day-to-day variability, separate from the influence of rare extreme events.
Sensor and instrument data cleaning: automated data pipelines processing large volumes of sensor readings often use MAD-based thresholds to flag likely faulty readings, precisely because a handful of genuinely faulty sensor spikes shouldn't be allowed to distort the very statistic used to detect them.
Robust regression and machine learning preprocessing: MAD-based scaling (rather than standard-deviation-based scaling) is a standard preprocessing option in many statistical software packages specifically for datasets known to contain outliers, since it avoids letting a handful of extreme values dominate how every other feature gets rescaled.
Common Mistakes
Comparing raw MAD directly to standard deviation without rescaling. Raw MAD is systematically smaller than standard deviation even for well-behaved data β always apply the 1.4826 scaling factor before treating the two as comparable numbers.
Assuming MAD eliminates the need to investigate outliers. MAD makes a summary statistic more stable in the presence of outliers, but an outlier itself may still represent a genuine data problem (an entry error) or a genuinely important extreme case worth separate attention β MAD's robustness is a description tool, not a substitute for actually looking at why an outlier exists.
Is MAD the same thing as mean absolute deviation?
Can MAD ever equal zero?
Does MAD work for skewed distributions the same way it works for symmetric ones?
Is MAD used in any standard statistical software by default?
Share this article
Written by
Statistics Fundamentals Editorial Team
Written and reviewed by our team of statistics educators. Content is aligned with GCSE, A-Level, AP Statistics, and undergraduate curricula.
About Statistics Fundamentals β