In a science experiment, a **variable** is any factor, attribute, or value that describes an object or situation and is subject to change. An experiment uses the scientific method to test a hypothesis and establish whether or not there is a cause and effect relationship between two variables: the independent and dependent variables. But, there are other important types of variables, too, including controlled and confounding variables. Here’s what you need to know, with examples.

### The Three Main Types of Variables – Independent, Dependent, and Controlled

An experiment examines whether or not there is a relationship between the independent and dependent variables. The **independent variable** is the one factor a researcher intentionally changes or manipulates. The **dependent variable** is the factor that is measured, to see how it responds to the independent variable.

For example, consider an experiment looking to see whether taking caffeine affects how many words you remember from a list. The independent variable is the amount of caffeine you take, while the dependent variable is how many words you remember.

But, there are lot more potential variables you control (and usually measure and record) so you get the truest results from the experiment. The controlled variables are factors you hold steady so they don’t affect the results. In this experiment, examples include the amount and source of the caffeine (coffee? tea? caffeine tablets?), the time between taking the caffeine and recalling the words, the number and order of words on the list, the temperature of the room, and anything else you think might matter. Observing and recording controlled variables might not seem very important, but if someone goes to repeat your experiment and gets different results, it might turn out that a controlled variable has a bigger effect than you suspected!

### Confounding Variables

A **confounding variable** is a variable that has a hidden effect on the results. Sometimes, once you identify a confounding variable, you can turn it into a controlled variable in a later experiment. In the coffee experiment, examples of confounding variables include a subject’s sensitivity to caffeine and the time of day that you conduct the experiment. Age and initial hydration levels are additional factors that may confound the results.

### Other Types of Variables

Other types of variables get their names from special properties:

**Binary variable**: A binary variable has exactly two states. Examples include on/off and heads/tails.**Categorical or qualitative variable**: A categorical or qualitative variable is one that does not have a numerical value. For example, if you compare the health benefits of walking, riding a bike, or driving a car, the modes of transport are descriptive and not numerical.**Composite variable**: A composite variable is a combination of multiple variable. Researchers use these for improving ease of data reporting. For example, a “good” water quality score includes samples that are low in turbidity, bacteria, heavy metals, and pesticides.**Continuous variable**: A continuous variable has an infinite number of values within a set range. For example, the height of a building ranges anywhere between zero and some maximum. When you measure the value, there is some level of error, often from rounding.**Discrete variable**: In contrast to a continuous variable, a discrete variable has a finite number of exact values. For example, a light is either on or off. The number of people in a room has an exact value (4 and never 3.91).**Latent variable**: A latent variable is one you can’t measure directly. For example, you can’t tell the salt tolerance of a plant, but can infer it by whether leaves appear healthy.**Nominal variable**: A nominal variable is a type of qualitative variable, where the attribute has a name or category instead of a number. For example, colors and brand names are nominal variables.**Numeric or quantitative variable**: This is a variable that has a numerical value. Length and mass are good examples.**Ordinal variable**: An ordinal variable has a ranked value. For example, rating a factor as bad, good, better, or best illustrates an ordinal system.

### References

- Babbie, Earl R. (2009).
*The Practice of Social Research*(12th ed.). Wadsworth Publishing. ISBN 0-495-59841-0. - Creswell, John W. (2018).
*Educational Research: Planning, Conducting, and Evaluating Quantitative and Qualitative Research*(6th ed.). Pearson. ISBN 978-0134519364. - Dodge, Y. (2008). The Concise Encyclopedia of Statistics. Springer Reference. ISBN 978-0397518371.
- Given, Lisa M. (2008).
*The SAGE Encyclopedia of Qualitative Research Methods*. Los Angeles: SAGE Publications. ISBN 978-1-4129-4163-1. - Kuhn, Thomas S. (1961). “The Function of Measurement in Modern Physical Science”.
*Isis*. 52 (2): 161–193 (162). doi:10.1086/349468