Two-sample t-test
Two-sample t-test is a hypothesis test that asks whether the means of two independent groups differ significantly. The test statistic divides the difference in sample means by the pooled standard error.
Also known asindependent t-test
FrameworkStudent's t-test
See it move
A side-by-side comparison shows two independent groups: Method A with a sample mean of 74 (n = 20) and Method B with a sample mean of 68 (n = 20). The mean difference of 6 is divided by a pooled standard error of 3.0, giving a t-statistic of 2.0; the critical value at 5% significance with 38 degrees of freedom is approximately 2.024, so the difference is narrowly not statistically significant. This illustrates that a gap which appears large in practice can still fall short of the threshold for rejection.
The formula
Variables
- Sample means of group 1 and group 2
- Pooled standard deviation
- Sample sizes of group 1 and group 2 (observations)
Assumes equal population variances; degrees of freedom = n₁ + n₂ − 2.
Variables
- Sample variances of group 1 and group 2
Pooled standard deviation: a weighted average of both groups' variances, assuming the two population variances are equal.
Check yourself
An analyst wants to determine whether the mean annual return of actively managed equity funds differs from the mean annual return of index funds, using two independent random samples. Which test is most appropriate?