The T-Test › Choosing the Right T-Test: Decision Framework
Michael BrenndoerferJanuary 3, 20263 min read
Machine Learning from ScratchAll chapters Part 2 of 9Hypothesis Testing
The T-Test › Choosing the Right T-Test: Decision FrameworkOne section · Sections in this chapter8 / 11 ↓
Sections in this chapter11
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
Selecting the appropriate t-test depends on your research design and data characteristics:
Out[17]:
Visualization
Quick Reference:
| Scenario | Test | scipy.stats function |
|---|---|---|
| One sample vs. hypothesized value | One-sample t-test | ttest_1samp(data, mu_0) |
| Two independent groups (default) | Welch's t-test | ttest_ind(a, b, equal_var=False) |
| Two independent groups (equal variance confirmed) | Pooled t-test | ttest_ind(a, b, equal_var=True) |
| Matched pairs / before-after | Paired t-test | ttest_rel(after, before) |