Variables can be defined by the type of data (quantitative or categorical) and by the part of the experiment (independent or dependent).
Variables in science are factors that can be controlled, changed, or measured in experiments. Independent variables are changed in an experiment, while dependent variables are measured or observed.
In research, an independent variable is the factor you deliberately change or control, while a dependent variable is the outcome you measure. Think of it as cause and effect — the independent variable is the cause you manipulate, and the dependent variable is the effect you observe.
A variable is any property, characteristic, number, or quantity that increases or decreases over time or can take on different values (as opposed to constants, such as n, that do not vary) in different situations. When conducting research, experiments often manipulate variables.