The number of degrees of freedom is the number of values in the final calculation of a statistic that are free to vary. The number of independent ways by which a dynamic system can move without violating any constraint imposed on it, is called degree of freedom. The degree of freedom can be defined as the minimum number of independent coordinates which can specify the position of the system completely. Estimates of statistical parameters can be based upon different amounts of information or data. The number of independent pieces of information that go into the estimate of a parameter is called the degrees of freedom.
Mathematically, the degrees of freedom are the number of dimensions of the domain of a random vector, or essentially the number of free components: how many components need to be known before the vector is fully determined. The term is often used in the context of linear models. The degrees of freedom are also associated with the squared lengths of such vectors and the parameters of chi-squared and other distributions that arise in associated statistical testing problems.
The common way to think of degrees of freedom is as the number of independent pieces of information available to estimate another piece of information. The number of degrees of freedom is the number of independent observations in a sample of data that are available to estimate a parameter of the population from which that sample is drawn.