Dulranga's Notes
Semester 3MathematicsApplied Statistics

Degrees of Freedom

Degrees of freedom count how many independent pieces of information about the spread you have left after you've used the data to estimate the somethings.

The tt statistic has an estimate of σ\sigma in the denominator. The DoFDoF is just the "amount of information" behind that estimate. More DoFDoF means a more reliable estimate and a tt curve closer to the normal.

Intuition

Take 3 numbers whose sample mean is 5. You can choose the first two freely, say 4 and 9, but the third is forced to be 2, because the deviations from xˉ\bar{x} must add to zero:

∑(xi−xˉ)=0\sum (x_i - \bar{x}) = 0

So 3 numbers give only 2 free deviations. You used up one piece of information to estimate μ\mu with xˉ\bar{x}, and s2s^2 is built from what's left, which is n−1n−1 pieces.

df=(number of observations)−(number of parameters estimated for the means)df = (\text{number of observations}) - (\text{number of parameters estimated for the means})

Difference of means

If the statistic we test is a difference of mean, xˉ1−xˉ2\bar{x}_1 - \bar{x}_2

Then the degree of freedom changes, since there are two things that we can independently choose and some are fixed.

You have two groups, and each has its own mean to estimate:

  • n1n_1​ values, minus 1 for xˉ1\bar{x}_1​, leaves n1−1n_1 - 1 free deviations.
  • n2n_2​ values, minus 1 for xˉ2\bar{x}_2 ​, leaves n2−1n_2 - 1 free deviations.
df=(n1−1)+(n2−1)=n1+n2−2df = (n_1 - 1) + (n_2 - 1) = n_1 + n_2 - 2
SituationObservationsMeans/parameters estimateddfdf
One meannn1 (μ\mu)n−1n-1
Simple regressionnn2 (intercept α^\hat{\alpha} and slope β^\hat{\beta})n−2n-2
Two means, pooledn1+n2n_1+n_22 (μ1\mu_1 and μ2\mu_2)n1+n2−2n_1+n_2-2

On this page