1001Ferramentas
📏Calculators

MAD (Desvio Absoluto Mediano)

Calcula MAD = mediana(|xᵢ − mediana(x)|) — medida robusta de dispersão.

MAD

Median Absolute Deviation (MAD)

The MAD is a robust measure of spread, defined as MAD = median(|xᵢ − median(x)|). On its own it isn't on the same scale as the standard deviation, so under a normal distribution you multiply by the consistency factor 1.4826 to get σ̂ = 1.4826 · MAD. Take 1, 1, 2, 2, 4, 6, 9 as an example. The median is 2; the absolute deviations come out to 1, 1, 0, 0, 2, 4, 7, whose median is 1, so MAD = 1 and σ̂ ≈ 1.48. What makes it so durable is its 50% breakdown point. You can corrupt up to half the observations by any amount and the MAD still holds, which is the highest of any classical spread measure. Huber, Hampel and Rousseeuw leaned on it heavily when they built up robust statistics in the 1980s.

Applications

Flagging outliers with the rule |xᵢ − median|/MAD > 3. Cleaning up ML pipelines when the data is contaminated. Measuring volatility in finance without leaning on the standard deviation. It also shows up in industrial quality control and in spotting anomalies coming off IoT sensors.

FAQ

MAD or standard deviation? Reach for the MAD when your data has outliers or isn't Gaussian. On clean, normal data σ wins on efficiency, by roughly 37%.

Where does 1.4826 come from? It's 1/Φ⁻¹(0.75) ≈ 1.4826. That's the number that lets the MAD line up with σ as a consistent estimator under a normal distribution.

Can the MAD be zero? Yes, and it happens when more than half of the observations sit right on the median. Then the MAD > 3 rule falls apart, and you're better off with the Sn estimator from Rousseeuw-Croux.

Related Tools