Strategies for handling missing values: when to delete vs. impute, and mean vs. median imputation

Quick Overview

Asks for the main strategies for handling missing values and when to choose deletion, mean or median imputation, model-based methods or multiple imputation. Tests understanding of MCAR, MAR and MNAR, what imputation does to variance and correlations, and how to avoid leakage.

Strategies for handling missing values: when to delete vs. impute, and mean vs. median imputation

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: medium

Interview Round: Other

Describe various strategies for handling missing values in a dataset. When would you choose one method over another, such as deletion vs. imputation or mean vs. median imputation? ```hint Ask why the values are missing Before picking a method, think about whether missingness is related to the other observed columns, or to the value that is missing. ``` ```hint Look at what a fill does to the column Consider what replacing every gap with the same number does to a column's variance and to its correlation with other columns. ``` ### What a Strong Answer Covers - The missingness mechanisms (MCAR, MAR, MNAR) and why they decide which methods are safe. - Deletion options and when they are acceptable, given the mechanism and the share of data missing. - Simple imputation choices by data type and distribution, including mean versus median and fills for categorical columns. - Model-based and multiple imputation, and the side effects of single imputation on variance and correlations. - Practical concerns: missingness indicators, fitting imputers on training data only, and whether the goal is prediction or inference. ### Follow-up Questions - How would you tell whether data is MCAR, MAR or MNAR, and which of these can you actually test from the data? - Why does mean imputation distort standard errors and correlations in a regression? - Tree-based libraries such as XGBoost handle missing values natively. Does that make imputation unnecessary? - Income is missing more often for high earners. What would you do?

Overview: Asks for the main strategies for handling missing values and when to choose deletion, mean or median imputation, model-based methods or multiple imputation. Tests understanding of MCAR, MAR and MNAR, what imputation does to variance and correlations, and how to avoid leakage.

PracHub logo
General
Nov 24, 2026
mediumData ScientistOtherData Manipulation (SQL/Python)
0
0

Describe various strategies for handling missing values in a dataset. When would you choose one method over another, such as deletion vs. imputation or mean vs. median imputation?

What a Strong Answer Covers Guidance

  • The missingness mechanisms (MCAR, MAR, MNAR) and why they decide which methods are safe.
  • Deletion options and when they are acceptable, given the mechanism and the share of data missing.
  • Simple imputation choices by data type and distribution, including mean versus median and fills for categorical columns.
  • Model-based and multiple imputation, and the side effects of single imputation on variance and correlations.
  • Practical concerns: missingness indicators, fitting imputers on training data only, and whether the goal is prediction or inference.

Follow-up Questions Guidance

  • How would you tell whether data is MCAR, MAR or MNAR, and which of these can you actually test from the data?
  • Why does mean imputation distort standard errors and correlations in a regression?
  • Tree-based libraries such as XGBoost handle missing values natively. Does that make imputation unnecessary?
  • Income is missing more often for high earners. What would you do?