Tutorials › Introduction to Statistics › Satterthwaite Degrees of Freedom

Two-Sample t Inference · Tutorial 726 of 996

Satterthwaite Degrees of Freedom

You will calculate and interpret Welch–Satterthwaite degrees of freedom and see how each group’s contribution affects the result.

Intermediate 10 min read

What You'll Learn

  • Define Welch–Satterthwaite degrees of freedom for two independent sample means
  • Explain why the calculation uses each group’s sample size and variance
  • Derive the formula by matching the first two moments of a variance estimate
  • Calculate the approximate degrees of freedom without premature rounding
  • Explain why the result can be fractional and what that represents
  • Identify common errors in entering or interpreting the formula

Why Degrees of Freedom Are Needed

When comparing two population means with unequal variances, the estimated variance of the difference combines information from both samples. The uncertainty in that estimate depends on how much data each group provides and on how variable each group is. A single degrees-of-freedom value must summarize those contributions for the Welch procedure.

The Welch–Satterthwaite degrees of freedom do that by approximating the distribution of the estimated variance. They are generally not a simple count such as \(n_1+n_2-2\), and they need not be an integer. Their value is determined by the two sample sizes and the two sample variances.

Definition: For two independent samples with sizes \(n_1,n_2\) and sample standard deviations \(s_1,s_2\), the Welch–Satterthwaite degrees of freedom are $$ df=\frac{\left(\frac{s_1^2}{n_1}+\frac{s_2^2}{n_2}\right)^2} {\frac{\left(\frac{s_1^2}{n_1}\right)^2}{n_1-1} +\frac{\left(\frac{s_2^2}{n_2}\right)^2}{n_2-1}}. $$ They provide an approximate degrees-of-freedom value for the Welch two-sample \(t\) procedure.

The two quantities \(s_1^2/n_1\) and \(s_2^2/n_2\) are the two groups’ contributions to the estimated variance of the difference between sample means. This is the variance estimate underlying Welch’s standard error:

$$ SE^2=\frac{s_1^2}{n_1}+\frac{s_2^2}{n_2}. $$

The degrees-of-freedom formula squares the sum of those contributions in its numerator. Its denominator sums the squared contributions, each divided by that group’s \(n_i-1\). The formula therefore accounts for both the size of each contribution and how much information supports it.

Model and Assumptions

For the usual derivation, suppose the two groups are independent samples from normal populations. Within group \(i\), observations are independent and share a population variance \(\sigma_i^2\); the two population variances are not required to be equal. Under normal sampling, the sample variance has the property that \((n_i-1)s_i^2/\sigma_i^2\) follows a chi-square distribution with \(n_i-1\) degrees of freedom. The two sample variances are independent because the samples are independent.

These conditions explain the approximation; they do not imply that real data must always be exactly normal for the Welch method to be useful. The reliability of two-sample \(t\) inference also depends on the data and sampling conditions, which must be considered separately. Here, the point is that unequal variances are allowed, and each sample variance has its own degrees of freedom.

Why the Formula Has This Form

The formula can be justified by approximating the estimated variance of the difference as a scaled chi-square random variable. A chi-square distribution is indexed by degrees of freedom, and matching the mean and variance of the estimated variance gives an effective degrees-of-freedom value.

To see the argument, temporarily use \(S_i^2\) for a random sample variance and define \(V=S_1^2/n_1+S_2^2/n_2\). Under the normal-sampling model, each term is a constant times a chi-square variable. For group \(i\), its mean is \(\sigma_i^2/n_i\), and its variance is \(2\sigma_i^4/[n_i^2(n_i-1)]\). Independence means the means and variances of the two terms add. Thus:

$$ E(V)=\frac{\sigma_1^2}{n_1}+\frac{\sigma_2^2}{n_2}, \qquad \operatorname{Var}(V)= 2\left[ \frac{(\sigma_1^2/n_1)^2}{n_1-1} +\frac{(\sigma_2^2/n_2)^2}{n_2-1} \right]. $$

A scaled chi-square variable \(c\chi^2_\nu\), where \(c\) is a positive scale and \(\nu\) is its degrees of freedom, has mean \(c\nu\) and variance \(2c^2\nu\). If it is chosen to match the mean and variance of \(V\), then its variance-to-mean relationship gives:

$$ \nu=\frac{2[E(V)]^2}{\operatorname{Var}(V)} = \frac{\left(\frac{\sigma_1^2}{n_1}+\frac{\sigma_2^2}{n_2}\right)^2} {\frac{(\sigma_1^2/n_1)^2}{n_1-1} +\frac{(\sigma_2^2/n_2)^2}{n_2-1}}. $$

The population variances in this expression are unknown, so the calculation substitutes the observed sample variances \(s_1^2\) and \(s_2^2\). This gives the Welch–Satterthwaite formula. A sum of differently scaled chi-square variables is not generally exactly a single scaled chi-square variable, so this moment-matching step is an approximation. It explains why the result is effective degrees of freedom rather than an exact count of observations.

Calculating the Degrees of Freedom

A reliable calculation is to first find each group’s contribution \(a_i=s_i^2/n_i\), then square the sum for the numerator, and then calculate each denominator term \(a_i^2/(n_i-1)\). Keep sufficient precision through the calculation and round only the final degrees of freedom.

Worked Example: Contributions From Two Groups

Suppose a hypothetical comparison has \(n_1=10\), \(s_1=4\) hours and \(n_2=15\), \(s_2=6\) hours. Calculate the Welch–Satterthwaite degrees of freedom.

The contributions to the estimated variance are:

