Median Absolute Deviation
Print PageA Median Absolute Deviation Calculator (also known as a MADmed Calculator, Robust Scale Estimator, Normal Consistency Standard Deviation Generator, or Modified Z-Score Outlier Analyzer) computes the sample median (x̃ = Median(x)), individual absolute deviations from the median (di = |xi - x̃|), Median Absolute Deviation (MADmed = Median( |x1 - x̃|, |x2 - x̃|, … )), normal consistent standard deviation estimate (σ̂ = 1.4826 · MADmed), and Iglewicz and Hoaglin modified Z-scores (Mi = [ 0.6745 · (xi - x̃) ] ÷ MADmed).
In analytical chemistry sensor filtering, machine learning robust data scaling, financial high-frequency trading, and biostatistics, the **Median Absolute Deviation (MADmed)** is the ultimate robust measure of statistical dispersion. Unlike standard deviation or mean absolute deviation (which break down when corrupted by outliers), MADmed achieves a maximum theoretical **50% breakdown point**, remaining 100% stable even if up to half of your dataset contains extreme measurement faults.
Our free online Median Absolute Deviation Calculator provides instant calculations across all robust scale parameters:
- Median Absolute Deviation Formula (MADmed):
MADmed = Median( | xi - x̃ | ). - Normal Consistency Standard Deviation Estimator (σ̂):
σ̂ = 1.482602218 · MADmed(Converts MADmed to standard deviation units for normal distributions). - Modified Z-Score Formula (Mi):
Mi = [ 0.6745 · ( xi - x̃ ) ] ÷ MADmed. - Iglewicz & Hoaglin Outlier Threshold: Flags any observation with
|Mi| > 3.5as a confirmed outlier. - 50% Breakdown Point Advantage: Demonstrates complete immunity against extreme sensor spikes or data corruption.
Master MADmed Reference Table (Laboratory Chemical Sensor Monitoring: n = 9 pH Readings)
The table below displays sorted pH sensor readings, absolute deviations from the median (|xi - 7.30|), sorted deviations, modified Z-scores, and robust outlier evaluations for 9 chemical assay readings (n = 9 Readings: 7.1, 7.2, 7.2, 7.3, 7.3, 7.4, 7.5, 7.8, 12.5 pH):
| Sensor Reading Number (Sorted) | Raw Sensor Output (xi pH) | Absolute Deviation |xi – 7.30| | Sorted Deviation Rank | Modified Z-Score (Mi) | Robust Sensor Evaluation |
|---|---|---|---|---|---|
| Reading 1 | 7.100 pH | |7.1 – 7.3| = 0.200 pH | Rank 6 (0.200) | -1.349 | Valid Assay Measurement |
| Reading 2 | 7.200 pH | |7.2 – 7.3| = 0.100 pH | Rank 3 (0.100) | -0.675 | Valid Assay Measurement |
| Reading 3 | 7.200 pH | |7.2 – 7.3| = 0.100 pH | Rank 4 (0.100) | -0.675 | Valid Assay Measurement |
| Reading 4 | 7.300 pH | |7.3 – 7.3| = 0.000 pH | Rank 1 (0.000) | 0.000 | At Median Center Point |
| Reading 5 (Sample Median x̃) | 7.300 pH (Exact Median) | |7.3 – 7.3| = 0.000 pH | Rank 2 (0.000) | 0.000 | Exact Sample Median x̃ |
| Reading 6 | 7.400 pH | |7.4 – 7.3| = 0.100 pH | Rank 5 (0.100 – MADmed) | +0.675 | MADmed Value = 0.100 pH |
| Reading 7 | 7.500 pH | |7.5 – 7.3| = 0.200 pH | Rank 7 (0.200) | +1.349 | Valid Assay Measurement |
| Reading 8 | 7.800 pH | |7.8 – 7.3| = 0.500 pH | Rank 8 (0.500) | +3.373 | Borderline (|M| < 3.5) |
| Reading 9 (Massive Sensor Fault Outlier) | 12.500 pH (Fault) | |12.5 – 7.3| = 5.200 pH | Rank 9 (5.200) | +35.074 (|M| >> 3.5) | FLAGGED OUTLIER SENSOR SPIKE! |
| ROBUST MADmed EVALUATION | Sample Median x̃ = 7.300 pH | MADmed = 0.100 pH | σ̂ = 0.1483 pH (1.4826·0.1) | M12.5 = 35.074 | 100% Outlier Immune Scale |
| NON-ROBUST STANDARD DEVIATION | Sample Mean X̄ = 7.922 pH | Sample SD s = 1.716 pH | Corrupted by Outlier | Standard Z12.5 = 2.67 | SD Fails! (Inflated 11.5x Larger) |
Step-by-Step Chemical Sensor MADmed Calculation
To calculate MADmed, robust standard deviation estimate σ̂, and modified Z-scores for 9 pH readings (7.1, 7.2, 7.2, 7.3, 7.3, 7.4, 7.5, 7.8, 12.5):
Step 1 (Find Sample Median x̃): Sorted item 5 of 9 &implies; x̃ = 7.3000 pH
Step 2 (Calculate Absolute Deviations |x_i - 7.30|): 0.200, 0.100, 0.100, 0.000, 0.000, 0.100, 0.200, 0.500, 5.200
Step 3 (Sort Absolute Deviations): 0.000, 0.000, 0.100, 0.100, 0.100, 0.200, 0.200, 0.500, 5.200
Step 4 (Find MAD_med): Item 5 of sorted deviations &implies; MAD_med = 0.1000 pH
Step 5 (Calculate Normal Consistent Scale Estimator σ̂): σ̂ = 1.4826022 · 0.1000 = 0.14826 pH ≈ 0.1483 pH
Step 6 (Calculate Modified Z-Score for 12.5 pH): M_12.5 = [ 0.6745 · (12.5 - 7.3) ] ÷ 0.100 = (0.6745 · 5.2) ÷ 0.100 = 3.5074 ÷ 0.100 = 35.074
Step 7 (Evaluate Outlier Criteria): |M_12.5| = 35.074 >> 3.5 &implies; 12.5 pH is a Confirmed Sensor Spike Outlier
Thus, while non-robust standard deviation gets heavily corrupted to 1.716 pH by the faulty 12.5 reading, MADmed remains perfectly stable at 0.100 pH (σ̂ = 0.1483 pH), successfully isolating the sensor fault.
Dispersion Metrics Comparison: MADmed vs. Standard Deviation vs. Mean Absolute Deviation (MAD)
Below is a comparative reference chart detailing when to use MADmed versus alternative dispersion metrics:
| Dispersion Scale Metric | Central Reference Point Used | Breakdown Point (% Outliers Tolerated) | Primary Practical Application |
|---|---|---|---|
| Median Absolute Deviation (MADmed) | Sample Median (x̃) | 50.0% MAXIMUM THEORETICAL BREAKDOWN | Sensor filtering, robust ML scaling, modified Z-scores. |
| Mean Absolute Deviation (MAD) | Sample Mean (X̄) | 0.0% (Single outlier distorts mean) | Inventory demand forecasting & supply chain MAE. |
| Standard Deviation (s / σ) | Sample Mean (X̄) | 0.0% (Single extreme outlier corrupts SD) | Clean normal distributions without outliers. |
History & Mathematics: 1816 Carl Friedrich Gauss to 1974 Peter Huber
1816 Carl Friedrich Gauss & Absolute Scale
In 1816, German mathematician Carl Friedrich Gauss first proposed using median absolute deviations as a robust alternative to mean squared errors when analyzing astronomical observations contaminated by atmospheric disturbances.
1974 Peter Huber & 1987 Frank Hampel
In 1974 and 1987, Swiss statistician Peter J. Huber and German statistician Frank R. Hampel published seminal works in Robust Statistics, proving mathematically that MADmed achieves the maximum possible breakdown point of 50%, cementing its role in modern data science.
Popular direct tools:
Frequently Asked Questions (FAQ)
What is the formula for Median Absolute Deviation (MADmed)?
The formula is MADmed = Median( | xi - x̃ | ), where x̃ is the median of the dataset.
Why do you multiply MADmed by 1.4826?
Multiplying MADmed by 1.4826 converts the median absolute deviation into an **unbiased estimate of standard deviation (σ̂)** for normally distributed data.
How does a Modified Z-Score detect outliers using MADmed?
The formula is Mi = [ 0.6745 · (xi - x̃) ] ÷ MADmed. Any value with |Mi| > 3.5 is flagged as an outlier.