Course contentsShow
← Data Science
Lesson 73 of 2,1452. Descriptive Statistics FoundationsFree lesson

Modified Z-Score Using MAD

Apply the median absolute deviation (MAD) for robust outlier detection less sensitive to extreme values than standard z-scores.

What You'll Learn

You'll learn how to detect outliers using the modified Z-score with MAD, a robust alternative to the standard Z-score that won't be fooled by extreme values.

The Problem with Standard Z-Scores

Remember the standard Z-score method? It uses the mean and standard deviation to flag outliers. But here's the catch: both mean and standard deviation are sensitive to extreme values. It's like using a broken thermometer to check if your fever is too high — the tool itself is affected by the very problem you're trying to detect!

Enter the Modified Z-Score

The modified Z-score replaces the vulnerable mean and standard deviation with robust alternatives:

  • Median instead of mean (the middle value, unaffected by extremes)
  • MAD (Median Absolute Deviation) instead of standard deviation (a robust measure of spread you learned earlier)

Think of MAD as a bodyguard for your outlier detection — it doesn't flinch when extreme values show up.

The Formula

The modified Z-score for each data point is:

Modified Z-score = 0.6745 × (X - Median) / MAD

The constant 0.6745 makes MAD comparable to standard deviation for normal distributions. It's a mathematical adjustment that keeps the scale familiar.

Decision Rule

Just like regular Z-scores, values with a modified Z-score greater than ±3.5 (sometimes ±3) are typically flagged as outliers. The threshold is slightly higher because this method is more conservative.

Why This Matters

When your dataset already contains outliers, the modified Z-score won't be "distracted" by them. It identifies true anomalies without letting existing extreme values corrupt the detection process.

Key Takeaway: The modified Z-score uses median and MAD instead of mean and standard deviation, making outlier detection robust even when extreme values are already present in your data.