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
Chapter 22Summary and Practical Guide to Hypothesis Testing › Test Selection Decision Tree
Reading section 3 of 12 · Test Selection Decision Tree · 3 minSection 3 of 12 · 3 min

Book contents

Section 3 of 12 · 3 min read

Summary and Practical Guide to Hypothesis Testing › Test Selection Decision TreeOne section · Sections in this chapter3 / 12 ↓
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
Decision tree selecting Z, t, F, Levene, or ANOVA tests from the number and relationship of means, known variance, and number of factors.
Decision tree for selecting the appropriate hypothesis test. Start at the top and follow the branches based on your research question and data structure.

Quick Reference Table

Research QuestionTestscipy.stats Function
Is the mean equal to a specific value? (σ known)Z-testManual calculation
Is the mean equal to a specific value? (σ unknown)One-sample t-testttest_1samp()
Are two independent group means equal?Welch's t-testttest_ind(equal_var=False)
Are two independent group means equal? (equal var)Pooled t-testttest_ind(equal_var=True)
Are paired/matched observations different?Paired t-testttest_rel()
Are ≥3 group means equal?One-way ANOVAf_oneway()
Are two variances equal?F-testf.sf() (manual)
Are multiple variances equal?Levene's testlevene()
Which pairs differ after ANOVA?Tukey HSDtukey_hsd()
Treatment vs control comparisons?Dunnett's testdunnett()