← Amazon Interview Insights

Amazon·Data Scientist·Technical Phone Screen·Senior

SeniorPrefer not to say
Jul 2026Remote

Summary

Amazon DS technical screen, one question but it was a beast. They packed omitted variable bias, heteroscedasticity, WLS vs robust SEs, and a specification test all into a single problem about building energy models. Left feeling like I'd passed a qual exam.

Questions Asked (1)

Q1

You have a true data-generating process for building energy use with temperature, occupancy, and heteroscedastic errors, but you fit OLS on temperature alone. Derive the expected bias on the temperature coefficient, state its sign when hotter days tend to be more occupied, explain what WLS and robust standard errors each do (and don't do) for you, then name a test for remaining heteroscedasticity and describe a diagnostic you'd put in a production training report.

Technical Trade-offsData ModelingProduct Analytics & Metrics
Author's notes

This question ate me alive for the first two minutes.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by setting up the omitted variable bias formula for the temperature coefficient when occupancy is omitted, then derive its sign under the stated correlation. Next, clearly distinguish what WLS and robust standard errors each address (efficiency vs. valid inference) and what they leave unchanged (the point estimate). Finally, name a heteroscedasticity test and describe a practical diagnostic for a production training report.

Pro tip: Emphasize that WLS changes the estimand and requires a correct variance model, while robust SEs only fix inference—this trade-off is critical in production where model coefficients drive decisions.

1. Set up the omitted variable bias

Write the true model: energy = β0 + β1*temp + β2*occupancy + ε, with heteroscedastic errors. The fitted model omits occupancy, so the OLS estimator of β1 has bias = β2 * δ, where δ is the coefficient from regressing occupancy on temperature.

2. Determine the sign of the bias

Assume β2 > 0 (occupancy increases energy use) and δ > 0 (hotter days are more occupied). Then the bias is positive, so the OLS temperature coefficient is biased upward—overstating the effect of temperature.

3. Explain WLS vs. robust standard errors

WLS reweights observations to account for heteroscedasticity, improving efficiency if the variance model is correct, but it changes the estimator and can be biased if the model is misspecified. Robust SEs (e.g., White) correct standard errors for heteroscedasticity without changing the point estimates, but they do not fix bias from omitted variables.

4. Name a heteroscedasticity test and diagnostic

Mention the Breusch-Pagan test (or White test) to detect remaining heteroscedasticity. For a production training report, include a plot of residuals vs. fitted values or a rolling variance of residuals over time to monitor heteroscedasticity.

Key Points to Mention

  • Omitted variable bias formula: bias = β2 * δ, where δ is the coefficient from regressing the omitted variable on the included one.
  • Sign of bias: positive when β2 > 0 and δ > 0, leading to overestimation of the temperature effect.
  • WLS improves efficiency under correct variance specification but changes the estimand and can introduce bias if misspecified.
  • Robust standard errors (e.g., HC3) provide valid inference under heteroscedasticity but do not correct point estimates or omitted variable bias.
  • Breusch-Pagan test (or White test) for detecting heteroscedasticity.
  • Production diagnostic: residual vs. fitted plot, rolling variance of residuals, or monitoring of prediction intervals.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.