The T-Test › Summary

Michael BrenndoerferJanuary 3, 20261 min read
Machine Learning from ScratchAll chapters
Part 2 of 9Hypothesis Testing
Chapter 15The T-Test › Summary
Reading section 9 of 11 · Summary · 1 minSection 9 of 11 · 1 min

Book contents

Section 9 of 11 · 1 min read

The T-Test › SummaryOne section · Sections in this chapter9 / 11 ↓
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

The t-test is the fundamental tool for comparing means when population variance is unknown, which is nearly always. Key takeaways:

The t-distribution:

  • Accounts for uncertainty from estimating variance
  • Has heavier tails than the normal distribution
  • Converges to normal as degrees of freedom increase
  • Requires larger critical values for small samples

One-sample t-test:

  • Compares sample mean to hypothesized value
  • Test statistic: t=xˉ−μ0s/nt = \frac{\bar{x} - \mu_0}{s / \sqrt{n}}
  • Degrees of freedom: n−1n - 1

Two-sample t-test:

  • Compares means from two independent groups
  • Pooled variant assumes equal variances
  • Welch's variant (recommended default) handles unequal variances
  • Degrees of freedom differ between variants

Paired t-test:

  • For matched pairs or repeated measures
  • Analyzes within-pair differences
  • Often more powerful than independent tests by eliminating between-subject variability

Assumptions:

  • Independence (critical, design-based)
  • Normality (less restrictive for large samples)
  • Equal variances (pooled test only; avoid by using Welch's)

When in doubt: Use Welch's t-test for two-sample comparisons. You sacrifice minimal power when variances are equal but avoid the equal-variance assumption when they differ.