Skip to content
Statistics

Give 3 techniques for handling missing values.

Delete rows (or columns) with missing data; impute with a simple statistic such as the mean, median or mode; or predict the missing values from the other features with a model such as k-NN or regression imputation.

datasciencetrivia.com

Card 1 of 259. Answer: Delete rows (or columns) with missing data; impute with a simple statistic such as the mean, median or mode; or predict the missing values from the other features with a model such as k-NN or regression imputation.

Created by santiviquez

About · Quizzes · History of AI · To suggest new questions or report an error send me a dm.

The longer answer

Three standard techniques are deleting rows or columns with missing data, filling gaps with a statistic such as the mean, median or most frequent value, and predicting the missing values from the other features. Also common: a binary "was missing" indicator, and models such as XGBoost or LightGBM that handle missing values natively.

Deletion costs more than it looks. If 20 columns each have 5% of values missing independently, only 0.95²⁰ ≈ 36% of rows are complete. Mean imputation keeps every row but shrinks the variance and ignores relationships between features. k-NN imputation and MICE, which imputes each column from the others in rounds, preserve those relationships better.

Interviewers ask why the data is missing, in Donald Rubin's terms. If it is missing completely at random (MCAR), deleting rows loses data but adds no bias. Missing at random (MAR) depends on observed variables and suits model-based imputation. Missing not at random (MNAR), like high earners skipping an income question, biases all the standard methods. Fit imputers on training data only.

All questions