Four Kinds of Data
A variable is either categorical or quantitative, and its level of measurement decides which summaries are even allowed on it. · 11 min
Statistics begins before any calculation, with a plain question: what did you write down? A variable is a characteristic you record for each subject in a study — a person's height, a city's name, a film's star rating. Every variable falls into one of two families. Some record a category the subject belongs to; some record a quantity you could count or measure. The distinction sounds trivial. It is not: it silently decides which summaries you are allowed to compute later. Averaging is honest for one family and nonsense for the other.
Guess before you learn
A spreadsheet lists, for each player: jersey number, height in centimetres, and team colour. For which one does computing an average make honest sense?
Only height. Jersey number is a label that happens to be printed as a digit, and colour is a category with no numeric order at all. If you were tempted by all three, keep that pencil mark — mistaking a code for a quantity is the single most common data error, and this folio is built to prevent it.
9–12
3–5
Every fact you collect answers one of two questions. Which kind? gives a category — your pet is a cat, your shirt is green. How much, or how many, gives a number — your age is 9, you have 4 pencils.
Categories can be put in order — small, medium, large drinks line up. But you cannot average them: no drink sits exactly halfway between small and large. Numbers you can add and average; categories you can only count and sort.
6–8
A categorical variable places each subject in a group — eye colour, country, yes-or-no. A quantitative variable records an amount you could measure or count — age, temperature, number of siblings. One more split matters inside categories: some have a natural order (small, medium, large) and some do not (red, blue, green).
That ordering question is the start of a finer idea: a variable's level of measurement. It runs from bare labels, through ordered labels, up to full numbers you can add and divide. The higher the level, the more arithmetic the variable honestly allows.
9–12
Statisticians grade a variable on four levels of measurement, each permitting more arithmetic than the last. Nominal: unordered labels — species, ZIP code, colour. Ordinal: labels with a rank but undefined spacing — letter grades, ratings from poor to excellent. Interval: numbers with equal gaps but an arbitrary zero — Celsius, calendar year. Ratio: numbers with a true zero, so ratios mean something — height, weight, count, income.
The level is not decoration; it is a permission slip. Nominal data admits only counts and a mode. Ordinal adds a median. Interval permits a mean and a standard deviation but not ratios — 20°C is not twice as warm as 10°C, because zero Celsius is a convention, not an absence of heat. Only ratio data lets you say one value is three times another. Read the level first; it names which summaries are legal.
K–2
Sort a box of buttons two ways. First by colour: red here, blue there. That answer is a name. Then count how many buttons: that answer is a number. Names and numbers are the two kinds.
You can add numbers: three buttons and two buttons make five. You cannot add names: red plus blue is not a colour. That is why some things you count, and some you only sort.
Undergrad
The four-level scheme is due to S. S. Stevens (1946), who defined each level by the transformations that leave its structure intact. Nominal scales are invariant under any relabelling; ordinal under any order-preserving transformation; interval under positive linear maps x ↦ ax + b; ratio only under scaling x ↦ ax. A statistic is meaningful for a scale when its truth survives that scale's admissible transformations.
This is why a mean is meaningless on ordinal data: relabel the ranks 1, 2, 3, 4 as 1, 2, 3, 10 — an order-preserving move the scale allows — and the group with the higher mean can flip. The median, fixed by position, survives. Stevens' hierarchy is a sound first discipline, though Lord's 1953 parable of football numbers warns against treating it as rigid law rather than a prompt to ask what a number means.
Postgrad
Measurement theory formalises this representationally: a scale is a homomorphism from an empirical relational structure — objects with observed relations such as warmer-than or concatenates-to — into a numerical relational structure. The scale type is fixed by its group of admissible transformations, the uniqueness half of a representation-and-uniqueness theorem. Nominal, ordinal, interval, and ratio answer to the permutation, monotonic, affine, and similarity groups.
The payoff is a theory of meaningfulness: a numerical statement is meaningful iff its truth is invariant under the admissible transformations of the scales involved. This subsumes dimensional analysis and grounds the school-level rules. It also marks their limits — many real instruments, from Likert composites to IQ, sit ambiguously between ordinal and interval, and modern practice leans on item-response models rather than adjudicating Stevens' four boxes directly.
level of measurement
How much arithmetic a variable honestly permits, on a ladder of four rungs: nominal (labels), ordinal (ranked labels), interval (equal gaps, no true zero), ratio (a true zero, so ratios mean something).
Naming the level is not bookkeeping for its own sake. It fixes which summary of a whole column is even defined. A summary you are not entitled to compute will still return a number — a calculator never refuses — but that number describes nothing real. So the safe habit runs backward from most people's instinct: decide the level first, and let it hand you the shortlist of legal summaries second.
Why is this true?
A dataset codes blood type as 1, 2, 3, 4. Why is the mean blood type of 2.7 meaningless?
Because the codes are arbitrary name tags: relabel them 1, 5, 6, 9 and the same people yield a different average, though nothing about them changed. A summary that shifts when you merely rename the categories is measuring the code, not the world.
That is the whole discipline of this folio: every column belongs to a family and a level, and the level tells you which tools are honest before you reach for one. Next folio takes the first of those tools — the center of a quantitative variable — and shows how its three versions can quietly disagree.
Note
Unsure whether a column is a code or a count? The Atlas — every subject, by age and field — links back to a short refresher on reading data tables.
Practice — new ink and old, interleaved
1.A form asks for your number of siblings. What is this variable?
2.Match each level to the strongest summary of center it permits.
3.Put these variables in order of measurement level, from lowest to highest.
- Favourite colour
- Hotel star rating
- Year of birth
- Distance run, in metres
4.A streaming app stores each show's genre, its 1–5 star rating, and its runtime in minutes. In one sentence, name the strongest legal measure of center for each.