How this calculator works
One-sample inference estimates one mean and leaves n - 1 degrees of freedom. A paired test uses the number of complete pairs. Pooling two group variances leaves n1 + n2 - 2. Welch uses a variance-weighted approximation that need not be an integer. ANOVA separates between-group and within-group degrees of freedom; regression subtracts every fitted coefficient, including the intercept.
Formula
One sample: n - 1. Pooled: n1 + n2 - 2. Welch: (a + b)²/[a²/(n1 - 1) + b²/(n2 - 1)], a = s1²/n1, b = s2²/n2. Contingency: (r - 1)(c - 1). Regression: n - p.
Worked example
A one-sample test with 20 observations has 19 degrees of freedom. A 2 by 3 contingency table has 2. Four groups containing 20 observations have ANOVA degrees of freedom 3 and 16.
Advertisement
Frequently asked questions
Should I round Welch degrees of freedom?
No. The t distribution accepts the fractional approximation directly.
Do paired tests use both sample counts?
Use the number of complete differences, then subtract one.
Does a regression intercept count?
Yes. Include every fitted coefficient when subtracting parameters from observations.