devnotes.

Types of Missing Values

Not all missing data is the same. Statisticians describe three mechanisms, and the right handling method depends on which one you have.

TypeMeaningExample
MCAR — Missing Completely At RandomMissingness is random and unrelated to any variable in the datasetA lab sample is lost by accident
MAR — Missing At RandomMissingness depends on other observed variables, not on the missing value itselfYounger users skip the "income" question more often
MNAR — Missing Not At RandomMissingness is directly related to the missing value itselfHigh-income individuals choose not to report income

How this affects your decision

  • MCAR is the easiest case. Dropping rows or simple imputation usually causes little bias.
  • MAR can be handled well with imputation that uses the other columns (KNN, regression, iterative imputation).
  • MNAR is the hardest. The fact that a value is missing carries information, so consider adding a missing-indicator column and gathering more data, if possible.

A quick practical test

# Is "Age" missingness related to another column?
df["Age_missing"] = df["Age"].isnull().astype(int)

print(df.groupby("Pclass")["Age_missing"].mean())      # share of missing Age per class
print(df.groupby("Sex")["Age_missing"].mean())

If missing values in one column are strongly related to other columns, the data is probably MAR rather than MCAR.

Types of Missing Values - Missing Values | Data Preparation | DevNotes