Skip to Main Content

Introduction to Data Analysis and R: Variable Types

Variable Types

After identifying both sets of your null and alternate hypotheses, the next step is to identify your variables and determine their type. 

Variables fall into three main categories: measurement variables, nominal variables, and ranked variables. (n.b., other names exist for each of these and you may encounter other classification schema, but the theory behind it generally will not change).

Measurement variables

As the name suggests, measurement variables encompass anything you can measure. Some examples would be length, mass, and temperature. Each data point for this type of variable will always be a number, but be careful, because the reverse is not necessarily true. It's sort of like the saying, "All thumbs are fingers, but not all fingers are thumbs." All measurement variables are numbers, but not all numbers are measurement variables. To add another layer of potential confusion, some things that would normally be considered measurement variables can be treated as nominal variables in certain cases. See the reading below for an explanation and some examples.

Nominal variables

Nominal variables encompass things that can be assigned to nameable, mutually exclusive categories. Some examples are sex (male, female), color (red, white, blue), and species (Cyanocitta cristata, Cyanocitta stelleri). If your individual data point can be expressed as a word, it's likely a nominal variable. 

Ranked variables

Ranked variables are similar to nominal variables in that they are discrete and categorical. The difference is that ranked variables add an element of order to the categories. If your individual data points are meant to be put in order from first to last, or smallest to largest, or something similar, you are using a ranked variable. Ranked variables can be broken down even further into interval variables (in which the different values are evenly spaced) and ordinal variables (in which the different values are not evenly spaced). Ranked variables are not encountered as often as the other types (and we won't discuss them beyond this page), but are important to know about because they feature prominently in non-parametric statistical analyses (which are outside the scope of this module).


Supplemental Reading