Degrees of Freedom in Two-Sample Tests
You'll learn: How to calculate and interpret degrees of freedom for pooled and Welch's t-tests when comparing two independent samples.
What Are Degrees of Freedom Here?
Degrees of freedom (df) tell you how many independent pieces of information remain after estimating parameters from your data. In two-sample tests, the formula changes depending on whether you use the pooled or Welch's approach.
Pooled t-Test Degrees of Freedom
When you assume equal variances (pooled variance approach), the calculation is straightforward:
df = n₁ + n₂ - 2
Where n₁ and n₂ are your two sample sizes. You subtract 2 because you estimate one mean from each sample.
Example: Comparing 30 patients on Drug A to 25 on Drug B gives df = 30 + 25 - 2 = 53 degrees of freedom.
Welch's t-Test Degrees of Freedom
When variances are unequal (Welch's approach), the formula is more complex and involves both sample sizes and sample variances:
df = [(s₁²/n₁ + s₂²/n₂)²] / [(s₁²/n₁)²/(n₁-1) + (s₂²/n₂)²/(n₂-1)]
This usually produces a non-integer value, which you typically round down. The Welch df is almost always smaller than the pooled df, making it more conservative (harder to reject the null).
Why This Matters
Degrees of freedom determine which t-distribution you use to find critical values and p-values. Fewer degrees of freedom mean wider distributions and more stringent evidence requirements—like needing stronger proof when you have less information.
Key Takeaway: Pooled t-tests use simple df = n₁ + n₂ - 2, while Welch's t-test uses a complex formula yielding smaller, often fractional degrees of freedom to account for unequal variances.