Degree of freedom is a mathematical equation that is used by statistics for years. It can also be used on other parts of study like physics, chemistry, mechanics etc. the main objective of finding degrees of freedom is to check either results are significant or not.

It can be taken as the values that remains even after the final calculation in statistics and expected to vary. It is used to check the validity of chi-square tests, t-test and more advanced concepts too. In brief, the degree of freedom generally refers to total number of independent observations for a given sample minus the total number of population parameters that could be estimated from the given data.

It will give you a complete idea of how may values are involved in calculations and which have the freedom to vary. Take an example, where a drug trial is performed on a group of patients and it was concluded that patients consuming drugs having higher heart rates as compared to other patients who are not taking drugs.

Now a test would be performed to check either the difference in hear rates is significant or not and degrees of freedom are the part of calculation here.The formula to calculate the degree of freedom in mathematics is quite easier and looks like this as given below –

#### One Sample T Test Formula

\[\LARGE DF=n-1\]

**Two Sample T Test Formula**

\[\LARGE DF=n_{1}+n_{2}-2\]

**Simple Linear Regression Formula**

\[\LARGE DF=n-2\]

**Chi Square Goodness of Fit Test Formula**

\[\LARGE DF=k-1\]

**Chi Square Test for Homogeneity Formula**

\[\LARGE DF=(r-1)(c-1)\]

Here, DF means degree of freedom and N is the total number of values in a data set or it can be taken as the sample size too.