|This article needs additional citations for verification. (January 2013)|
The term control variable has different meanings, depending on the area/place in which it is used. In an experiment, the control variable is something that is constant and unchanged in an experiment. Further, a control variable strongly influences values; it is held constant to test the relative impact of independent variables. In computer programs, a control variable regulates the flow of control. A related term is the controlled variable in control theory, the reference value or setpoint to which a controller makes its input conform.
In an experiment
In any situation in nature, many variables may be interdependent, each affecting the other. In scientific experimentation testing the relationship of an independent variable (IV) to a dependent variable (DV), any additional independent variables are control variables. A control variable must be held constant throughout an experiment because it (in addition to the DV) is also affected by the IV and it (in addition to the IV) also affects the DV being tested. A change in a control variable invalidates the correlation of DV to IV.
In the experimental verification of Boyle's law (P = T / V), where Pressure, Temperature, and Volume are all variables, one of the three variables must be kept constant in order to determine the relationship between the other two.
In testing a product's effects on two plants, control variables include the duration of sunlight, amount of water, temperature, soil type, and the pot shape, among others.
In computer programming
- A loop control variable is used to regulate the number of times the body of a program loop is executed; it is incremented (or decremented when counting down) each time the loop body is executed.
- A single control variable can identify the present state of a computer program.
For IV-DV experimentation:
For computer programming:
For control theory:
- Bubnicki, Zdzislaw (2005). Modern Control Theory. Berlin: Springer Verlag.