Foundations & the Data-Science Workflow
Categorical Variable
A categorical variable places each observation into one of a fixed set of groups or labels, such as blood type (A, B, AB, O) or payment method (cash, card, app). Its values name a category rather than measure an amount.
You summarise a categorical variable by counting how often each category appears, not by averaging — “the average blood type” is meaningless. When the categories have a natural order (like satisfaction levels low, medium, high) it is called ordinal; when they do not (like country) it is called nominal. Computers often need these labels converted into numbers before modelling, a step called encoding.
Also called