Degrees of freedom are an abstract mathematical notion used in some statistical calculations. While calculating and using degrees of freedom in statistics is extremely simple, this notion is difficult to grasp for non experts. However you do NOT need to fully understand the underlying meaning of this concept in order to use it:
What does the number of degrees of freedom mean? Simply put, it's the rank of a quadratic form. Practically speaking, this number is used to estimate variability. If a sample contains n values, these values can be used to estimate either parameters or variability. In general, each item being estimated costs one degree of freedom. The remaining degrees of freedom are used to estimate variability. If you calculate the mean of one sample, that's one item being estimated, which leaves you with n-1 degrees of freedom. If you compare the means of two samples with n1 and n2 values, that's two items being evaluated, which leaves you with (n1+n2)-2 degrees of freedom.
- For one set of data, with n number of values: df = n - 1
- For two sets of data, with n1 and n2 numbers of values: df = (n1 + n2) - 2
What does the number of degrees of freedom mean? Simply put, it's the rank of a quadratic form. Practically speaking, this number is used to estimate variability. If a sample contains n values, these values can be used to estimate either parameters or variability. In general, each item being estimated costs one degree of freedom. The remaining degrees of freedom are used to estimate variability. If you calculate the mean of one sample, that's one item being estimated, which leaves you with n-1 degrees of freedom. If you compare the means of two samples with n1 and n2 values, that's two items being evaluated, which leaves you with (n1+n2)-2 degrees of freedom.