Skip to content

Categorical Variable

  • Data whose values fall into distinct groups (categories) rather than on a numerical scale.
  • Common in survey and marketing research to classify attributes like gender, race, or political affiliation.
  • Can be binary (two categories) or ordinal (categories with a natural order); categories are not suitable for arithmetic operations.

A categorical variable is a type of data that can be divided into distinct categories or groups. This variable is used to classify and analyze data based on specific characteristics or attributes.

Categorical variables group observations into non‑numeric categories rather than measuring them on a continuous numerical scale. They are frequently used in survey research and marketing research to capture attributes such as preferences and behaviors. Categories do not have inherent numerical meaning, so categorical variables cannot be used in mathematical operations like addition or subtraction. Categorical variables may be:

  • Binary: having only two categories (e.g., smoker vs. non‑smoker).
  • Ordinal: having categories with a natural ordering (e.g., a customer satisfaction rating from 1 to 5).
  • Nominal: having categories without a natural order (e.g., gender, race, religion, political affiliation, educational level).
  • Gender: male, female, or other.
  • Race: white, black, Hispanic.
  • Religion: Buddhist.
  • Political affiliation: Republican, Democrat.
  • Educational level: high school graduate.
  • Smoker vs. non-smoker.
  • Customer satisfaction rated on a scale from 1 to 5.
  • Survey research for classifying respondent attributes.
  • Marketing research for understanding customer preferences and behaviors.
  • Categories lack numerical meaning and therefore cannot be added, subtracted, or otherwise directly used in arithmetic operations.
  • Ordinal categorical variables have a natural ordering that can be used in analysis, unlike nominal categories.
  • Binary categorical variable
  • Ordinal categorical variable
  • Nominal categorical variable
  • Numerical / continuous variable