Online College Courses for Credit



Author: Jonathan Osters

Define variables and they impact an experiment.

See More

Video Transcription

Download PDF

In this tutorial, you're going to learn about variables. Now, you've probably heard this term variables before. But it doesn't mean something like x or a y like it does in algebra. In statistics, a variable is any attribute that we can measure about the population. And we're going to use them in the study. And it's very important when we create a study that we carefully define the variables that we want measured.

So all of these are things that we could find out about people-- the state they live in, their ethnicity, their zip code, whether or not they smoke. All sorts of things are variables here. Now, depending on what we want to know, we might not need to know all of these things. We might only want to know some of these things. So for instance, if I was doing a political poll, I wouldn't really necessarily need to know if they were a smoker or even the number of times they eat out per week.

I might want to know only the circled ones-- their age, their gender, their state, political affiliations, zip code, ethnicity, and city. Because all of those potentially have some bearing on a political poll, whereas if I was doing some kind of a weight loss study, I might not need political affiliation. But I might want their favorite food. So I might use these variables if I was doing some kind of a weight loss study.

Some studies try to determine a cause-and-effect relationship between two variables in that one variable causes the other. An increase in one corresponds to an increase or decrease in the other. In those cases, we define the one that causes the other as the explanatory variable. And you can have more than one. And variables that are the result are called response variables.

So an example would be the number of hours you study and your grade on the exam. We would hypothesize that the number of hours that you study, as that increases, your grade on the exam will increase as well. So this helps to explain your grade. Another example of explanatory and response variables would be the average monthly temperature and ice cream sales.

We would assume that as the temperatures get warmer, that ice cream sales would go up in kind. Something that's a little bit less obvious is whether or not gender, which is a categorical variable, plays a role in which political party people will choose. Are males more likely to be Republican? Or are women more likely to be independent voters? We don't know. But that would be an interesting question to investigate.

We don't know if gender plays a role in political party. But it would be something worth looking into. So to recap, variables are what we choose to measure in a study. And then the variables of interest to us, those little ones that were circled in green on those previous slides. Those depend on the questions that we're trying to answer. We don't need every measurable thing, just the ones that we're interested in.

And if a cause and effect relationship is thought to exist, we can break the variables even further down into explanatory and response variables. The terms that we used this tutorial are variables, variables of interest, and explanatory and response. Good luck, and we'll see you next time.

Terms to Know
Explanatory Variable

A variable that we believe is predictive of something else. An increase in this variable will correspond to an increase or decrease in some other variable.

Response Variable

A variable that is affected by the explanatory variable.


Any attribute or number that can be measured about individuals in a study.

Variable of Interest

Any variable which we need to know about in the context of a study.