How do you test predictor significance in logistic regression with the Wald test, likelihood ratio test, or AIC/BIC?
Role: Data Scientist
Category: Machine Learning
Difficulty: hard
Interview Round: Other
How do you test predictor significance in a logistic regression model, e.g., with the Wald test, likelihood ratio test, or AIC/BIC?
Explain what each approach computes, when you would use it, and where it can mislead you.
```hint Count the fits
For each approach, ask how many models you have to fit and what it assumes about the shape of the log-likelihood around the estimate.
```
```hint A pitfall to check
Consider what happens to each test when one predictor almost perfectly separates the two classes.
```
### What a Strong Answer Covers
- The Wald test: its statistic, its reference distribution, and the situations where it misleads
- The likelihood ratio test for nested models, including grouped terms such as a multi-level categorical, and how to get the degrees of freedom
- What AIC and BIC measure, how their penalties differ, and why they rank models without giving p-values
- Practical issues: fitting both models on the same rows, handling separation, statistical significance compared with effect size in large samples, and selection effects
### Follow-up Questions
- A coefficient is 25 on the log-odds scale and its Wald p-value is 0.9. What is happening, and what do you do?
- How would you test whether a 5-level categorical variable matters as a whole?
- With 10 million rows every predictor has p < 0.001. How do you decide which ones matter?
- Two models differ by one parameter. How does choosing between them by AIC relate to a likelihood ratio test at some significance level?
Overview: Asks how to decide whether predictors matter in a logistic regression using the Wald test, the likelihood ratio test, and AIC or BIC. Tests knowledge of each statistic, nested model comparison, the cases where a test misleads, and the difference between hypothesis testing and model selection.