Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would have thought that the degrees of freedom would be the same as a regular t-test, i.e. N - 1, since in a contrast we are either comparing two groups, or two sets of groups. Why do we instead use the within SS degrees of freedom (N - k)?

Here are some example SPSS tables from

enter image description here enter image description here

share|improve this question
up vote 3 down vote accepted

Degrees of freedom in these situations are based off the number of degrees of freedom in the error term (to estimate the standard error of the noise term). These are based on residuals, for which $N$ observations have been used to estimate $k$ means, each one costing one degree of freedom.

That means that there are $N-k$ d.f. in the error term which is used for the comparisons in the contrasts.

share|improve this answer

In a regular t-test, you lose one degree of freedom from having to estimate a single mean while estimating $\sigma$. In ANOVA, you lose $k$ degrees of freedom from having to estimate $k$ means while estimating the common $\sigma$. Though you are only comparing two groups in the contrast, you are using the pooled estimate of $\sigma$, which is why you still lose $k$ df.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.