Learn
Mini widget·

Missing Values

Three datasets, all 12% missing, three completely different problems

Three datasets come back with an income column that is 12% missing. Same number, so presumably the same treatment.

In the first, a server occasionally dropped a write. Delete or impute — the answer barely moves. In the second, one segment skipped the back half of the form; drop those rows and that segment vanishes from the analysis entirely. In the third, high earners declined the income question, and the mean of what survives sits 1,489 below the truth.

Why the income cell is blankMissing rateIf you simply delete those rows
A server occasionally dropped a write12%the answer barely moves
One segment skipped the back half of the form12%that segment disappears from the analysis
High earners declined the income question12%mean income lands 1,489 below the truth

All three are 12%. And the rate cannot tell you which one you have. The hard part of handling missing data is never the filling — it is working out what you are dealing with.

The key question

Why is this cell blank — and does the reason have anything to do with the value itself?

1

Concept

Three reasons a cell can be blank

Three reasons, one distinction

Donald Rubin's taxonomy is still where every discussion of missing data starts. The names are forbidding; the question behind them is not — what is the blankness related to?

MCAR

no pattern

Blank for reasons unrelated to anything in the table.

MAR

explained by a column you have

One group skipped a section. Predictable, and fixable.

MNAR

explained by the missing value

The largest values are the ones absent. Not recoverable.

  • MCAR — missing completely at random. Blankness relates to nothing in the table. A sensor dropped one reading.
  • MAR — missing at random. Blankness is explained by another column you observed. One age group skipped a question.
  • MNAR — missing not at random. Blankness is caused by the hidden value itself. High earners will not state their income.

MAR is the worst-named term in statistics

It says "at random" and means nothing of the kind. What it actually claims is "random once you condition on what you already know". Within an age band the blanks are random; across the dataset they are anything but.

Why the distinction earns its keep

MCARMARMNAR
Blank because ofNothing in particularAnother column you observedThe hidden value itself
ExampleA sensor dropped a readingOne segment skipped a sectionHigh earners refused to answer
Deleting rowsUnbiasedBiasedBiased
Model-based imputationWorks, adds littleWorks wellCannot fix it
Testable from the data?PartlyPartlyNo — needs outside knowledge

The final row is the fundamental difficulty of the whole topic. You cannot establish MNAR from the data. Doing so would require knowing the values that are missing — and if you knew them, they would not be missing.

So in practice you reason about it from domain knowledge. A non-response rate on the income question that is triple every other question is already grounds for suspecting MNAR.

2

Why It Matters

The same 12% can cost you nothing or everything

Deleting rows is sometimes the worst option

Dropping rows with blanks is the simplest treatment and by far the most common. Under MCAR it costs sample size and introduces no bias. The trouble starts everywhere else.

SituationDeleting rows gives youWhat you actually lost
A sensor drops readings (MCAR)A smaller samplePrecision
Older users skip an online field (MAR)No older usersAn entire segment
High earners hide income (MNAR)A lower mean incomeThe conclusion itself
Only churners have a reason recordedNo churnersThe thing you are predicting
5% missing in each of 20 columns64% of rows goneTwo thirds of the data

That last row catches people out constantly. Five per cent per column sounds harmless, but spread independently across twenty columns only 0.95²⁰ ≈ 36% of rows are complete. Looking at per-column rates gives you no warning that this is happening.

Filling is not free either

Mean-filling keeps every row, so it looks costless. What it actually does is manufacture confidence. Every filled cell lands exactly on the mean, which makes the data look tighter than it is.

MethodMeanVarianceCorrelationStandard error
Mean fill=too small
Median fillshiftstoo small
Regression fill=inflatedtoo small
Multiple imputation=
Listwise deletion (MCAR)=honest, just larger

The standard error column is the one that matters. Any single-imputation method makes standard errors come out too small, because the filled-in values get treated as though they had been observed. Confidence intervals narrow, p-values shrink, and things that were not significant start looking as though they are.

What multiple imputation does differently

