system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: what are degrees of freedom and why are they necessary?
gpt
Degrees of freedom is a way to say how many ways something can change. It basically tells you how many unique variables you need to describe something's state.

Consider your elbow: it can bend in one direction, and thus has one degree of freedom. Alternatively, your shoulder can bend in two directions, so it has two degrees of freedom, not accounting for the slight in and out popping it can normally do. Obviously, these are without breaking.

Degrees of freedom do not always talk about movement, however. Your oven can open and close, and get hotter or colder, which are two degrees of freedom. Mathematical models can have hundreds, thousands, or many more degrees of freedom - each unique variable in the equation(s).

When making a study, you want to control for as many variables as you can. To do so, you first need to identify the degrees of freedom. From there, ideally you figure out how to fix all but one to remove them. Often, you cannot completely fix some of them, and so need to figure out other ways to account for the possibility that those variables affect your result.