Types of variables
Categorical or quantitative?
In a data set, the individuals are the people or things described, and the variables are what is recorded about each one. A categorical variable puts individuals into groups (favorite color, zip code). A quantitative variable is a number you can sensibly add or average (height, test score).
Example: Zip code
- zip codes are numbers, but averaging them makes no sense — They name places
- categorical — Answer
Why it works: If you can do arithmetic on it in a meaningful way, it is quantitative. If it just names a group, it is categorical, even if it uses digits.
Tip: Ask: would the average mean anything? If not, the variable is categorical, even if it is written with digits.