Two-sample t-test

Math

Definition

A two-sample t-test compares the means of two independent groups to determine whether there is a statistically significant difference between them. It is used when the population standard deviations are unknown and the samples are drawn independently.

How It Works

  1. State H₀: μ₁ = μ₂ and the alternative hypothesis.
  2. Calculate the sample means and standard deviations for both groups.
  3. Compute the test statistic: t = (x̄₁ − x̄₂) / √(s₁²/n₁ + s₂²/n₂).
  4. Determine degrees of freedom (using the conservative or Welch method).
  5. Find the p-value and compare to the significance level to draw a conclusion.

Examples

  • Comparing the average test scores between students who used a study app and those who did not
  • Testing whether two brands of batteries have different average lifetimes
  • Determining if there is a difference in average height between basketball and soccer players
Key Fact

t = (x̄₁ − x̄₂) / √(s₁²/n₁ + s₂²/n₂)

Study This Concept

Practice two-sample t-test with free review games in these units: