Mathwords logoMathwords

Welch's t-Test — Definition, Formula & Example

Welch's t-test is a two-sample t-test that checks whether two independent groups have different population means. Unlike the pooled version, it does not require the two groups to have the same spread.

Given independent random samples of sizes n1n_1 and n2n_2 from two approximately normal populations, Welch's t-test tests H0:μ1=μ2H_0: \mu_1 = \mu_2 using the statistic t=(xˉ1−xˉ2)/s12/n1+s22/n2t = (\bar{x}_1 - \bar{x}_2)/\sqrt{s_1^2/n_1 + s_2^2/n_2}. Under H0H_0, this statistic approximately follows a t-distribution whose degrees of freedom come from the Welch–Satterthwaite equation. The population variances σ12\sigma_1^2 and σ22\sigma_2^2 may differ.

Key Formula

t=xˉ1−xˉ2s12n1+s22n2,df≈(s12n1+s22n2)2(s12/n1)2n1−1+(s22/n2)2n2−1t = \frac{\bar{x}_1 - \bar{x}_2}{\sqrt{\dfrac{s_1^2}{n_1} + \dfrac{s_2^2}{n_2}}}, \qquad df \approx \frac{\left(\dfrac{s_1^2}{n_1} + \dfrac{s_2^2}{n_2}\right)^2}{\dfrac{(s_1^2/n_1)^2}{n_1 - 1} + \dfrac{(s_2^2/n_2)^2}{n_2 - 1}}
Where:
  • xˉ1,xˉ2\bar{x}_1, \bar{x}_2 = Sample means of groups 1 and 2
  • s1,s2s_1, s_2 = Sample standard deviations of groups 1 and 2
  • n1,n2n_1, n_2 = Sample sizes of groups 1 and 2
  • dfdf = Approximate degrees of freedom (usually not a whole number)

Worked Example

Problem: Two pizza shops time their deliveries. Shop A: 16 deliveries, mean 38 minutes, standard deviation 12 minutes. Shop B: 25 deliveries, mean 26 minutes, standard deviation 20 minutes. The spreads clearly differ. At the 0.05 level (two-tailed), is there evidence that the mean delivery times differ?
Step 1: Use H0:μA=μBH_0: \mu_A = \mu_B and Ha:μA≠μBH_a: \mu_A \neq \mu_B. Find the standard error. Each group keeps its own variance, with nothing pooled.
SE=12216+20225=9+16=25=5SE = \sqrt{\frac{12^2}{16} + \frac{20^2}{25}} = \sqrt{9 + 16} = \sqrt{25} = 5
Step 2: Compute the t-statistic.
t=38−265=125=2.4t = \frac{38 - 26}{5} = \frac{12}{5} = 2.4
Step 3: Find the Welch degrees of freedom with the formula below. It gives about 38.9, and the two-tailed critical value for 38.9 degrees of freedom is about 2.02. Since 2.4>2.022.4 > 2.02, reject H0H_0 (the p-value is about 0.021). The conservative choice df=min⁡(15,24)=15df = \min(15, 24) = 15 gives a critical value of 2.131, and 2.4 still exceeds it.
df=(9+16)29215+16224=62524115=9375241≈38.90df = \frac{(9 + 16)^2}{\dfrac{9^2}{15} + \dfrac{16^2}{24}} = \frac{625}{\tfrac{241}{15}} = \frac{9375}{241} \approx 38.90
Answer: Reject the null hypothesis. With t=2.4t = 2.4 and about 38.9 degrees of freedom, there is significant evidence at the 0.05 level that the mean delivery times differ. Shop A's sample mean is 12 minutes longer.

Why It Matters

On the AP Statistics exam, two-sample t-tests and two-sample t-intervals for means are unpooled. That is Welch's method, and calculators run it when you choose "Pooled: No." Many statisticians recommend it as the default two-sample t-test, because it stays reliable when the variances differ and loses little when they are equal.

Common Mistakes

Mistake: Pooling the two variances into one estimate when the groups have clearly different spreads.
Correction: Pooling assumes the two population variances are equal. In the example, pooling gives t≈2.16t \approx 2.16 instead of 2.4, because it lets the larger, more spread-out sample dominate. Unless you have a strong reason to believe the variances are equal, use Welch's unpooled standard error.

Related Terms