Tutorials › VEE Mathematical Statistics › Calculating Pooled Intervals From Two Samples

VEE Mathematical Statistics · Intervals for Means · Tutorial 554 of 880

Calculating Pooled Intervals From Two Samples

Calculate and interpret pooled confidence intervals for the difference between two independent population means when the population variances are assumed equal.

Intermediate 12 min read

What You'll Learn

  • State the assumptions required for a pooled two-sample t interval.
  • Calculate the pooled sample variance as a degrees-of-freedom-weighted average.
  • Find the pooled standard error and degrees of freedom.
  • Select the correct Student t critical value for a stated confidence level.
  • Construct, round, and interpret the interval for a difference in population means.
  • Recognize errors involving variance pooling, tails, and degrees of freedom.

Why Pooled Intervals Need Careful Calculation

A two-sample confidence interval can quantify the difference between two population means, but the calculation depends on the model. When two independent normal populations have the same unknown variance, their sample variances can be combined into one pooled estimate. The pooled estimate then determines the standard error, while the combined sample sizes determine the degrees of freedom for the Student t critical value.

The arithmetic has several linked steps: calculate a weighted pooled variance, use it to find the standard error of the mean difference, choose a critical value with the appropriate degrees of freedom, and apply the margin of error to the difference of sample means. A mistake in any one step changes the interval.

Model and assumptions: Let \(X_{11},\ldots,X_{1n_1}\) be a random sample from a normal population with mean \(\mu_1\) and variance \(\sigma^2\), and let \(X_{21},\ldots,X_{2n_2}\) be an independent random sample from a normal population with mean \(\mu_2\) and the same unknown variance \(\sigma^2\). The observations are independent within and between samples. The pooled t interval is exact under these assumptions. If the samples are paired, or if the population variances differ, this pooled model does not apply.

Write the sample means as \(\bar{X}_1\) and \(\bar{X}_2\), and the sample variances as \(S_1^2\) and \(S_2^2\), where each sample variance uses denominator \(n_j-1\). The target is the difference \(\mu_1-\mu_2\), in the stated order. Reversing the order changes the sign of the estimate and the interval endpoints.

The Pooled Interval Formula

The pooled sample variance is a weighted average of the two sample variances. The weights are their respective degrees of freedom, not their sample sizes.

$$ S_p^2 = \frac{(n_1-1)S_1^2+(n_2-1)S_2^2} {n_1+n_2-2} $$

The pooled standard error of the difference in sample means is

$$ 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 a two-sided confidence level of \(100(1-\alpha)\%\), let \(t_{1-\alpha/2,df}\) be the Student t quantile with cumulative probability \(1-\alpha/2\) and \(df\) degrees of freedom. The confidence interval is

$$ (\bar{X}_1-\bar{X}_2) \ \pm\ t_{1-\alpha/2,df} S_p\sqrt{\frac{1}{n_1}+\frac{1}{n_2}}. $$
Why the degrees of freedom add: For each independent normal sample, the sum of squared deviations from its sample mean, divided by the common variance, has a chi-square distribution with \(n_j-1\) degrees of freedom. The two sums are independent, so their sum has a chi-square distribution with \((n_1-1)+(n_2-1)=n_1+n_2-2\) degrees of freedom. Dividing that combined sum of squares by its degrees of freedom gives \(S_p^2\). Under the equal-variance normal model, this pooled variance estimate is independent of the difference of sample means. Standardizing that difference by the pooled standard error therefore gives a Student t statistic with \(n_1+n_2-2\) degrees of freedom. Inverting its central probability statement yields the interval above.

This justification explains why the pooled calculation uses both samples and why its t degrees of freedom are the sum of the two sample degrees of freedom. It also identifies the assumption that matters most: both populations must share the same variance for this exact pooled procedure.

A Reliable Calculation Sequence

1
Write the target difference.
Use \(\bar{X}_1-\bar{X}_2\) to estimate \(\mu_1-\mu_2\), and keep that order throughout.
2
Pool the variances.
Multiply each sample variance by its degrees of freedom, add those weighted sums, and divide by \(n_1+n_2-2\).
3
Find the standard error and degrees of freedom.
Take the square root of the pooled variance before multiplying by \(\sqrt{1/n_1+1/n_2}\). Set \(df=n_1+n_2-2\).
4
Find the critical value and interval.
Use the confidence level and the pooled degrees of freedom to choose the t quantile. Multiply it by the standard error, then add and subtract the margin from the estimated difference.

