Tutorials › Introduction to Statistics › The Pooled Two-Sample T Procedure

Two-Sample t Inference · Tutorial 736 of 996

The Pooled Two-Sample T Procedure

Learn when the pooled two-sample t procedure is appropriate and how its degrees-of-freedom-weighted variance estimate supports inference about a difference in means.

Intermediate 9 min read

What You'll Learn

  • State the common-variance model and assumptions for pooled two-sample t inference.
  • Derive the pooled variance from the groups’ within-sample sums of squares.
  • Explain why the pooled variance weights each sample variance by its degrees of freedom.
  • Calculate the pooled standard error and t statistic for a difference in means.
  • Construct and interpret a pooled two-sample t confidence interval.
  • Identify why pooling is not appropriate when a common population variance is implausible.

Why Pool Information About Variability?

To compare two population means, we need to account for the variability in both samples. The pooled two-sample t procedure does this by estimating one common population variance from the two groups’ within-group variation. That estimate is then used to calculate the standard error of the difference between the sample means.

Pooling can be useful when it is reasonable to model the two populations as having the same variance. It is not a way to make unequal variances equal, nor does it mean that the two sample variances must match exactly. The procedure relies on a substantive assumption about the population variances, alongside the independence and distributional conditions for two-sample t inference.

Model and assumptions: The pooled two-sample t procedure compares independent samples from two populations with means \(\mu_1\) and \(\mu_2\). It assumes that the observations are independent within and between groups, that the population variances are equal to a common value \(\sigma^2\), and that each population is normally distributed for exact small-sample t inference. With sufficiently large samples, the procedure can be reasonably robust to some departures from normality, but it still relies on the common-variance assumption.

Let the sample sizes be \(n_1\) and \(n_2\), the sample means be \(\bar{x}_1\) and \(\bar{x}_2\), and the sample standard deviations be \(s_1\) and \(s_2\). Under the model, each sample variance estimates the same population variance, but each estimate is based on a different number of degrees of freedom.

Deriving the Pooled Variance

Within group \(i\), the sample variance \(s_i^2\) is the sum of squared deviations from that group’s sample mean divided by \(n_i-1\). Therefore, the group’s within-sample sum of squares is \((n_i-1)s_i^2\). The pooled estimate combines those two sums of squares and divides by their combined degrees of freedom.

$$ s_p^2 = \frac{(n_1-1)s_1^2+(n_2-1)s_2^2} {(n_1-1)+(n_2-1)} = \frac{(n_1-1)s_1^2+(n_2-1)s_2^2} {n_1+n_2-2} $$

The weights \(n_1-1\) and \(n_2-1\) are the degrees of freedom contributed by the two groups. Thus, the pooled variance is generally not the unweighted average of \(s_1^2\) and \(s_2^2\). When the groups have equal degrees of freedom, however, the two weighted contributions are equal and the pooled variance is exactly their unweighted average.

The pooled standard deviation is \(s_p=\sqrt{s_p^2}\). It estimates the common population standard deviation \(\sigma\). It is a useful intermediate calculation, but inference about the difference in means uses the pooled standard error, which also depends on both sample sizes.

Worked Example: Combining Two Variance Estimates

Suppose two hypothetical independent samples have \(n_1=5\), \(s_1=2.0\) units and \(n_2=7\), \(s_2=3.0\) units. Assume the samples come from normal populations with a common variance. Find the pooled variance and pooled standard deviation.

The first sample contributes \(n_1-1=4\) degrees of freedom and a within-sample sum of squares of \(4(2.0^2)=16\) square units. The second contributes \(n_2-1=6\) degrees of freedom and \(6(3.0^2)=54\) square units.

Combining the sums of squares and degrees of freedom gives

$$ s_p^2 = \frac{4(2.0^2)+6(3.0^2)}{4+6} = \frac{16+54}{10} = 7.00\ \text{square units}. $$

Thus \(s_p=\sqrt{7.00}=2.646\) units. The unweighted average of the two sample variances would be \((4+9)/2=6.50\) square units, which differs here because the groups have unequal degrees of freedom. The pooled estimate gives greater weight to the second variance estimate because it is based on more degrees of freedom.

