Identify the type of problem or test
Use the appropriate degrees of freedom formula
For a one-sample t-test, subtract 1 from the sample size: df = n – 1
For an independent two-sample t-test, use df = n1 + n2 – 2
For a paired t-test, use df = number of pairs – 1
For a chi-square goodness-of-fit test, use df = number of categories – 1 – number of estimated parameters
For a chi-square test of independence, use df = (rows – 1)(columns – 1)
For one-way ANOVA, use df between = k – 1 and df within = N – k
For regression, use df for the model and residuals based on the number of predictors and sample size
Substitute the values into the formula
Simplify the result to get the degrees of freedom
