Statistics Definitions > Variable
The word “variable” means a changing quantity. In math, it could be:
- A quantity that could be any of a set of values. Or,
- A symbol representing that quantity (like x or y).
If a number isn’t a variable, it’s a constant.
Common Variable Types in Statistics
In statistics, you’ll be using many different kinds of variables. They’re still “unknowns” but each different type has very specific characteristics. I’ve outlined the most common variable types here, but for a full list you’ll want to visit the Types of Variables page.
The independent variable is changed by you, or the researcher. A solid research project or test only has one of these. For example, you might be investigating how changes in faucet size affect the amount of water flow. The faucet size is your independent variable; you have no control over the amount of water flowing. The amount of water flowing depends on the size of the faucet. Your job as a researcher or scientist is to see how changes in your independent affects the dependent.
A dependent variable is one that depends on the independent variable. You have no control on these; You only have control over the independent variable. When you run an experiment, you monitor changes in the dependent variable. In the water flow example, you would monitor the amount of water coming out of the faucet.
Another name for the independent variable.
A control variable is held constant so that you can assess the relationship between two other variables. For example, if you are switching water faucet sizes to find out how that changes how much water comes out, you must make sure the water pressure is the same throughout the experiment. The water pressure in that case would be the control.
A categorical variable is a little different from other types of variables you may have come across in math. It fits into a category and does not have a numerical value associated with it. For example, if the category is college majors, some categoricals are: English, Math, Political Science and Art History. Also called a qualitative variable.
Quantitative variables are just another name for numeric variables. For example, the “x” in 5x – 2 would be quantitative. Peoples’ heights, weights and IQ scores are also examples of quantitative variables. If you can perform a mathematical function on it (like multiplication), it’s this type of variable. Also called a numerical variable.
A discrete variable is also just another way of saying “variable.” They’re the variables you’re probably used to in algebra: variables like 1, 99 or 1,000. However, discrete variables must be in a finite set. You can think of a finite set as something that can be counted (and totaled), like money in your bank account or the number of household items you own. If you can make a list, it’s discrete. You have a set number of items (a finite number) in your house and you have a set amount of money in your bank account. You can list them both, so they are discrete. Note: You might hope that there’s an infinite amount of money in your bank account but in real life, that isn’t a possibility!
Continuous variables are the opposite of discrete ones. They are infinite. While you can count money in your bank account in a finite amount of time, you can’t count things like time or weight. Why not? Because there’s an infinite amount of possibilities. Think about it: if you tried to count time, you might start at 1s, 2s, 3s…but where would you stop? A million seconds? A billion? Thirty nine trillion? You could go on and on and on…so that’s continuous.
A random variable is used is modeling probabilities. For example, an insurance company might use these for driving habits, to predict what their risk is of insuring you. Random variables can be discrete, or they can be continuous. While lowercase letters like x or y are used for regular variables, capital letters like X are used to denote random ones. A binomial random variable is a type used in binomial probability distributions. These types of variables have two outcomes — true, or false.
What is a Variable…Really?
Why not just call it an unknown? Well, mathematicians don’t like to make things easy. A variable in algebra is not the same thing as a variable in statistics, and a variable in statistics could have one of many meanings.
In algebra, a variable is just a letter representing a number. In statistics, it means…well, it’s meaning depends upon what type of variable you have (see the above list).
According to this website,
the term…was introduced by Gottfried Wilhelm Leibniz (1646-1716) (Kline, page 340). [It] is found in English as an adjective in 1710 in Lexicon Technicum by J. Harris: “Variable Quantities, in Fluxions, are such as are supposed to be continually increasing or decreasing; and so do by the motion of their said Increase or Decrease Generate Lines, Areas or Solidities” (OED2). [It] is found in English as a noun in 1816 in a translation of Lacroix’s Differential and Integral Calculus: “The limit of the ratio..will be obtained by dividing the differential of the function by that of the variable” (OED2).
In other words, the word was already taking on more than one meaning a couple of hundred years ago. Back in those days, there wasn’t the internet or collaborative learning. In fact, many mathematicians didn’t even talk to each other (hey, we’re known for being an antisocial bunch). Take the case of Liebnitz and Newton’s calculus controversy. An entire subset of math was invented by two men and the same time in different countries without either one talking to each other. So we shouldn’t be surprised that one word has taken on so many different meanings.
What is a Variable….Really?
If it isn’t bad enough that math involves arithmetic (I appreciated the advent of the graphing calculator!), mathematicians have also taken it upon themselves to give us a word like “variable” that is hard to define and means something different according to what branch of math you are dealing with and what situation you’re using the word in. To put it another way, a variable means nothing unless you have a context for it.
Imagine someone wondering what an “egg” is in biology. An egg is an egg, no matter where you put it. Google defines an egg as “…an oval or round object laid by a female bird, reptile, fish, or invertebrate, usually containing a developing embryo.” Now imagine that this meaning only applies in a subset of biology, say, anatomy. An egg in cryology, developmental biology or genetics might be called something else (perhaps eggos, eggles and egarios). Now imagine that the word “egg” is used in all of those subsets of biology to mean something different. An egg in cryology might be a freezing tank. An egg in developmental biology means a worm-like structure in a cell. An egg in genetics is a gene that’s been passed on for at least four generations. Sound confusing? Welcome to the concept of What is a Variable? And welcome to the confusing and confuddling world of mathematics.
P.S. That’s why I made this site…to help other people make sense of this confusion.------------------------------------------------------------------------------
If you prefer an online interactive environment to learn R and statistics, this free R Tutorial by Datacamp is a great way to get started. If you're are somewhat comfortable with R and are interested in going deeper into Statistics, try this Statistics with R track.Comments are now closed for this post. Need to post a correction? Please post a comment on our Facebook page.