Standard Error, Test Statistic, and Interval

Under the common-variance model, the estimated standard error of \(\bar{x}_1-\bar{x}_2\) is the pooled standard deviation multiplied by the square root of the sum of the two sample-size reciprocals. The denominator \(n_1+n_2-2\) in the pooled variance is also the degrees of freedom for the pooled t procedure.

$$ SE(\bar{x}_1-\bar{x}_2) = s_p\sqrt{\frac{1}{n_1}+\frac{1}{n_2}}, \qquad df=n_1+n_2-2 $$

For testing \(H_0:\mu_1-\mu_2=\Delta_0\), where \(\Delta_0\) is the hypothesized difference, the pooled t statistic is the observed difference minus the hypothesized difference, divided by its estimated standard error. If the null hypothesis is true and the model assumptions hold, this statistic has a t distribution with \(n_1+n_2-2\) degrees of freedom.

$$ t = \frac{(\bar{x}_1-\bar{x}_2)-\Delta_0} {s_p\sqrt{\frac{1}{n_1}+\frac{1}{n_2}}} \quad\text{with}\quad df=n_1+n_2-2 $$

For a two-sided test, evidence against \(H_0\) is measured by the probability, assuming \(H_0\), of a t statistic at least as far from zero as the observed statistic. For a confidence interval with confidence level \(C\), use the appropriate t critical value with \(n_1+n_2-2\) degrees of freedom.

$$ (\bar{x}_1-\bar{x}_2) \ \pm\ t^*_{df}\,s_p\sqrt{\frac{1}{n_1}+\frac{1}{n_2}} $$

Worked Example: A Pooled Confidence Interval

In a hypothetical study, two independent groups have sample summaries \(\bar{x}_1=12.4\), \(s_1=2.0\), \(n_1=8\) and \(\bar{x}_2=10.1\), \(s_2=2.5\), \(n_2=10\). The outcome is measured in points. Assume the sampling and common-variance conditions are reasonable, and that the distributions are sufficiently close to normal for t inference. Construct a 95% pooled t confidence interval for \(\mu_1-\mu_2\).

The observed difference is \(12.4-10.1=2.3\) points. The pooled variance and standard deviation are

$$ s_p^2 = \frac{7(2.0^2)+9(2.5^2)}{8+10-2} = \frac{28+56.25}{16} = 5.265625, \qquad s_p\approx2.295\ \text{points}. $$

The degrees of freedom are \(8+10-2=16\). For a 95% interval, the t critical value is approximately \(t^*_{16}=2.120\). The standard error is

$$ SE = 2.2947\sqrt{\frac{1}{8}+\frac{1}{10}} = 2.2947\sqrt{0.225} \approx1.088\ \text{points}. $$

Using the unrounded standard error (about 1.0885) for the margin of error gives approximately \(2.120(1.0885)\approx2.3076\) points. Therefore, the interval is

$$ 2.3\pm2.3076 \approx (-0.008,\ 4.608)\ \text{points}. $$

The interval estimates that the mean outcome in population 1 is between about 0.008 points lower and 4.608 points higher than the mean in population 2. Its inclusion of zero means that these data do not distinguish a zero population mean difference from differences in the interval at the 95% confidence level. In repeated sampling under the model, 95% of intervals constructed this way would contain the true difference.

Why the Degrees-of-Freedom Weighting Works

The weighting follows directly from the within-group sums of squares. For each group, \((n_i-1)s_i^2\) measures the total squared deviation around that group’s own mean. Adding these quantities combines the observed within-group variation without mixing the two group means into one center. Under a shared variance model, the expected within-group sum of squares in group \(i\) is \((n_i-1)\sigma^2\). Adding across groups gives an expected total of \((n_1+n_2-2)\sigma^2\). Dividing by the combined degrees of freedom therefore gives an estimate centered on the common variance.

Justification: Under independent normal sampling with a common variance, each group’s within-sample sum of squares estimates its degrees of freedom multiplied by \(\sigma^2\). Hence the sum of the two within-group sums of squares estimates \((n_1+n_2-2)\sigma^2\). Dividing by \(n_1+n_2-2\) yields \(s_p^2\), and the resulting standardized difference in sample means follows a t distribution with \(n_1+n_2-2\) degrees of freedom.

