Degrees of freedom refers to the maximum number of values that have the freedom to vary in a data sample.
It is used in many contexts throughout statistics including hypothesis tests, probability distributions, and regression analysis.
Formula to calculate degrees of freedom.
![Calculate Degrees of Freedom.](https://www.learntocalculate.com/wp-content/uploads/2021/01/degrees-of-freedom.png)
N is the number of values in a data set.
Example:
Calculate the degrees of freedom of the following data set.
19, 17, 16, 14, 12.
![Calculate Degrees of Freedom.](https://www.learntocalculate.com/wp-content/uploads/2021/01/degrees-of-freedom-2.png)
Therefore, four numbers has the freedom to vary as long as the mean remains the same.