A variable is a property that can take on many values.
"Age" is a variable. It can take on many different values, such as 18, 49, 72, and so on.
"Gender" is a variable. It can take on two different values, either male or female.
"Place" (in a race) is another variable. It can take on values such as 1st place, 2nd place, 3rd place, and so on.
There are two kinds of variables: Quantitative Variables, and Qualitative/Categorical Variables:
Quantitative Variable |
---|
A quantitative variable is measured numerically. With measurements of quantitative variables you can do things like add and subtract, and multiply and divide, and get a meaningful result. In the previous example, "Age" was a quantitative variable. |
Qualtitative/Categorical variables |
---|
These allow for classification based on some characteristic. With measurements of qualitative/categorical variables you cannot do things like add and subtract, and multiply and divide, and get a meaningful result. In the previous example, "Gender" was a qualitative/categorical variable. Gender was categorized as either male or female. |
There are two further kinds of quantitative variables:
Discrete Variable |
---|
A discrete variable is a quantitative variable with a finite number of values. For example, imagine you rolled a six-sided die four times and measured how many times you rolled an even number. What are your possible outcomes? {0, 1, 2, 3, 4} |
Continuous Variable |
---|
A continuous variable is a quantitative variable with an infinite number of values. Take temperature for example. Temperature can take on an infinite number of values, such as 80 degrees, or 80.01 degrees, or 80.0050592359 degrees. In the previous example we were limited to a finite number of values (you couldn�t roll 1.5 even numbers), which is what made it discrete. |