Diagnose and interpret regression assumptions
VoleonData Scientist · Technical ScreenLast updated
This problem tests your ability to diagnose violations of OLS assumptions in count data and determine the appropriate corrective modeling strategy.
The Scenario
You are modeling the daily number of new service subscriptions based on a set of marketing features and historical trends. You initially fit a standard Ordinary Least Squares (OLS) regression: log(subscriptions) = beta_0 + beta_1 * spend + beta_2 * seasonality + epsilon.
After running diagnostics, you observe the following:
- The Breusch-Pagan test returns a p-value of 0.02.
- The Variance Inflation Factor (VIF) for the 'spend' and 'ad_count' variables is 12.
- A Durbin-Watson statistic of 1.1 is calculated for the residuals.
- The distribution of the raw subscription counts is heavily right-skewed with a variance significantly larger than the mean.
The Task
- Explain what each of the four diagnostic findings implies for the validity of your current OLS model.
- Discuss why OLS might be suboptimal for raw count data compared to a Generalized Linear Model (GLM) approach.
- Propose a specific alternative model structure to address the identified issues and explain how you would interpret the resulting coefficients for a continuous predictor (e.g., 'spend').
Example Context
If your model predicts log(y) = 2.5 + 0.05 * x, and x increases by 1 unit, the expected subscription count increases by approximately 5.1% (exp(0.05) - 1). Contrast this with how you would interpret a coefficient in a Poisson regression using a log-link function.
Hints
Hint 1
A VIF above 10 typically indicates high multicollinearity that inflates the variance of coefficient estimates.
Hint 2
The Durbin-Watson statistic measures the presence of autocorrelation, where values significantly below 2 indicate positive serial correlation.
Hint 3
When variance exceeds the mean in count data, the Negative Binomial distribution is often preferred over the Poisson distribution to account for overdispersion.
Follow-up questions
- How would you specifically handle the overdispersion if you chose a Poisson GLM, and what are the trade-offs of using robust standard errors versus changing the distribution?
- If you decide to keep the log-transformation, how does Jensen's Inequality affect the interpretation of your predicted values when transforming back to the original scale?
- How would you approach variable selection if the multicollinearity issue persists after model reformulation?
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.