Hypothesis Testing
1. Purpose
Decide if an observed win (A 82% vs B 80%) is real or luck. Null : no difference. Compute p-value = probability of ≥ observed gap under . Reject if .
2. Test Types
| Situation | Test |
|---|---|
| Proportion (accuracy) | binomial / paired McNemar on same folds |
| Mean over CV folds | paired t-test on fold differences |
| Many models | ANOVA + post-hoc (Bonferroni) |
Large → small → significant.
3. Errors
| true | false | |
|---|---|---|
| Keep | correct | Type II (miss) |
| Reject | Type I (false alarm, rate ) | power |
Multiple testing inflates Type I — divide by number of tests.
4. Practice
Compare on same CV splits (paired), report mean ± std + , not just best fold.
5. Exam Points
- Define , p-value, Type I/II — 5 marks, very frequent.
- Paired t over folds steps — 5 marks, frequent.
- Multiple-comparison correction — 2 marks.