Pooled Variance and Two-Sample Inference, ASTATS Midterm 2 – Study Notes
offline

Difficulty: Intermediate | Prerequisites: Confidence intervals, sample variance, t-distribution basics (see Confidence Intervals study notes).

Big Picture

Much of applied statistics involves comparing two groups. The machinery you need is an extension of the single-sample confidence interval: estimate a shared (pooled) variance, compute the standard error of the difference in means, then use the t-distribution to build an interval or run a test. This topic matters whenever you need to decide whether two populations differ, whether that is two treatments, two time periods, or two measurement methods.


TL;DR

When two populations share the same variance, you pool their sample data to get a better variance estimate, then use it to build a confidence interval for the difference in population means. The pooled variance weights each sample's contribution by its degrees of freedom.


Key Terms

Pooled variance (s-p-squared)

A weighted average of two sample variances, used when you assume both populations share a common variance. The weights are the degrees of freedom from each sample. In simple terms, you are combining the information from both groups to get one, more reliable variance estimate.

Difference in sample means (d-bar)

The sample mean of one group minus the sample mean of the other: d-bar = X-bar minus Y-bar. This is the point estimate for the true difference mu_X minus mu_Y.

Two-sample t-test

A hypothesis test that uses the pooled variance to decide whether the means of two populations are equal. The test statistic is d-bar divided by its estimated standard error, and it follows a t-distribution.

Equal-variance assumption (homoscedasticity)

The assumption that both populations have the same variance, sigma-squared. This justifies pooling. When the assumption is violated, use Welch's t-test instead (not covered in this exam).


Core Content

Computing the Pooled Variance

  • With two samples of sizes n1 and n2 and sample variances s1-squared and s2-squared:

    • s-p-squared = [(n1 - 1) * s1-squared + (n2 - 1) * s2-squared] / (n1 + n2 - 2)

  • When sample sizes are equal (n1 = n2 = n), this simplifies to the simple average: s-p-squared = (s1-squared + s2-squared) / 2.

  • In the practice exam (Q2), each sample has n = 2 observations. Compute each sample variance from the deviations around its own sample mean, then pool.

Worked Example from Q2

  • X: 4.5, 6.5. X-bar = 5.5. Deviations: -1, +1. s_X-squared = (1 + 1) / (2 - 1) = 2.

  • Y: 11.5, 9.5. Y-bar = 10.5. Deviations: +1, -1. s_Y-squared = (1 + 1) / (2 - 1) = 2.

  • Pooled: s-p-squared = [(1)(2) + (1)(2)] / (2 + 2 - 2) = 4 / 2 = 2.

Variance of the Difference in Means

  • d-bar = X-bar - Y-bar. Since the two samples are independent:

    • Var(d-bar) = s-p-squared * (1/n1 + 1/n2)

  • With n1 = n2 = 2 and s-p-squared = 2: Var(d-bar) = 2 * (1/2 + 1/2) = 2.

  • SE(d-bar) = sqrt(2) ≈ 1.414.

Confidence Interval for the Difference

  • The CI is: d-bar plus or minus t*(alpha/2, df) times SE(d-bar), where df = n1 + n2 - 2.

  • For an 80% CI (alpha = 0.20, so alpha/2 = 0.10) with df = 2: look up t*(0.10, 2) ≈ 1.886.

  • d-bar = 5.5 - 10.5 = -5.

  • Interval: -5 plus or minus 1.886 * 1.414 = -5 plus or minus 2.667, so approximately (-7.67, -2.33).


Formulas

Pooled variance: s-p-squared = [(n1 - 1) * s1-squared + (n2 - 1) * s2-squared] / (n1 + n2 - 2)

Variance of the difference in sample means (independent samples): Var(d-bar) = s-p-squared * (1/n1 + 1/n2)

Standard error of d-bar: SE(d-bar) = sqrt(s-p-squared * (1/n1 + 1/n2))

CI for mu_X - mu_Y: d-bar plus or minus t*(alpha/2, n1 + n2 - 2) times SE(d-bar)


Common Misconceptions

  • Students often pool by simply averaging the raw data across both groups. That gives a single grand mean, not a pooled variance. Pooling applies to the variance estimates, weighted by degrees of freedom.

  • Students forget that the degrees of freedom for the pooled t-test is n1 + n2 - 2, not n1 + n2 - 1 or n1 + n2. You lose one degree of freedom for each sample mean you estimate.

  • Students sometimes compute Var(d-bar) as s-p-squared / (n1 + n2). The correct formula has (1/n1 + 1/n2), which equals 2/n only when samples are the same size.


Why It Matters / Exam Flags

⚠️ Q2 on the practice midterm tests pooled variance computation with n = 2 per group. With tiny samples the arithmetic is simple, but the t-critical values are large (heavy tails). Do not use z-values here.

⚠️ Expect to be asked for a specific confidence level (80%, 95%, etc.) and to look up the correct t* with df = n1 + n2 - 2.

⚠️ If you are told to "estimate the variance shared by both populations," that is a direct request for the pooled variance.


Quick Self-Test

  1. True or false: Pooled variance gives equal weight to each sample's variance regardless of sample size.

  1. Fill in the blank: The degrees of freedom for a pooled two-sample t-test with n1 = 5 and n2 = 8 is ______.

  1. True or false: If both sample variances happen to be equal, the pooled variance equals that common value.

Answers: 1. False (it weights by degrees of freedom, so larger samples contribute more). 2. 11 (5 + 8 - 2). 3. True.


Practice Q&A

Q: You observe X = {4.5, 6.5} and Y = {11.5, 9.5}. Assuming equal population variances, estimate the shared variance.

A: Compute each sample variance: s_X-squared = [(4.5 - 5.5) squared + (6.5 - 5.5) squared] / 1 = 2. s_Y-squared = [(11.5 - 10.5) squared + (9.5 - 10.5) squared] / 1 = 2. Pooled: s-p-squared = [(1)(2) + (1)(2)] / 2 = 2.

Q: Let d-bar = X-bar - Y-bar. What is the estimated variance of d-bar?

A: Var(d-bar) = s-p-squared * (1/n1 + 1/n2) = 2 * (1/2 + 1/2) = 2.

Q: Construct an 80% confidence interval for mu_X - mu_Y.

A: d-bar = 5.5 - 10.5 = -5. df = 2, so t*(0.10, 2) ≈ 1.886. Margin = 1.886 * sqrt(2) ≈ 2.667. Interval: (-7.67, -2.33).


Connections to Other Topics

Pooled variance reappears in ANOVA, which generalises the two-sample comparison to multiple groups. The logic of building a CI for a difference carries into regression, where each coefficient has its own standard error and t-based interval. If the equal-variance assumption fails, Welch's correction adjusts the degrees of freedom downward.


Related Terms / Search Tags

pooled variance, two-sample t-test, difference in means, d-bar, equal variance assumption, homoscedasticity, Welch's t-test, independent samples, degrees of freedom, standard error of the difference, confidence interval for difference, ANOVA, F-test