Control variable

From Wikipedia, the free encyclopedia
Jump to: navigation, search

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[edit]

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.

Examples[edit]

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[edit]

In computer programming, a control variable is a program variable that is used to regulate the flow of control of the program.[1]

Examples[edit]

  • 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.

See also[edit]

For IV-DV experimentation:

For computer programming:

For control theory:

References[edit]

  1. ^ Bubnicki, Zdzislaw (2005). Modern Control Theory. Berlin: Springer Verlag.