Degrees of Freedom (original) (raw)

Last Updated : 25 May, 2026

Degrees of Freedom (DOF) are the number of independent values in a data set that are free to vary while satisfying a given condition or constraint.

DOF

The following points help to understand Degrees of Freedom more easily:

degrees_of_freedom

**Example: Total Marks Constraint

Suppose five students together scored a total of 250 marks.

You can freely choose the marks of the first four students. For example, their marks may be:

40, 55, 60, and 45

After choosing these four values, the marks of the fifth student are automatically fixed. To make the total equal to 250, the fifth student must score 50 marks.

This means:

Therefore, only four values are independent.

Degrees of Freedom (DOF) = 5 − 1 = 4.

Degrees of freedom and hypothesis testing

Degrees of freedom help determine the critical value used in hypothesis testing. Different values of degrees of freedom change the shape of probability distributions such as the t-distribution and chi-square distribution.

Student’s t-Distribution

In a t-test, the calculated t-value is compared with a critical value from the Student’s t-distribution. The shape of this distribution depends on the degrees of freedom.

t

Chi-Square Distribution

In a chi-square test, the calculated chi-square value is compared with a critical value from the chi-square distribution. The shape of this distribution also depends on the degrees of freedom (df).

degrees_of_freedom3

**The following table shows the formulas used to calculate Degrees of Freedom for some commonly used statistical tests:

Test Formula Notes
One-sample t-test df = n − 1 n represents the total number of observations in the sample
Independent samples t-test df = n₁ + n₂ − 2 n₁ and n₂ represent the sample sizes of the two groups
Dependent samples t-test df = n − 1 n represents the total number of paired observations
Simple linear regression df = n − 2 Two degrees of freedom are used for estimating the regression parameters
Chi-square goodness of fit test df = k − 1 k represents the total number of categories or groups
Chi-square test of independence df = (r − 1) × (c − 1) r represents the number of rows and c represents the number of columns in the contingency table
One-way ANOVA Between-group df = k − 1 Within-group df = N − k Total df = N − 1 k represents the number of groups, and N represents the total number of observations

Degrees of Freedom in Mechanics

In mechanics, Degrees of Freedom (DOF) describe the number of independent directions in which an object can move. A moving object can have different types of motion,n such as left-right, up-down, and forward-backwards movement. Each independent movement represents one degree of freedom.

Therefore, an object moving freely in three-dimensional space has three degrees of freedom.

degrees_of_freedom1

**For example, a helicopter moving through space can move:

So, it has 3 degrees of freedom for motion.

On the other hand, an elevator can move only up and down because it is restricted by the elevator shaft. Therefore, it has only 1 degree of freedom.

If there are two elevators moving independently, the system has 2 degrees of freedom because each elevator can move separately.

Solved Examples

**Example 1: Determine the degrees of Freedom for the given set of data.

Data: 5, 7, 4, 6, 10, 12

**Solution:

Number of Values, n = 6

Degree of Freedom = n-1

= 6 - 1

= 5

**Example 2: Evaluate the Degree of Freedom for the given set of observations.

Observations: 1, 7, 5, 12, 17, 18, 19, 25

**Solution:

Number of Values, n = 8

Degree of Freedom = n - 1

= 8 - 1

= 7

**Example 3: Evaluate the degrees of Freedom for the given set of observations.

Observation 1: 1, 7, 5, 12, 17, 18, 19, 25

Observation 2: 14, 15, 21, 29, 10

**Solution:

Degree of Freedom = n1 + n2 - 2

= 8 + 5 - 2

= 11

**Example 4: Evaluate the Degree of Freedom for the given set of observations.

Observation 1: 1, 6, 5, 13, 17

Observation 2: 12, 11, 26

**Solution:

Degree of Freedom = n1 + n2 - 2

= 5 + 3 - 2

= 6