πŸŽ‰ 75% of content is free forever β€” Unlock Premium from $10/mo β†’
CW
Search courses…
πŸ’Ό Servicesℹ️ Aboutβœ‰οΈ ContactView Pricing Plansfrom $10

t-Tests

StatisticsParametric Tests🟒 Free Lesson

Advertisement

t-Tests


Overview

A t-test compares a sample mean to a hypothesized value or compares means between groups. The one-sample t-test compares a single group to a known value. The two-sample t-test compares means of two independent groups. The paired t-test compares means from the same subjects measured twice (before/after). Welch's t-test is the robust default that doesn't assume equal variances. All t-tests assume independence and approximate normality (critical for small samples). For large samples (), the CLT ensures validity even without strict normality. Always report effect size (Cohen's d) alongside p-values to communicate practical significance.


Key Concepts

t-Test Selection Guide

ScenarioTestscipy Functiondf Formula
Sample mean vs. known valueOne-samplettest_1samp(x, mu0)
Two independent groups (equal var)Pooledttest_ind(x, y, equal_var=True)
Two independent groups (unequal var)Welch'sttest_ind(x, y, equal_var=False)Satterthwaite
Same subjects measured twicePairedttest_rel(x, y)

Assumptions

  1. Independence: Observations must be independent. No clustering or repeated measures (use paired instead).
  2. Normality: Data (or differences for paired) should be approximately normal. Critical for small samples ().
  3. Equal Variances (pooled only): Test with Levene's test. When in doubt, use Welch's.
  4. Continuous Data: Dependent variable on interval or ratio scale.
  5. No Significant Outliers: Check with boxplots or Cook's distance.

Quick Example


Key Takeaways


Deep Dive

For detailed explanations, worked examples, and Python implementations, explore the dedicated statistics lessons:

Z-Test

  • One-Sample Z-Test β€” When Οƒ is known; the simplest hypothesis test for a mean

t-Tests

  • One-Sample t-Test β€” Comparing a sample mean to a hypothesized value with worked examples
  • Two-Sample t-Test β€” Comparing means of two independent groups (pooled and Welch's)
  • Paired t-Test β€” Before/after studies and matched pairs analysis

Related Topics

Need Expert Mathematics Help?

Get personalized tutoring, project support, or professional consulting.

Advertisement