Missing Data Handling: MCAR, MAR, MNAR, and What to Do About Each

⏱️ 4 min read 🔧 Data Cleaning

How you handle missing data depends entirely on why it's missing. Statisticians split missingness into three mechanisms — MCAR, MAR, and MNAR — and each one permits different fixes. Delete rows when the mechanism forbids it and you don't just shrink your sample, you bias every estimate you compute afterward.

Quick answer: First diagnose the mechanism: MCAR (missing completely at random — safe to delete), MAR (missingness explained by other observed variables — impute using those variables), or MNAR (missingness depends on the missing value itself — deletion and naive imputation both bias results). Listwise deletion is only safe for MCAR data with little missingness; otherwise prefer multiple imputation.

What's the difference between MCAR, MAR, and MNAR?

The three mechanisms differ in what the missingness depends on. MCAR: nothing — pure chance. MAR: other variables you did observe. MNAR: the missing value itself. The distinction matters because standard fixes (deletion, mean fill, regression imputation) assume MCAR or MAR; under MNAR they all produce biased estimates no matter how sophisticated the model.

MCAR (Missing Completely at Random): no pattern to missingness

MAR (Missing at Random): missingness related to other observed variables

MNAR (Missing Not at Random): missingness related to the missing value itself

The MAR assumption is the workhorse of modern missing-data methods — see missing at random explained for how to reason about (and roughly test) it.

When is it safe to just delete rows with missing values?

Listwise deletion — dropping any row with a missing value — is safe when the data are MCAR and the loss is small (roughly under 5% of rows). Then you only lose power, not validity. Under MAR or MNAR, deletion systematically removes certain kinds of rows, so means, correlations, and regression coefficients all shift. Details and diagnostics in listwise deletion.

Decision framework

Situation Recommended handling Why
MCAR, < 5% missing, large sample Listwise deletion No bias, trivial power loss
MCAR, > 5% missing Simple or multiple imputation Deletion wastes too much data
MAR (missingness predicted by observed variables) Multiple imputation or model-based methods Conditioning on predictors removes the bias
MNAR suspected Sensitivity analysis, selection models, collect more data Standard fixes are biased; quantify how much
Missingness itself is informative Add a missing-indicator flag alongside imputation Preserves the signal in "who didn't answer"
> 40% of one variable missing Consider dropping the variable Imputation is mostly model guesswork at that point

When should you impute instead of delete?

Impute when deletion would either discard too much data (missingness above a few percent) or bias the sample (MAR mechanisms). Prefer multiple imputation over single mean-fill for anything inferential: it generates several plausible completed datasets, so your standard errors honestly reflect the uncertainty about the missing values instead of pretending you observed them.

1. Simple imputation

Mean/median/mode: replace missing values with a central value

2. Advanced imputation

Multiple imputation: generate several plausible values per gap and pool results

Regression/model-based imputation: predict missing values from other variables

When to use: more than ~5% missing, MAR data, any analysis where standard errors matter. Compare the options in imputation methods.

3. Flag as missing

Create an indicator variable such as income_missing (0/1) alongside the imputed value.

When to use: missingness itself is informative — e.g. skipping a question predicts the outcome.

In practice (pandas)

import pandas as pd

df.isna().mean().sort_values(ascending=False)  # % missing per column

df_listwise = df.dropna()                      # listwise deletion
df['income'] = df['income'].fillna(df['income'].median())  # simple fill
df['income_missing'] = df['income'].isna().astype(int)     # flag first!

Full patterns in pandas fillna for missing data.

Common Mistakes

❌ Replacing missing with 0 — zero is a value, not "unknown"; it drags every average down

❌ Imputing without investigating why — the pattern might be the finding

❌ Using mean for skewed data — use median instead

❌ Creating the missing-flag after filling — once filled, the information is gone

❌ Assuming MCAR by default — real-world missingness is almost always MAR or worse

Best practice: Check missingness patterns FIRST. If more than 40% of a variable is missing, question whether you should use that variable at all.

← Back to Data Analysis Tips