Explanatory variable

By Jude Wallis · Published

An explanatory variable is the one whose values are used to explain or predict the response variable; it goes on the x-axis of a scatterplot.

The explanatory variable is the one whose values you use to explain or predict the other. It is also called the independent variable or the predictor, and in an experiment it is the factor whose levels define the treatments. It supplies the xx values, sits on the horizontal axis, and is the variable a regression conditions on. The label names a role you assign, not a property the variable carries around: the same measurement can be explanatory in one study and the response in another.

Four people sleep 5, 6, 7 and 8 hours and post reaction times of 320, 300, 290 and 270 milliseconds. Treat sleep as explanatory and the least-squares slope is 16-16 milliseconds per extra hour. Now ask the reverse question, predicting sleep from reaction time, and the slope is about 0.0615-0.0615 hours per millisecond, which is not 1/(16)=0.06251/(-16) = -0.0625. Swapping the roles fits a different line to the identical four points, so the choice is doing real work.

The wrong sentence is "sleep is the explanatory variable, so sleep causes the faster reactions." Calling a variable explanatory records which question you are asking. It is a claim about the analysis, not about the world. Those four people chose their own bedtimes, so anything travelling with sleep, such as age, caffeine or shift work, explains the same pattern equally well; see confounding variable.

Causal language becomes available when the researcher sets the explanatory variable and assigns its values at random, because random assignment is what makes the groups comparable on everything else. That is an experiment, topic 1.13. It also means the explanatory variable is often categorical rather than numerical: which of three fertilizers a plot received is an explanatory variable with no scale at all, and the comparison is between group means rather than along a line.

Scatterplots of two quantitative variables put the explanatory variable on the horizontal axis, topic 5.1. For the two roles set out side by side, see explanatory vs response variable.

Where this comes up

17 pages on the site use this term.

More variables and data types terms, or browse the full statistics glossary.