Fundamentals of Statistics contains material of various lectures and courses of H. Lohninger on statistics, data analysis and here for more.

Degrees of Freedom

When calculating a statistical parameter of a data set, it is often necessary to use an intermediary result (e.g. the mean) during the computation. By including such a parameter in the calculation, the number of independent scores is reduced, since the intermediary result is based on all scores.

An example will clarify this: consider the calculation of the variance, which is computed by averaging the squares of the deviations from the mean.

Since the average is computed from all scores , the number of independent in the formula above is reduced by one because you could calculate one particular score by using the mean and all other scores.

Generally speaking, the degrees of freedom (DF) depend on the number of independent observations: the number n of observations less the number of estimated parameters a:

DF = (n - a)