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 Β· resampling alternative β Cross-Validation Β· stable alternative β Penalized Regression (Ridge and Lasso)
Quick Revision
- π― Objective: score a model as fit + complexity penalty β β smaller score wins.
- π¦ Core Components: AIC β mild penalty, overfits | BIC β harsh penalty, underfits | KIC | RIC β for very large .
- β‘ 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. - Many tests βΉ false positives β screening predictors at expects spurious hits β Multiple Testing and the Bonferroni Correction (W8).
- 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.
- W8 notation β a candidate model, it fitted to , its minimised NLL (likelihood under conditional independence); for nested models adding predictors can never increase .
- The four criteria (NLL scale, = number of free parameters):
- Shared parameters donβt matter β parameters present in every candidate (e.g. intercept, ) add the same constant to all scores and never change the choice.
- Refined criteria β MML, MDL, corrected AIC/KIC β often better for small .
- Beyond regression (W11) β the same fit complexity score picks the number of classes in a mixture model; MML (C.S. Wallace, Monash) reads it as information: compress the data with the model, shortest compressed message wins.
- Polynomial example β orders β fitted to the fifth-order truth: the NLL keeps falling with order while each criterion bottoms out; read off the lecture plot, BIC and KIC select order and AIC a higher order ().
- 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).
- Problems with all conventional methods (W8) β statistically unstable β small data change βΉ big model change (Penalized Regression (Ridge and Lasso)) Β· multiple-testing false positives Β· all-subsets infeasible for moderate-to-large Β· stepwise hurt by correlated predictors and slow for large .
βοΈ Core Decision Matrix
| Criterion | Penalty | Behaviour | Risk it carries | Reach for it when |
|---|---|---|---|---|
| AIC | encourages fit, allows more variables; overfits even for large , though moderate overfitting hurts less there | overfits β includes spurious predictors | prediction matters more than parsimony; small with weak signals | |
| KIC | like AIC, slightly stricter; often performs better than AIC in practice | still overfits (rarely underfits) | AICβs use case, with a little more caution | |
| BIC | prefers simpler models, selects fewer predictors; as | underfits at small β drops genuine predictors | you want an interpretable, defensible predictor set | |
| RIC | penalty grows with the number of candidate predictors β the multiple-testing idea | can be quite conservative | is very large (recommended over AIC/KIC there) |
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 .
Applied Exercise 2 β score a model table by hand (W12 revision)
Problem: ; nested house-price models with (NLL, ): M1 Size Β· M2 +Age Β· M3 +Bedrooms Β· M4 +Distance . Score each by AIC and BIC , pick each winner, and say why NLL alone cannot choose.
| Model | NLL | AIC | BIC ( per parameter) | |
|---|---|---|---|---|
| M1 | ||||
| M2 | ||||
| M3 | ||||
| M4 |
Final Extracted Output: AIC ties M3/M4 at (and M2βs is within the significance gap) βΉ AIC does not single out a model Β· BIC picks M2 Β· NLL falls with every added predictor (), so it rewards fit and never charges for complexity.
β οΈ 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.
- π‘ Mixing up RICβs and BICβs β RIC charges with = total candidate predictors; BIC charges with = sample size.
- π‘ 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.
You have candidate predictors. Why might RIC beat AIC or KIC here?
Answer
- Short answer: With thousands of candidates, many will look useful by chance; RICβs per-parameter charge grows with the size of the search, so spurious predictors struggle to pay for themselves, while AIC/KICβs fixed charge lets them in.
- Why: Multiple-testing idea β the more predictors you search, the more false positives (Multiple Testing and the Bonferroni Correction); vs AICβs and KICβs per parameter.