In addition to the types of variables, there also several ways to classify variables. Two ways to classify variables is experimental and mathematical.
Experimental classification is used to classify variables by the function they serve in the experiment. In experimental research, we have independent and dependent variables. Independent variables are variables that are controlled by the researcher and are believed to have an effect on the dependent variable. Dependent variables are affected by the independent variables.
For example, let’s say we want to see how sleep affects GPA. We would manipulate the amount of sleep a person gets, which is the independent variable to see how their GPA changes as GPA is the dependent variable influenced by sleep.
The second type of classification is mathematical. A continuous variable is can assume an infinite number of values. An example would be weight or height.
A discrete variable consists of a finite number of values. Examples include gender and the number of computers. You can’t be half a gender you are a man or woman.
What type of variable to use depends again on the research questions of the study.