KatInterview

Lifting a Weak Regression Fit While Keeping Effect Estimates Honest

Statistics & ExperimentsModel answer
HardModel answerStatistics & Experimentsregressioncross-validationcausal-inference

Last updated

Plan how to improve a low-R² per-order profit model without corrupting treatment-effect inference: transformations, CV evidence, nested validation, leakage tests, and when low R² is fine.

You have run an experiment on an online grocery platform. A linear regression predicts profit per order from order and customer features plus a treatment indicator, and it reaches only R² = 0.07. The team wants better predictive performance, but also wants to keep an unbiased, honestly calibrated estimate of the average treatment effect (ATE).

Answer the following.

  1. Improving the model. Describe concrete steps to raise predictive performance without invalidating inference. Cover feature transformations (for example, a flexible curve for basket size), interactions (for example, treatment by time of day), a more suitable error distribution and link (for example, Gamma with a log link), and checks for leakage.
  2. Is one more covariate enough? Will simply adding another covariate reliably raise out-of-sample R²? Show with cross-validation why or why not. Then propose alternatives (GAMs, quantile regression, gradient boosting) and explain how each fits with the goal of estimating an effect.
  3. Guarding against p-hacking. Explain how you would use nested cross-validation and target-leakage tests to avoid fooling yourself while you iterate on the model.
  4. Low R² in context. Explain when a low R² is perfectly acceptable for an unbiased ATE, and when it is unacceptable for accurate individual-level predictions.

Hints

Hint 1

Separate the two goals: out-of-sample prediction of the outcome, and unbiased estimation of one treatment parameter. Tools that help the first should not be allowed to touch the second.

Hint 2

In-sample R² can never fall when you add a regressor to a nested OLS model, but test error includes a variance cost per estimated parameter. Compare models on identical CV folds and look at the paired differences.

Hint 3

Choose specifications using the outcome only (ideally blind to treatment), and nest every data-dependent choice inside the training portion of an outer loop. A label-permutation run of the whole pipeline should give CV R² near zero or below.