Definition
Categorical variable
A categorical variable is a feature whose possible values are category labels.
Continue from this idea into connected AXIO math.
The variable is the question; the categories are its allowed answers.
Boundary: “Number of pets” is numerical because 0, 1, and 2 are amounts; “pet type” is categorical because dog and cat are labels.
What it means
A variable is the feature being recorded. If the feature is “travel method,” its possible values might be walk, bus, or car, so it is categorical. The collected values are categorical data; the variable is the question or table heading that produced them.
Remember it
The variable is the question; the categories are its allowed answers.
Example
In a class table, the column heading “pet type” is a categorical variable. Values such as dog, fish, none, and cat are category labels recorded for different learners.
Watch for
“Number of pets” is numerical because 0, 1, and 2 are amounts; “pet type” is categorical because dog and cat are labels.
Common mix-up
The categorical variable is the feature being recorded; categorical data is the set of values collected for it.
Exact meaning
A categorical variable is a variable whose possible values are category labels, such as types, names, or ordered levels, rather than measured amounts.