Summary and Practical Guide to Hypothesis Testing › Test Selection Decision Tree
Michael BrenndoerferJanuary 10, 20263 min read
Machine Learning from ScratchAll chapters Part 2 of 9Hypothesis Testing
Summary and Practical Guide to Hypothesis Testing › Test Selection Decision TreeOne section · Sections in this chapter3 / 12 ↓
Sections in this chapter12
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
Choosing the correct test is critical. Use this decision framework based on your research question and data characteristics.
Out[4]:
Visualization
Quick Reference Table
| Research Question | Test | scipy.stats Function |
|---|---|---|
| Is the mean equal to a specific value? (σ known) | Z-test | Manual calculation |
| Is the mean equal to a specific value? (σ unknown) | One-sample t-test | ttest_1samp() |
| Are two independent group means equal? | Welch's t-test | ttest_ind(equal_var=False) |
| Are two independent group means equal? (equal var) | Pooled t-test | ttest_ind(equal_var=True) |
| Are paired/matched observations different? | Paired t-test | ttest_rel() |
| Are ≥3 group means equal? | One-way ANOVA | f_oneway() |
| Are two variances equal? | F-test | f.sf() (manual) |
| Are multiple variances equal? | Levene's test | levene() |
| Which pairs differ after ANOVA? | Tukey HSD | tukey_hsd() |
| Treatment vs control comparisons? | Dunnett's test | dunnett() |