# Two-sample t test

A two-sample t test compares the means of two independent groups. The statistic is t = (mean1 - mean2) / square root of (s1 squared / n1 + s2 squared / n2). Welch's version does not assume equal variances.

Statistics (university) · Part 06: Hypothesis testing · Card 7 of 9 · Last updated 2026-10-19

## Analogy

It asks whether the gap between two group averages is big compared with the noise in each.

## Example

**Two teaching methods**

A: n=25, mean 80, s 10
B: n=25, mean 74, s 12
SE = square root of (4 + 5.76) = 3.12
t = 6 / 3.12 = 1.92, df about 46
p about 0.06: not significant at 5%

## In practice

Compares a treatment group with a control group, such as two teaching methods.

## Practice

### Flashcards

- **What does Welch's test relax?** The assumption that both groups have equal variance.

## Questions people ask

### When is a two-sample test the right choice?

Use it when the two groups contain different, unrelated people or items, such as patients given a drug versus patients given a placebo. If the same people are measured twice, use a paired test. Mixing them up changes the answer.

### Why use Welch's test instead of assuming equal variances?

Welch's test works whether or not the groups have equal spread, and loses almost nothing when they do. The pooled test can give misleading results if the variances differ, especially with unequal group sizes. Many analysts use Welch's test by default.

## Related concepts

- [One-sample t test](https://studyvisually.com/learn/science/statistics-university/statistics-university-part-6/statistics-university-part-6-concept-6)
- [Paired t test](https://studyvisually.com/learn/science/statistics-university/statistics-university-part-6/statistics-university-part-6-concept-8)

Web page: https://studyvisually.com/learn/science/statistics-university/statistics-university-part-6/statistics-university-part-6-concept-7
Study this card in the app: https://studyvisually.com/app/learn?category=statistics-university&card=statistics-university-part-6-concept-7
