How do I identify variables as numeric (quantitative) or categorical (qualitative)?

 


Answer

 A categorical variable is a variable with a set number of groups (gender, colors of the rainbow, brands of cereal), while a numeric variable is generally something that can be measured (height, weight, miles per hour). It is easy to identify categorical variables when the groups are specified with words, because you can’t perform mathematical operations on a word. However, if the variable is represented numerically, it is important to consider the characteristics of the variable instead of automatically assuming it’s numeric.

Here are some criteria to consider:

  1. Do the numbers represent categories? For example, gender is often coded with “0” and “1” in a dataset, but it’s still a categorical variable.

  2. Is there a set number of possible values the variable could take? For example, the variable “number of car doors” will probably only have the values of “2” or “4”. In this case, the variable is categorical.

  3. Is the variable measured on a continuous scale (another way of thinking about this is can it be measured)? Variables like height and weight are good examples of numeric predictors that meet this criterion.

Topics

  • Last Updated Apr 20, 2021
  • Views 12641
  • Answered By Dorian Frampton

FAQ Actions

Was this helpful? 9 4