What this calculator does
Degrees of freedom are the number of values free to vary once the constraints of a calculation are imposed. A one-sample test on 15 observations has 14, because fixing the mean determines the last value.
The Welch case is the one worth attention. With samples of 15 and 12 and standard deviations of 2.1 and 3.4, the equal-variance formula gives 25 but Welch gives 17.46. That reduction is the penalty for not assuming equal variances, and it makes the test more conservative rather than less accurate.
The formula
The one-sample case is n−1. The equal-variance two-sample case is n₁+n₂−2. The Welch-Satterthwaite approximation combines the variances and sizes into an effective degrees of freedom that is usually fractional and always between the smaller sample minus one and the pooled figure. The chi-square case for a contingency table is (rows−1)(columns−1).
| Term | Meaning |
|---|---|
| Degrees of freedom | The number of independent values remaining after constraints. |
| Welch-Satterthwaite | An approximation giving effective degrees of freedom when variances differ. |
| Pooled df | n₁+n₂−2, valid only under the equal-variance assumption. |
| Contingency table df | (rows−1)(columns−1), since row and column totals are fixed. |
The inputs explained
| Field | What to enter |
|---|---|
| Sample size n₁ | First sample size. |
| Sample size n₂ (0 if one-sample) | Second sample size. Set to 0 for a one-sample test. |
| Std deviation s₁ (for Welch) | First standard deviation, used only for the Welch calculation. |
| Std deviation s₂ (for Welch) | Second standard deviation, used only for the Welch calculation. |
| Rows (for chi-square, 0 to skip) | Rows in a contingency table, for the chi-square figure. Set to 0 to skip. |
| Columns (for chi-square, 0 to skip) | Columns in a contingency table. Set to 0 to skip. |
When to use it
Looking up a critical value
Every t and chi-square table is indexed by degrees of freedom, so it is needed before any lookup.
Choosing between pooled and Welch
Seeing how far Welch falls below the pooled figure shows how much the unequal variances cost.
Analysing a contingency table
A chi-square test of independence needs the row and column counts rather than the sample size.
Worked examples
Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.
How does Welch compare with the pooled figure?
Increasingly unequal standard deviations.
| Sample 1 standard deviation | Welch-Satterthwaite df | Two-sample df, equal variance (n₁+n₂−2) | One-sample df (n₁ − 1) |
|---|---|---|---|
| s₁ = 1 | 12.53 | 25 | 14 |
| s₁ = 2.1 | 17.46 | 25 | 14 |
| s₁ = 3.4 | 23.71 | 25 | 14 |
| s₁ = 8 | 19.75 | 25 | 14 |
Questions
What are degrees of freedom?
The number of values in a calculation that are free to vary. With a sample of 15 and the mean fixed, 14 values can be anything and the fifteenth is then determined. Each constraint imposed costs one degree of freedom.
Why does the Welch test have fractional degrees of freedom?
Because the Welch-Satterthwaite formula is an approximation that matches moments rather than counting constraints. It produces whatever value best approximates the true sampling distribution, which is rarely a whole number. Software interpolates in the t-distribution accordingly.
Why is chi-square df (rows−1)(cols−1)?
Because the row and column totals are treated as fixed. Once all but the last cell in each row and column is known, the remainder are determined by the totals, leaving (rows−1)(columns−1) cells genuinely free to vary.
Do more degrees of freedom make a test more powerful?
Generally yes. As degrees of freedom rise the t-distribution approaches the normal, critical values shrink and it becomes easier to detect a real effect. That is one reason Welch conservatism, which lowers df, slightly reduces power when variances happen to be equal.
For the statistic itself, see the t-statistic calculator. For looking up a threshold, see the critical value calculator.