Worked Calculations

Worked Example: A 90% Interval With Unequal Sample Sizes

A hypothetical study compares processing times in two independent groups. Assume each group is a random sample from a normal population, the observations are independent, and the two populations have a common unknown variance \(\sigma^2\). The summaries are \(n_1=8\), \(\bar{X}_1=18.4\), \(S_1^2=6.40\), and \(n_2=9\), \(\bar{X}_2=16.3\), \(S_2^2=8.44\). Calculate a 90% confidence interval for \(\mu_1-\mu_2\). Use \(t_{0.95,15}=1.75305\).

Method and point estimate. This is a pooled two-sample t interval. In the specified order, the estimated difference is \(18.4-16.3=2.1\).

Pooled variance. The sample degrees of freedom are \(8-1=7\) and \(9-1=8\), so

$$ S_p^2 = \frac{7(6.40)+8(8.44)}{8+9-2} = \frac{44.80+67.52}{15} = \frac{112.32}{15} = 7.488. $$

Standard error and degrees of freedom. Here \(df=8+9-2=15\), and

$$ SE = \sqrt{7.488}\sqrt{\frac{1}{8}+\frac{1}{9}} = \sqrt{7.488\left(\frac{17}{72}\right)} = \sqrt{1.768} \approx 1.32947. $$

Margin and interval. The margin is \(1.75305(1.32947)\approx2.3306\). Thus the interval is \(2.1\pm2.3306=(-0.2306,\ 4.4306)\), or \((-0.23,\ 4.43)\) to two decimal places.

Check and trap avoided. The pooled variance calculation gives \(1.768\) inside the final square root, whose square root is about \(1.32947\). In particular, \(\sqrt{17/72}\approx0.4859\), not \(0.4869\); using the latter value would inflate the standard error and margin. The interval contains zero, so these data do not rule out equal population means at this confidence level.

Worked Example: A 95% Interval From Sample Standard Deviations

Suppose two independent random samples come from normal populations with a common unknown variance. A hypothetical quality team records \(n_1=12\), \(\bar{X}_1=48.6\), and \(S_1=4.0\) for one process, and \(n_2=10\), \(\bar{X}_2=45.9\), and \(S_2=3.5\) for another. Construct a 95% pooled interval for \(\mu_1-\mu_2\). Use \(t_{0.975,20}=2.08596\).

Method and point estimate. Since the given summaries are standard deviations, square them before pooling. The estimated difference is \(48.6-45.9=2.7\).

Pooled variance.

$$ S_p^2 = \frac{(12-1)(4.0^2)+(10-1)(3.5^2)} {12+10-2} = \frac{11(16)+9(12.25)}{20} = \frac{176+110.25}{20} = 14.3125. $$

Standard error and degrees of freedom. The degrees of freedom are \(df=20\). The standard error is

$$ SE = \sqrt{14.3125\left(\frac{1}{12}+\frac{1}{10}\right)} = \sqrt{14.3125\left(\frac{11}{60}\right)} = \sqrt{2.6239583} \approx1.61986. $$

Margin and interval. The margin is \(2.08596(1.61986)\approx3.37898\). Therefore, \(2.7\pm3.37898=(-0.67898,\ 6.07898)\), or \((-0.68,\ 6.08)\) to two decimal places.

Check and trap avoided. The estimate is the difference in means, not the difference in standard deviations. Also, the interval is wide enough to include zero. Its endpoints are symmetric around \(2.7\): the midpoint of \(-0.67898\) and \(6.07898\) is \(2.7\), as required.

Worked Example: A Small-Sample 95% Interval

Two independent samples are drawn from normal populations with the same unknown variance. For a hypothetical comparison of measurement levels, group 1 has \(n_1=6\), \(\bar{X}_1=27.4\), and \(S_1=3\); group 2 has \(n_2=6\), \(\bar{X}_2=22.0\), and \(S_2=4\). Find a 95% pooled interval for \(\mu_1-\mu_2\). Use \(t_{0.975,10}=2.22814\).

Method and point estimate. Apply the pooled t procedure because the stated model has independent normal samples and a common variance. The estimated difference is \(27.4-22.0=5.4\).

Pooled variance.

$$ S_p^2 = \frac{5(3^2)+5(4^2)}{6+6-2} = \frac{45+80}{10} = 12.5. $$

Standard error and degrees of freedom. The pooled degrees of freedom are \(df=10\), and

