The degrees of freedom are equal to the number of independent observations {N),or the number of

subjects in the data, minus the number of parameters (k) estimated.

For example, a teacher records marks of N number of students from a class. Here he or she has N

independent pieces of information (that is, N points of marks) and one variable called marks; in subsequent analysis of this data set, degrees of freedom are associated with both N and k. For instance, if this teacher wants to calculate sample variance to understand the extent to which marks vary in this class, the degrees of freedom equal N – k.