$$ a_1=\frac{4^2}{10}=1.6\text{ hours}^2, \qquad a_2=\frac{6^2}{15}=2.4\text{ hours}^2. $$

Substitute these values into the formula:

$$ df=\frac{(1.6+2.4)^2}{\frac{1.6^2}{9}+\frac{2.4^2}{14}} =\frac{16}{\frac{2.56}{9}+\frac{5.76}{14}} =\frac{16}{0.6958730} \approx 22.9927. $$

The approximate degrees of freedom are \(22.99\). The numerator uses the total variance contribution, while each denominator term reflects the sample size available to estimate that group’s variance. The result is not necessarily an integer; it is the effective value supplied to the Welch procedure.

Worked Example: A Small, Highly Variable Group

Consider hypothetical samples with \(n_1=8\), \(s_1=2\) milligrams and \(n_2=20\), \(s_2=8\) milligrams. Find the degrees of freedom and identify which group contributes more to the estimated variance.

The contributions are:

$$ a_1=\frac{2^2}{8}=0.5\text{ mg}^2, \qquad a_2=\frac{8^2}{20}=3.2\text{ mg}^2. $$

The second group contributes much more, despite having the larger sample. Apply the formula:

$$ df=\frac{(0.5+3.2)^2}{\frac{0.5^2}{7}+\frac{3.2^2}{19}} =\frac{13.69}{\frac{0.25}{7}+\frac{10.24}{19}} =\frac{13.69}{0.5746617} \approx 23.8227. $$

The approximate degrees of freedom are \(23.82\). The more variable group has the larger variance contribution and so has substantial influence on the uncertainty represented in the formula. The calculation does not simply average \(n_1-1\) and \(n_2-1\), nor does it use the total sample size alone.

How Sample Sizes and Variances Affect the Result

Each group’s influence is determined by \(s_i^2/n_i\), not by sample size or standard deviation considered in isolation. A larger sample size reduces a group’s contribution when its variance is held fixed. A larger sample variance increases that contribution. The denominator then scales each squared contribution by \(n_i-1\), accounting for the precision of that sample variance estimate.

For a closer look at these effects, compare two hypothetical pairs of groups of equal size. With \(n_1=n_2=12\) and \(s_1=s_2=4\) units, the contributions are both \(16/12=4/3\) units squared. The calculation gives:

$$ df= \frac{(4/3+4/3)^2}{\frac{(4/3)^2}{11}+\frac{(4/3)^2}{11}} =22. $$

Here the two samples have equal variances and equal sizes, and the result is \(n_1+n_2-2=22\). If the sample standard deviations instead are \(s_1=3\) and \(s_2=5\), while both sample sizes remain 12, the contributions become \(9/12=0.75\) and \(25/12\approx2.083333\). Then:

$$ df= \frac{(0.75+25/12)^2}{\frac{0.75^2}{11}+\frac{(25/12)^2}{11}} = \frac{(17/6)^2}{353/792} = \frac{6358}{353} \approx18.0113. $$

Unequal sample variances have reduced the effective degrees of freedom even though the sample sizes are unchanged. In particular, the group with the larger variance now contributes more to the estimated variance. This illustrates why the formula responds to both groups’ sample sizes and variances.

Interpreting a Fractional Result

Degrees of freedom are often introduced as counts, so a value such as \(18.01\) can seem strange. In this setting, it is an approximation parameter for a reference distribution, not a claim that the data contain a fractional number of independent observations. The unequal contributions from the two sample variances do not generally match the pattern of one simple integer-count variance estimate.

Statistical software can use a non-integer \(df\) directly. If a table only lists integer degrees of freedom, a user may need to use a suitable conservative table entry, but the Welch–Satterthwaite result itself should not be arbitrarily rounded before it is used. In reporting, give the value to a sensible precision, such as \(df\approx22.99\), and keep the interpretation tied to the Welch procedure.

Common Mistakes

  • Using \(s_i/n_i\) rather than \(s_i^2/n_i\). The formula uses variance contributions. Square each sample standard deviation before dividing by its sample size.
  • Forgetting to square the contributions in the denominator. Each denominator term is \((s_i^2/n_i)^2/(n_i-1)\), not simply \((s_i^2/n_i)/(n_i-1)\).
  • Using the pooled degrees of freedom automatically. The value \(n_1+n_2-2\) applies to a different, equal-variance approach. Welch’s degrees of freedom depend on both sample variances as well as both sample sizes.
  • Rounding intermediate values too early. Retain adequate precision for the contributions, their squares, and their sum; round the final result. If a displayed rounded value is squared, the reported square must agree with that displayed value.
  • Treating a fractional value as an error. A non-integer is expected because this is an approximate effective degrees of freedom, not a literal observation count.
Key takeaway: Welch–Satterthwaite degrees of freedom summarize how the two sample variance estimates contribute to the uncertainty of a difference between independent means. Calculate each \(s_i^2/n_i\), apply the full formula, and retain the resulting possibly fractional value.

Check Your Understanding

Answer each question by referring to the formula and the role of each group’s contribution.

  1. In the Welch–Satterthwaite formula, what does \(s_i^2/n_i\) represent?
  2. Why can two comparisons with the same \(n_1\) and \(n_2\) have different Welch–Satterthwaite degrees of freedom?
  3. For \(n_1=10\), \(s_1=3\), \(n_2=14\), and \(s_2=5\), calculate the two variance contributions before proceeding to the degrees-of-freedom formula.
  4. Why does the moment-matching derivation lead to an approximation rather than an exact degrees-of-freedom count?
  5. A student obtains a fractional value for \(df\) and rounds it to the nearest integer before entering it into software. What is the better practice, and why?