Σ
SDCalc
GemiddeldConcepten·12 min

Robuuste statistiek: MAD, IQR en uitschieterbehendige methoden

Volledige gids over robuuste statistiek inclusief mediaan absolute afwijking (MAD) en interkwartielafstand (IQR). Leer wanneer u uitschieterbehendige spreidingsmaten moet gebruiken met voorbeelden en Python-code.

Waarom robuuste statistiek?

Standaardafwijking is een krachtige spreidingsmaat, maar heeft een kritieke zwakte: extreme gevoeligheid voor uitschieters. Een enkele extreme waarde kan de SD dramatisch opblazen en een misleidend beeld geven van de typische variatie.

Robuuste statistiek biedt spreidingsmaten die de invloed van uitschieters weerstaan, waardoor ze essentieel zijn voor praktijkgegevens waar meetfouten, invoerfouten of werkelijk extreme gevallen veel voorkomen.

Voorbeeld: het uitschieterseffect

Gegevens: 10, 12, 11, 13, 12, 11, 100 (één uitschieter) Standaardafwijking: 32,4 (gedomineerd door uitschieter) MAD: 1,0 (negeert de uitschieter) IQR: 1,5 (negeert de uitschieter)

Instortpunt

Het “instortpunt” van een statistiek is het percentage gegevens dat extreem kan zijn voordat de statistiek zinloos wordt. SD heeft een instortpunt van 0% (één uitschieter kan hem vernietigen). MAD en IQR hebben instortpunten van 50%—de helft van uw gegevens kan uitschieters zijn en ze werken nog steeds.

Mediaan absolute afwijking (MAD)

MAD is de meest robuuste spreidingsmaat. Het berekent de mediaan van de absolute afwijkingen ten opzichte van de mediaan:

MAD-formule

MAD = median(|xᵢ - median(x)|)
1

Bepaal de mediaan

Bereken de mediaan van uw dataset.
2

Bereken afwijkingen

Trek de mediaan af van elke waarde en neem de absolute waarden.
3

Bepaal MAD

Bereken de mediaan van deze absolute afwijkingen.

MAD schalen om σ te schatten: Voor normaal verdeelde gegevens geldt MAD ≈ 0,6745 × σ. Om SD te schatten vanuit MAD, vermenigvuldig met 1,4826:

SD-schatting vanuit MAD

σ̂ = 1.4826 × MAD

Waarom 1,4826?

Deze schaalfactor komt voort uit de relatie tussen MAD en SD voor normale verdelingen. Het zorgt ervoor dat de geschaalde MAD een zuivere schatter is van de werkelijke standaardafwijking wanneer de gegevens normaal verdeeld zijn.

Interkwartielafstand (IQR)

IQR meet de spreiding van de middelste 50% van de gegevens—het bereik tussen het 25e en 75e percentiel:

IQR-formule

IQR = Q3 - Q1 = 75e percentiel - 25e percentiel

IQR wordt veel gebruikt omdat het eenvoudig te begrijpen is, gemakkelijk te visualiseren in boxplots en de basis vormt van de gangbare “1,5×IQR-regel” voor uitschietersdetectie.

IQR schalen om σ te schatten: Voor normale gegevens geldt IQR ≈ 1,35 × σ. Om SD te schatten vanuit IQR:

SD-schatting vanuit IQR

σ̂ = IQR / 1.35 ≈ 0.7413 × IQR

Robuuste maten vergelijken

Standaardafwijking

Gebruikt alle gegevenspunten · Meest efficiënt voor normale gegevens · Zeer gevoelig voor uitschieters · Instortpunt: 0%

MAD

Meest robuuste maat · Gebruikt mediaan (niet gemiddelde) · Immuun voor alle uitschieters · Instortpunt: 50%

IQR

Gemakkelijk te begrijpen · Gebruikt in boxplots · Negeert extreme 50% · Instortpunt: 25%

Wanneer robuuste statistiek gebruiken

  • Verkennende analyse: Wanneer u niet weet of er uitschieters zijn, begin met robuuste maten
  • Gegevenskwaliteitsproblemen: Wanneer gegevens fouten of meetproblemen kunnen bevatten
  • Zwaartstaartverdelingen: Wanneer extreme waarden verwacht worden (financiële rendementen, verzekeringsschaden)
  • Kleine steekproeven: Wanneer uitschieters buitensporige impact hebben door weinig waarnemingen
  • Uitschietersdetectie: SD gebruiken om uitschieters te detecteren is circulair; gebruik in plaats daarvan IQR of MAD

Implementatievoorbeelden

Python
import numpy as np
from scipy import stats

def mad(data):
    """Median Absolute Deviation"""
    median = np.median(data)
    return np.median(np.abs(data - median))

def scaled_mad(data):
    """MAD scaled to estimate SD (for normal data)"""
    return 1.4826 * mad(data)

def iqr(data):
    """Interquartile Range"""
    return np.percentile(data, 75) - np.percentile(data, 25)

# Compare on data with outlier
data = [10, 12, 11, 13, 12, 11, 100]
print(f"SD: {np.std(data, ddof=1):.2f}")
print(f"MAD: {mad(data):.2f}")
print(f"Scaled MAD: {scaled_mad(data):.2f}")
print(f"IQR: {iqr(data):.2f}")

Further Reading

How to Read This Article

A statistics tutorial is a practical interpretation guide, not just a formula dump. It refers to the assumptions, notation, and reporting language that analysts need when they explain a result to a teacher, manager, client, or reviewer. The article body covers the specific topic, while the sections below create a common interpretation frame that readers can reuse across related metrics.

Reading goalWhat to focus onCommon mistake
DefinitionWhat the metric is and what quantity it summarizesTreating the formula as self-explanatory
Formula choiceSample versus population assumptions and notationUsing n when n-1 is required or vice versa
InterpretationWhether the result indicates concentration, spread, or riskCalling a large value good or bad without context

Frequently Asked Questions

How should I interpret a high standard deviation?

A high standard deviation means the observations are spread farther from the mean on average. Whether that spread is acceptable depends on the context: wide dispersion might signal risk in finance, instability in manufacturing, or genuine natural variation in scientific data.

Why do some articles mention n while others mention n-1?

The denominator reflects the difference between population and sample formulas. Population variance and population standard deviation use N because the full dataset is known. Sample variance and sample standard deviation often use n-1 because Bessel’s correction reduces bias when estimating population spread from a sample.

What is a statistical interpretation guide?

A statistical interpretation guide is a page that moves beyond arithmetic and explains meaning. It tells you what a metric is, when the formula applies, and how to describe the result in plain English without overstating certainty.

Can I cite this article in a report?

You should cite the underlying authoritative reference for formal work whenever possible. This page is best used as an explanatory bridge that helps you understand the concept before quoting the original standard or handbook.

Why include direct citations on every article page?

Direct citations give readers a route to verify the definition, notation, and assumptions. That improves trust and reduces the chance that a simplified explanation is mistaken for the entire technical standard.

Authoritative References

These sources define the concepts referenced most often across our articles. Bessel's correction is a sample adjustment, variance is a squared measure of spread, and standard deviation is the square root of variance expressed in the same units as the data.