How would you use EDA to detect distribution shift (data drift) between training and production data?

Quick Overview

Asks how to use exploratory data analysis to detect distribution shift or data drift between a model's training data and new production data. Tests knowledge of the types of shift, per-feature and multivariate comparisons, data-quality checks, and how to judge which differences matter at scale.

How would you use EDA to detect distribution shift (data drift) between training and production data?

Role: Data Scientist

Category: Machine Learning

Difficulty: medium

Interview Round: Other

You have the data a model was trained on and a fresh sample of production data. How would you use exploratory data analysis (EDA) to detect "distribution shift" or "data drift" when comparing different datasets, such as training data versus new production data? ```hint Name what can change Write the joint distribution as $P(X)$ times $P(y \mid X)$ and ask which pieces you can actually observe in production today. ``` ```hint Two traps Per-feature comparisons can miss a change in how features move together, and with millions of rows almost any difference is statistically significant. Plan for both. ``` ### What a Strong Answer Covers - The kinds of shift (inputs, labels, the input-to-label relationship) and which ones can be seen without labels - Per-feature comparisons for numeric and categorical columns, with a measure of how large each change is - Data-quality signals such as missingness, unseen categories, and schema or unit changes - A multivariate check that catches changes the per-feature comparisons miss - How to tell a shift that matters from sampling noise or a trivially small difference ### Follow-up Questions - With a million production rows, the KS test rejects on almost every feature. How do you decide which shifts matter? - Labels arrive 30 days late. How do you watch for concept drift in the meantime? - A classifier trained to separate training rows from production rows reaches an AUC of 0.99, and its top feature is the event timestamp. What went wrong, and what do you do next? - After confirming drift, how do you choose between retraining, reweighting the training data, and fixing an upstream pipeline?

Overview: Asks how to use exploratory data analysis to detect distribution shift or data drift between a model's training data and new production data. Tests knowledge of the types of shift, per-feature and multivariate comparisons, data-quality checks, and how to judge which differences matter at scale.

PracHub logo
General
Nov 25, 2026
mediumData ScientistOtherMachine Learning
0
0

You have the data a model was trained on and a fresh sample of production data. How would you use exploratory data analysis (EDA) to detect "distribution shift" or "data drift" when comparing different datasets, such as training data versus new production data?

What a Strong Answer Covers Guidance

  • The kinds of shift (inputs, labels, the input-to-label relationship) and which ones can be seen without labels
  • Per-feature comparisons for numeric and categorical columns, with a measure of how large each change is
  • Data-quality signals such as missingness, unseen categories, and schema or unit changes
  • A multivariate check that catches changes the per-feature comparisons miss
  • How to tell a shift that matters from sampling noise or a trivially small difference

Follow-up Questions Guidance

  • With a million production rows, the KS test rejects on almost every feature. How do you decide which shifts matter?
  • Labels arrive 30 days late. How do you watch for concept drift in the meantime?
  • A classifier trained to separate training rows from production rows reaches an AUC of 0.99, and its top feature is the event timestamp. What went wrong, and what do you do next?
  • After confirming drift, how do you choose between retraining, reweighting the training data, and fixing an upstream pipeline?