Data variables
A numerical variable records amounts, while a categorical variable records category membership.
On this page 7 sections
01A variable records a characteristic of each observation#
A variable records a characteristic of each observation. A numerical variable records an amount, such as a count or a duration. A categorical variable records a label, such as a region.
The number could mean “busy” in a status code or three milliseconds of elapsed time. The meaning determines the variable’s class.
Meaning: number of waiting jobs. Stored: 5. Classify.
Show answer and explanation
It counts waiting jobs.
02Read a field’s definition#
Read a field’s definition. A code can use digits without measuring an amount. A duration written as “five seconds” still describes a numerical measurement.
Dictionary: zone=code for region; seconds=duration. Classify zone.
Show answer and explanation
Zone labels a region.
03Categories may have an order, such as low and high priority#
Categories may have an order, such as low and high priority. Numbering those labels does not by itself turn the gaps between them into measured amounts.
Meaning: category identifier. Stored: 42. “Digits mean numerical.” Repair.
Show answer and explanation
42 is a label.
Read what the variable represents. Counts and measurements are numerical; category labels remain categorical even when encoded with digits.
- Classify a variable from its meaning.
Sources & further reading
- [1]
- [2]