What is group-wise (conditional) imputation, and when does it beat global mean/median imputation?

Quick Overview

Explain group-wise or conditional imputation of missing values and when it outperforms filling with one global mean or median. Tests your reasoning about group structure, missingness patterns, small groups and data leakage during data cleaning.

What is group-wise (conditional) imputation, and when does it beat global mean/median imputation?

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: medium

Interview Round: Other

What is group-wise or conditional imputation, and when would it produce better results than global mean/median imputation? ```hint Picture two groups Imagine one group whose typical value sits far from the overall median, and ask what a single global fill does to its missing rows. Then ask what changes if most of the missing values come from that group. ``` ### What a Strong Answer Covers - What group-wise imputation computes, and how model-based imputation generalizes it - The data conditions under which it beats a single global statistic - How to handle small, empty or unseen groups - How to fit the group statistics without leaking information from validation or test data ### Follow-up Questions - If people with high salaries are the ones who skip the salary field, does group-wise imputation remove the bias? Why or why not? - How would you choose between group-wise median imputation, KNN imputation and an iterative model-based imputer? - How would you put group-wise imputation inside a scikit-learn pipeline so that cross-validation stays honest? - Why does any single imputation make standard errors too small, and what fixes that?

Overview: Explain group-wise or conditional imputation of missing values and when it outperforms filling with one global mean or median. Tests your reasoning about group structure, missingness patterns, small groups and data leakage during data cleaning.

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

What is group-wise or conditional imputation, and when would it produce better results than global mean/median imputation?

What a Strong Answer Covers Guidance

  • What group-wise imputation computes, and how model-based imputation generalizes it
  • The data conditions under which it beats a single global statistic
  • How to handle small, empty or unseen groups
  • How to fit the group statistics without leaking information from validation or test data

Follow-up Questions Guidance

  • If people with high salaries are the ones who skip the salary field, does group-wise imputation remove the bias? Why or why not?
  • How would you choose between group-wise median imputation, KNN imputation and an iterative model-based imputer?
  • How would you put group-wise imputation inside a scikit-learn pipeline so that cross-validation stays honest?
  • Why does any single imputation make standard errors too small, and what fixes that?