Model Selection and Information Criteria (AIC, BIC)
Context: FIT2086_MOC Β· which predictors to include in a linear regression β the question and the likelihood cannot answer because both improve monotonically Β· legal only because LS β‘ ML gives regression a likelihood Β· complexity framing β Bias-Variance Tradeoff (Underfitting vs Overfitting) Β· run it β Multiple Regression and Stepwise Selection in R
Quick Revision
- π― Objective: score a model as fit + complexity penalty β β smaller score wins.
- π¦ Core Components: AIC β mild penalty, overfits | BIC β harsh penalty, underfits.
- β‘ Key Constraint: the minimised NLL always falls as predictors are added (exactly like rising) β it selects parameters, never models; only the penalty makes comparison possible.
π How It Works
1. Why a Criterion Is Needed
- The two failure directions β under- vs overfitting, defined in predictor-selection terms in Bias-Variance Tradeoff (Underfitting vs Overfitting).
- Both in-sample diagnostics fail β the minimised NLL always falls with an extra predictor, exactly as always rises βΉ it selects parameters, never models.
- The fix β penalised likelihood: charge a model for its ability to fit, not just measure the fit.
2. Approach A β Testing One Coefficient at a Time
- Coefficient magnitude fails β depends on the predictorβs units.
- -score β β larger = more important; it standardises out both the scale and how variable the estimate is.
- The hypothesis β predictor is unimportant exactly when , so test vs β a variant of the [[Tests for Normal Means (z-test and t-test)|-test]] built on (Ross Ch. 9; Studio 6).
- Strengths β easy to apply, easy to explain, and every
summary()prints it. - Weaknesses β cannot compare two whole models directly, and predictors can appear stronger once other unimportant predictors stop diluting the signal.
3. Approach B β Model Selection by Information Criterion
- A βmodelβ β just a subset of predictors, e.g. , , ; given , the coefficients still come from least squares.
- The score β minimise over models:
where is the number of predictors in and the sample size.
- Reading it β score model error complexity charge; the more complex the model, the bigger the charge, so a predictor must pay for itself in fit.
- Significance rule of thumb β score differences of are considered meaningful; smaller gaps are a tie.
4. Searching the Model Space
- All subsets β score every combination and take the minimum β exact, but models; at that is βΉ computationally intractable for even moderate .
- Forward selection β (1) start from the empty model; (2) find the predictor that reduces the criterion most; (3) if none improves it, stop; (4) add it; (5) return to step 2.
- Backward selection β the mirror image β start from the full model and remove predictors.
- Trade-off β tractable for large , but a greedy path may miss important predictors (a pair that only helps jointly is never entered).
βοΈ Core Decision Matrix
| Criterion | Penalty | Behaviour | Risk it carries | Reach for it when |
|---|---|---|---|---|
| AIC | encourages fit, allows more variables | overfits β includes spurious predictors | prediction matters more than parsimony; small with weak signals | |
| BIC | prefers simpler models, selects fewer predictors | underfits β drops genuine predictors | you want an interpretable, defensible predictor set |
When It Flips: the BIC penalty exceeds the AIC penalty exactly when β for any realistic sample () BIC is always the stricter criterion, and the gap widens with .
π Exam Execution Trace & Applied Exercises
Applied Exercise
Problem: Blood pressure, , six candidate predictors (Age, Weight, BSA, Dur, Pulse, Stress). Stepwise selection under AIC returns the full 6-predictor model; under BIC it returns with (-values , , ). Why do they disagree, and how much extra fit would the three dropped predictors need to buy?
Final Extracted Output: Dur, Pulse and Stress must reduce the NLL by more than to survive AIC but by more than to survive BIC β they clear the first bar and not the second. AIC is known to be optimistic and to overfit, particularly at small ; with the BIC model is the defensible one. In it, every remaining -value is smaller than in the full fit β the removed predictors were diluting the signal. Interpretation: year , , BSA .
β οΈ Common Mistakes
- π‘ Selecting on or on the likelihood β both are monotone in model size βΉ they always crown the full model; only a penalised score can choose.
- π‘ Reading a bigger score as a better model β the criterion is minimised β lower AIC/BIC wins, because the score is error plus penalty.
- π‘ Treating a difference of as decisive β differences below are not considered significant; report the models as comparable.
- π‘ Trusting a stepwise path as exhaustive β forward/backward selection is greedy; it is not the all-subsets optimum and can miss jointly-useful predictors.
- π‘ Reporting post-selection -values as if pre-planned β they shrink precisely because competitors were removed; the selection step already used the data.
π§ Active Recall
The minimised negative log-likelihood always decreases as predictors are added. Why does that make it useless for choosing a model but fine for choosing parameters?
- Hint: What is being ranked in each case?
Answer
- Short answer: Within one model the parameter space is fixed, so the smallest NLL genuinely identifies the best coefficients; across models the larger model can always mimic the smaller one and then use its spare freedom to fit noise, so NLL ranks by flexibility, not by quality.
- Why: Nested models β βΉ always β the fix is , which charges for the extra freedom.
Why does BIC drop predictors that AIC keeps, and which should you trust at ?
Answer
- Short answer: BICβs per-predictor charge exceeds AICβs flat for any , so each predictor must buy strictly more fit to survive BIC. At AIC is known to be optimistic and to overfit, so the BIC subset is the defensible one.
- Why: Penalty scaling β AICβs penalty is constant in while BICβs grows like β AIC is less likely to underfit, BIC less likely to overfit.
Why is the all-subsets approach abandoned in practice, and what is given up by replacing it?
Answer
- Short answer: It requires scoring models β at . Forward/backward selection is tractable but greedy, so it can miss important predictors.
- Why: Exhaustive vs greedy β all-subsets guarantees the criterion-optimal subset; stepwise only guarantees a local improvement path from its starting model.