Instead of one value per blank it generates several plausible values, producing several complete datasets, analyses each, and pools the results. The fact that you do not know what belonged in that cell then shows up honestly in the standard error. More work, and the only version that does not lie.

Blankness is itself data

An empty "spouse's income" probably means unmarried. An empty "cancellation reason" means they have not cancelled. In cases like these the blank is not noise — it is the strongest predictor in the table.

Which is why adding an indicator column before you fill anything is nearly always worth it. One extra column buys the model access to the fact that a value was absent.

3

How It Works

Settle the mechanism, then pick the method

1. Draw the map before choosing anything

Look at where the blanks are before deciding what to do about them. A table of per-column rates is not enough; you need a row-by-column picture before a pattern appears.

  • Evenly scattered — plausibly MCAR. Delete or fill simply; either is fine.
  • Whole rows blank from a point onwards — abandoned responses. Treat the tail of the form together.
  • A vertical block — the field was not collected during that period. A date variable explains it.
  • Several columns blank together — one page or section was skipped. Handle them as a group.
  • One column far emptier than the rest — a sensitive question. Start suspecting MNAR.

2. Rough thresholds by rate

Missing rateDefault postureNote
Under 5%Delete or fill simplyBoth give nearly the same answer
5–20%Consider model-based imputationAdd an indicator column too
20–50%Impute carefully, justify itImputed values start outnumbering real ones
Over 50%Consider dropping the columnKeeping it requires an argument
Over 80%Keep only the indicatorPresence tells you more than the value

These are starting points, not rules. A column that is 60% missing can be worth keeping if it is decisive when present, and a column that is 3% missing deserves care if those 3% are MNAR.

3. Choosing a method

Table 1 Imputation methods and what each one costs you
MethodUse whenWhat it costs
Listwise deletionMCAR and under about 5% missingSample size; bias if not MCAR
Mean / median fillA quick baseline, nothing moreShrinks variance, weakens correlations
Forward fillTime series where the value persistsInvents flat stretches that never happened
kNN imputationCorrelated columns, moderate sizeSlow; sensitive to scaling
Regression / MICEMAR with informative predictorsComplexity; needs the model to be right
Missing as a categoryCategorical columns, tree modelsOnly sensible if blankness means something
An indicator columnWhenever blankness might carry signalOne more column; usually worth it

4. Rules that do not bend

  • Fit imputation parameters on the training rows only — means, medians, regression coefficients, all of them. Fitting on everything is leakage.
  • Never impute the target — inventing the value you are trying to predict makes that row unusable for training.
  • Create the indicator before filling — once filled, there is no way to recover which cells were blank.
  • In time series, never fill from the future — backward fill leaks tomorrow into today by construction.
  • Compare distributions before and after — if the shape visibly changed, the method was wrong for this column.
4

Example

What mean-filling did to the p-value

In practice: what mean-filling did to the p-value

A salary table for 800 employees is missing 120 salaries (15%). Fill them with the mean, then run the department comparison.

Complete cases (680)After mean fill (800)Read
Mean salary$84,200$84,200Identical by construction
Standard deviation$30,100$27,700Down 8%
Correlation with tenure0.620.53The relationship looks weaker
p-value across departments0.0310.008Looks more significant
Width of the 95% CI±$2,270±$1,920Narrower

The mean held and everything else moved. Putting 120 people exactly on the mean makes the data look tighter than it is, which shrinks the p-value and narrows the interval. Confidence appeared out of nowhere.

Checking who the 120 were made it worse: mostly executives and new hires. Executive pay was withheld; new hires had not been finalised. Two groups nowhere near the mean, all assigned the mean.

The lesson here

The real problem with mean imputation is not that the mean is wrong — it is that the standard error starts lying. Moving p from 0.031 to 0.008 upgrades "significant" to "highly significant" on the strength of numbers that were invented.

In practice: when the blank was the best feature

On a loan underwriting model, previous_employment_length came in 34% missing. Before deciding whether to drop or fill it, somebody flagged the blanks and looked at them on their own.