This justification also explains why the pooled degrees of freedom add: each group contributes its own residual degrees of freedom after estimating its sample mean. The total is \((n_1-1)+(n_2-1)\), not \(n_1+n_2\).

Worked Example: Testing a Difference in Means

Suppose a hypothetical comparison of two independent groups produces \(\bar{x}_1=48\), \(s_1=5\), \(n_1=12\) and \(\bar{x}_2=44\), \(s_2=4\), \(n_2=9\), with the outcome measured in points. Assume observations are independent, the population variances are equal, and the group distributions have no serious departures from normality. Test \(H_0:\mu_1-\mu_2=0\) against \(H_a:\mu_1-\mu_2\ne0\) at \(\alpha=0.05\).

The pooled variance is

$$ s_p^2 = \frac{11(5^2)+8(4^2)}{12+9-2} = \frac{275+128}{19} = 21.2105, \qquad s_p\approx4.605\ \text{points}. $$

The standard error and t statistic are

$$ SE = 4.6055\sqrt{\frac{1}{12}+\frac{1}{9}} = 4.6055\sqrt{\frac{7}{36}} \approx2.031\ \text{points}, \qquad t = \frac{(48-44)-0}{2.0308} \approx1.970. $$

There are \(12+9-2=19\) degrees of freedom. For a two-sided test, the p-value is approximately \(0.064\). Because \(0.064>0.05\), the result is not statistically significant at the 5% level; we do not reject \(H_0\). In context, the observed difference is 4 points, but the data do not provide sufficiently strong evidence at this threshold that the population means differ. This conclusion does not establish that the means are equal.

Common Mistakes and When Pooling Is Appropriate

  • Using an unweighted average automatically. The reasoning “there are two sample variances, so average them” ignores their degrees of freedom. Use the weighted formula; it coincides with the unweighted average when the groups have equal degrees of freedom.
  • Confusing variance with standard deviation. Pool \(s_1^2\) and \(s_2^2\) using the weighted formula, then take the square root to obtain \(s_p\). Do not directly average \(s_1\) and \(s_2\).
  • Using the wrong degrees of freedom. The pooled procedure uses \(n_1+n_2-2\), reflecting the two groups’ within-sample degrees of freedom.
  • Treating the common-variance assumption as a sample-data fact. Similar observed sample standard deviations do not prove equal population variances, and unequal observed values do not by themselves prove they differ. The assumption must be judged using the design and subject-matter context as well as the data.
  • Pooling when the equal-variance model is implausible. The pooled standard error is built on a common population variance. If that model is not defensible, the pooled procedure may give unreliable inference; the earlier material on Welch’s procedure provides an alternative that does not require equal variances.

For instance, the incorrect reasoning “the two sample variances are 4 and 9, so the pooled variance must be 6.5” overlooks how much information each estimate contributes. With 4 and 6 degrees of freedom, respectively, the correct pooled estimate is \((4(4)+6(9))/10=7\), not 6.5. If both groups instead had equal degrees of freedom, their unweighted average would agree with the pooled estimate.

Pooling matters because it can combine information efficiently when a common variance is a reasonable model. But a calculation cannot validate its own assumptions: a correctly computed interval or p-value can still be misleading if the population variances are substantially different or the observations are not independent. State the assumptions, assess whether they fit the setting, and interpret the result in the units of the outcome.

Check Your Understanding

Use the definitions and formulas above to answer these questions.

  1. Two groups have \(n_1=6\), \(s_1^2=4\), \(n_2=9\), and \(s_2^2=10\). Calculate \(s_p^2\) and state why a simple average of the two variances would not generally be appropriate.
  2. What common-variance assumption does the pooled two-sample t procedure make? Does it require the two observed sample variances to be identical?
  3. For samples of sizes 14 and 11, what are the pooled procedure’s degrees of freedom? Explain where that number comes from.
  4. A 95% pooled confidence interval for \(\mu_1-\mu_2\) includes zero. What does that say about the evidence for a nonzero difference, and what does it not establish?
  5. Why does the pooled formula combine within-group sums of squares rather than averaging the sample standard deviations?