The interview problem
A product team estimates average job completion time from telemetry, but some completion events are missing. An engineer proposes dropping incomplete jobs; another proposes replacing missing times with the observed mean. Explain when either approach is defensible, construct two possible worlds with identical observed data, and propose a sensitivity analysis.
Original fundamentals practice, not a reported interview. All telemetry examples and calculations are hypothetical. Technical references retrieved September 27, 2026.
1. Define the outcome and observation indicator
Let Y be completion time and R = 1 mean that time was observed. Let X contain information recorded for every job, such as job type and submission hour. First confirm that every sampled job actually completed within the defined observation window and has a meaningful Y.
A running job is censored, while a failed job may require a different outcome definition. Neither should automatically be treated as an ordinary missing duration. For this exercise, assume an independent status source confirms that all jobs completed within the observation window and only their duration telemetry was lost.
Separate the goal of estimating a population mean from predicting durations for individual jobs. A useful predictive feature-imputation recipe does not by itself justify an unbiased population estimate or valid uncertainty.
2. State the mechanism conditionally
In this single-outcome setting, missing completely at random means R is independent of both X and Y. Random loss of telemetry packets, unrelated to job characteristics or duration, is a possible example. The observed jobs can then estimate the original mean, with less information than the full sample.
Missing at random means R is independent of Y after conditioning on observed X. For example, a logging configuration might differ by recorded job type, while loss within each type is unrelated to duration. The observed sample can have a different overall mean even though within-type adjustment is valid.
Missing not at random means observation still depends on the missing duration after accounting for X. Long jobs might be especially likely to lose their completion event. These are assumptions about the data-generating process, not labels inferred merely from a missing-value percentage. A model that predicts missingness from X does not prove MAR.
3. Calculate an adjustment under MAR
Suppose the population contains equal numbers of short-type and long-type jobs, with mean durations 2 and 10 minutes. Observation rates are 90% and 30%, respectively, and within each type observation is independent of duration.
Among 1,000 jobs, expected observed counts are 450 short-type and 150 long-type. Their pooled observed mean is (450 × 2 + 150 × 10) / 600 = 4 minutes. The true population mean is 0.5 × 2 + 0.5 × 10 = 6 minutes. Dropping missing rows overrepresents the short type.
Using known population type proportions, average the two observed type means with weights 0.5 and 0.5 to obtain 6 in this idealized calculation. Finite samples fluctuate, so MAR does not make a realized adjusted estimate exactly correct. Equivalently, inverse observation weights are 1/0.9 and 1/0.3; their weighted numerator is 6,000 minutes and weighted denominator 1,000 jobs.
This requires positive observation probability in every relevant group and credible within-group comparability. If no long-type durations are observed, the data cannot estimate their mean without extrapolation or outside evidence. Estimated observation probabilities also introduce uncertainty and can produce unstable weights.
4. Construct indistinguishable observed worlds
Now consider ten jobs with no informative X. Six observed durations are all 4 minutes; four are missing. In world A, the missing durations are also all 4, so the full mean is 4. In world B, the missing durations are all 14, so the full mean is (6 × 4 + 4 × 14) / 10 = 8.
The stored data are identical in both worlds: six fours and four missing entries. No algorithm operating only on those observed values can establish which full mean is correct. Mean imputation chooses world A's missing mean by assumption; it does not discover that assumption from the data.
A missingness model or a more elaborate imputer may provide a plausible estimate, but identifiability still depends on assumptions or additional information. Follow-up telemetry recovery, independent timing measurements or an audit sample can be more valuable than a more complex model trained on the same incomplete records.
5. Quantify how assumptions change the answer
Parameterize the missing mean as 4 + δ. The full mean becomes 0.6 × 4 + 0.4 × (4 + δ) = 4 + 0.4δ. If plausible δ ranges from 0 to 10 minutes, the estimated full mean ranges from 4 to 8 minutes.
A claim that the mean is below 6 minutes holds only for δ < 5. Present that tipping point to the team and ask what operational evidence constrains δ. The sensitivity range is not a confidence interval; it expresses alternative unverified assumptions.
If all durations are known to lie between 0 and 20 minutes, the observed data alone bound the full mean between (24 + 4 × 0)/10 = 2.4 and (24 + 4 × 20)/10 = 10.4. Without a justified upper limit, there is no corresponding finite upper bound from these records alone.
6. Explain why filling a cell is not resolving uncertainty
Replacing missing values with a single conditional mean can be useful for a prediction pipeline, but it erases residual variability in the completed column. Treating imputed values as independently observed measurements typically understates uncertainty in downstream inference.
Multiple imputation draws several plausible completed datasets under an explicit model, analyzes each and combines within- and between-imputation uncertainty. It does not repair an incorrect missingness assumption by repetition. A deterministic imputer rerun unchanged does not create meaningful between-imputation variation.
For prediction, start with a train-fitted imputation baseline and missingness indicators, or a model that supports missing features. Evaluate the actual downstream task. Fit preprocessing inside each training fold; using held-out outcomes or unavailable future context to impute predictors leaks information.
A missingness indicator can encode a useful collection-process signal. If a logging fix changes that process, the learned association may disappear. Monitor observation rates by source and time, and test performance under realistic missingness shifts rather than only random masking.
7. Choose a defensible workflow
Audit why values are absent, distinguish censoring and failures, and document which variables are always available. Plot missingness by recorded type, source and time. Associations can contradict a simple MCAR story, but their absence does not establish MAR or exclude MNAR.
For the population mean, report the complete-case result, an adjusted estimate under explicit MAR assumptions and a sensitivity range for departures. Use uncertainty methods that reflect sampling, clustering and estimated adjustment parameters. Do not report a narrow interval around an imputed mean as if it also covered mechanism uncertainty.
Prioritize collecting evidence where conclusions are sensitive: an audit of jobs with missing durations, stratified by observed workload proxies, can distinguish explanations that observed-only modeling cannot. Do not assume you know which missing jobs ran longest; record audit selection probabilities when using recovered durations to estimate the population mean. Keep the raw missingness mask and provenance so future corrections can revise both estimates and training data.
8. Follow-ups and self-review
Follow-ups: Why is the observed mean 4 under MAR in the two-type example? What assumption permits reweighting? Why cannot the ten-job dataset distinguish means 4 and 8? Does multiple imputation solve MNAR automatically? How does a still-running job change the problem?
Score 0–2 each for outcome definition, conditional mechanism statements, the adjusted mean calculation, nonidentifiability and sensitivity, and a leakage-free predictive or inferential workflow.
Sources and next steps
- Columbia University: Missing Data and Multiple Imputation — missingness mechanisms and inferential assumptions.
- scikit-learn: imputation of missing values — imputation tools and missingness indicators.
The job telemetry examples, weighted calculation, indistinguishable worlds and bounds are original derivations.
Continue your preparation
Choose a connected learning path or browse more ML fundamentals questions. Read our editorial method and attribution policy.