What the indicator showed

Default rate where the value was present: 3.1%

Default rate where the value was blank: 11.4%

Blank meant first job, or a gap in employment history. That single indicator predicted better than the original column ever had.

Had the column been dropped on the grounds that 34% is too much, the model would have lost its strongest feature. Find out what the blank means before deciding what to do with it.

Common misunderstandings

Misconception 1

❌ A low missing rate means any method will do.

Three per cent missing still removes a whole group if those 3% are one group. What matters is not the percentage but who is absent.

Misconception 2

❌ Mean filling is safe because it preserves the mean.

The mean is the only thing it preserves. Variance, correlation, standard errors and p-values all move — and they always move in the direction of more confidence, which is what makes it dangerous.

Misconception 3

❌ Filling with zero is the neutral choice.

Zero is not neutral, it is a specific claim. Fill income with zero and the person is unemployed; fill temperature with zero and it is freezing. Especially dangerous in any column where zero already means something.

Misconception 4

❌ A good enough method makes the missingness go away.

No method creates information that was never collected. What a good method does is not fill the hole but report honestly that there is one.

Misconception 5

❌ You can detect MNAR by inspecting the data.

You cannot. Detecting it would require knowing the missing values, and knowing them would mean they were not missing. Domain knowledge and an understanding of how the data was collected are the only routes to that judgement.

5

Interactive

Hold the rate fixed and change only the reason

Hold the rate fixed and change only the reason

A 40 × 6 map. Red cells are blank, and all three mechanisms are set to the same 12% rate. The first column is income; the cards below compare the true mean against the mean of whatever survived.

40 rows × 6 columns. The blank rate stays at 12% — only the reason changes. MCAR — blank for no reason at all

income

True mean income

4684

Mean of what is left

4432

Bias

-252

Blanks are scattered with no structure, so what survives is still a fair sample. The gap of -252 is sampling noise from 31 remaining values, not bias — it shrinks as n grows.

The rate tells you how much is gone. Only the mechanism tells you what it cost.

What to look for

  • Under MCAR, is there any structure to where the red cells land?
  • Why do the MAR blanks cluster in the bottom right?
  • MAR is clearly not random — so why is the income mean unbiased?
  • Under MNAR, can you see which end of the income column is empty?
  • Could any imputation method undo the MNAR bias?

Learning points

The same 12% produces a bias of zero under one mechanism and 1,489 under another.

MAR is explained by a column you already hold, which is exactly what model-based imputation needs.

Under MNAR the largest values are the absent ones, so nothing that remains carries that information.

Without the map there is no way to tell the three apart.

Key takeaways

Ask why first

The mechanism decides everything

  • MCAR, MAR, MNAR need different answers
  • The rate alone tells you nothing
  • Draw the map before choosing a method

Filling is not free

Every method distorts something

  • Mean fill shrinks variance
  • Standard errors come out too small
  • Multiple imputation is the honest version

Blankness is data

Which cells are empty can be the finding

  • Add an indicator before you fill
  • Missing blocks reveal collection changes
  • Never impute the target

The question is not "how should I fill this?"

It is "why is it blank?" A method chosen before that answer is a guess that may or may not hold — and when it does not, it fails without telling you.

How does this apply to real data?

Missing-data handling has more influence on the final numbers than almost any other preprocessing step, and gets less thought than any of them. In SKARI you can check the following alongside.

Diagnosis

Missing Map, Missing Rate, Little's MCAR Test

Single imputation

Mean, Median, Forward Fill, kNN

Multiple imputation

MICE, Regression Imputation, Pooling

Sensitivity

Complete Case vs Imputed, Indicator Variables

Once this clicks, you can answer questions like these.

  • Is this closer to MCAR, MAR or MNAR?
  • Which group disappears if I drop incomplete rows?
  • How much does this method distort the standard errors?
  • Is the fact of the blank itself predictive?
  • Were the imputation parameters fitted on training rows only?
Now try it on real dataOpen in Lab

Go Deeper

Outlier Detection