$$ SE = \sqrt{12.5\left(\frac{1}{6}+\frac{1}{6}\right)} = \sqrt{\frac{25}{6}} \approx2.04124. $$

Margin and interval. The margin is \(2.22814(2.04124)\approx4.5482\). The interval is \(5.4\pm4.5482=(0.8518,\ 9.9482)\), or \((0.85,\ 9.95)\) to two decimal places.

Check and trap avoided. The critical value uses \(10\) degrees of freedom, not \(12\), because each sample loses one degree of freedom when its mean is estimated. Both endpoints are positive, so the interval indicates a positive difference \(\mu_1-\mu_2\) at the stated confidence level, under the assumed model.

Interpreting the Result and Avoiding Traps

A 95% confidence procedure means that, over repeated sampling under the model, 95% of intervals constructed by this method would contain the fixed parameter \(\mu_1-\mu_2\). After a particular interval has been calculated, the parameter is not assigned a 95% probability of lying inside it. Interpret the endpoint values in the context and units of the measured variable.

The pooled interval is centered at \(\bar{X}_1-\bar{X}_2\). If the interval includes zero, the data are compatible with no difference in population means at the corresponding two-sided confidence level. If the whole interval is positive, it supports \(\mu_1>\mu_2\); if the whole interval is negative, it supports \(\mu_1<\mu_2\). These conclusions depend on the model assumptions and do not establish causation.

Common errorWhy it is wrongCorrection
Taking the unweighted average \((S_1^2+S_2^2)/2\)The samples may contribute different amounts of information.Weight each sample variance by \(n_j-1\), then divide by \(n_1+n_2-2\).
Pooling standard deviations instead of variancesThe pooled quantity estimates a variance and is built from sums of squared deviations.Square the standard deviations first; take the square root of the pooled variance only when finding \(S_p\).
Using \(n_1+n_2\) degrees of freedomEach sample mean uses one degree of freedom.Use \(df=n_1+n_2-2\).
Using a one-tail quantile for a two-sided intervalA two-sided interval puts \(\alpha/2\) in each tail.Use \(t_{1-\alpha/2,df}\).
Reversing the difference midway throughThat changes which population difference the endpoints describe.Define the order first and retain it for the estimate and interpretation.

The pooled formula is not a default for every comparison of two means. Its exactness relies on independent random samples from normal populations with equal variances. When those assumptions are not justified, a pooled interval may be inappropriate; the calculation should not be made merely because two sample standard deviations are available. This distinction is aligned with the SOA VEE Mathematical Statistics syllabus.

Key takeaway: For an independent, equal-variance normal model, pool the sample variances using weights \(n_1-1\) and \(n_2-1\), use \(n_1+n_2-2\) degrees of freedom, and apply the corresponding two-sided t critical value to the pooled standard error.

Check Your Understanding

For each problem, assume independent random samples from normal populations with a common unknown variance unless the question asks about a calculation component. Round interval endpoints to two decimal places.

  1. A study reports \(n_1=9\), \(\bar{X}_1=16.2\), \(S_1=3.0\), \(n_2=11\), \(\bar{X}_2=14.7\), and \(S_2=2.5\). Find a 95% pooled interval for \(\mu_1-\mu_2\). Use \(t_{0.975,18}=2.10092\). (Answer: \((-1.08,\ 4.08)\))
  2. Two samples each have size 8, with means \(41.8\) and \(39.1\), and standard deviations \(2\) and \(3\), respectively. Find a 90% pooled interval for the first population mean minus the second. Use \(t_{0.95,14}=1.76131\). (Answer: \((0.45,\ 4.95)\))
  3. Two samples have sizes 5 and 7, means \(12.4\) and \(10.0\), and sample variances \(4\) and \(9\). Find a 99% pooled interval. Use \(t_{0.995,10}=3.16927\). (Answer: \((-2.51,\ 7.31)\))
  4. For samples with \(n_1=13\), \(S_1=5\), \(n_2=9\), and \(S_2=4\), calculate the pooled variance and degrees of freedom. (Answer: \(S_p^2=21.4\), \(df=20\))
  5. Independent samples have sizes 13 and 9, means \(52.6\) and \(51.4\), and standard deviations \(5\) and \(4\). Find a 95% pooled interval for \(\mu_1-\mu_2\). Use \(t_{0.975,20}=2.08596\). (Answer: \((-2.98,\ 5.38)\))
Clinical Biostats