Nominal, Ordinal, Interval & Ratio
Press Next → or use ← → arrow keys
The Intuition — Four Columns, One Question
You can average the weights and it means something. You cannot average the regions. Satisfaction and temperature sit somewhere in between. That spectrum — from "labels only" to "fully numeric" — is exactly what the four data types describe.
A variable's type determines which operations are mathematically valid. Run the wrong statistic on the wrong type and you get a number that looks authoritative but means nothing — the single most common beginner mistake in statistics.
The Hierarchy — Each Level Adds One Power
Stevens (1946) ranked measurement into four levels, each inheriting everything below and gaining one new power: identity (can label) → order (can rank) → equal gaps (can subtract) → true zero (can divide). The higher you climb, the more statistics unlock.
Nominal — Names, Nothing More
Encoding gender as Male=1, Female=2, Other=3 doesn't make it numeric — the codes are still names. The "average" (1+2)/2 = 1.5 doesn't mean "halfway between Male and Female"; it means nothing. This is exactly why nominal features get one-hot encoded, not treated as quantities, before machine learning.
Ordinal — Ranked, But Gaps Aren't Equal
Ten customers: five gave 1 star, five gave 5. The "average" is 3.0 — "neutral" — yet nobody felt neutral; the room is split love/hate. The mean invented a middle that doesn't exist. For ordinal data, report the median and the full distribution, never the mean, because the gap from 1→2 stars isn't guaranteed to equal the gap from 4→5.
Interval — Equal Gaps, But No True Zero
The gap from 10°C to 20°C equals the gap from 20°C to 30°C — so differences are valid. But ratios aren't: 20°C is not "twice as hot" as 10°C, because 0°C doesn't mean "no heat." Move the same temperatures to Fahrenheit and the ratio changes — proof that zero here is just a convention.
Ratio — The Full Toolkit
A 12 kg parcel really is twice as heavy as a 6 kg one, because 0 kg means no weight at all. That true zero unlocks multiplication and division — the reason ratio is the richest level, where every statistic is fair game.
Interval vs Ratio — The True-Zero Test
Ask: does zero mean "none of this thing exists"? 0 kg = no weight, and values can't go negative → ratio. 0°C is just a cold day (it can drop to −10°C) → interval. If zero is a true floor meaning absence, ratios like "twice as much" are valid; if it's arbitrary, they're not.
The Three-Question Decision Flow
Ordered? No → nominal. Equal numeric gaps? No → ordinal. True zero? No → interval, Yes → ratio. Run any column through these three questions and you'll always land on the right type — and therefore the right statistics.
What's Valid At Each Level
| Type | Order | + / − | × / ÷ | Centre | Valid stats |
|---|---|---|---|---|---|
| Nominal | ✗ | ✗ | ✗ | Mode | Counts, %, chi-square |
| Ordinal | ✓ | ✗ | ✗ | Median | Percentiles, IQR |
| Interval | ✓ | ✓ | ✗ | Mean | Std dev, correlation |
| Ratio | ✓ | ✓ | ✓ | Mean (+ geo) | Everything |
Notice the "centre" column: mode works everywhere, the median needs order, and the mean needs equal gaps. Each rung up the ladder unlocks a stronger summary — but never borrow a statistic from a rung above your data.
Three Mistakes That Look Fine But Aren't
| ❌ The Mistake | Why It's Wrong | ✅ Do Instead |
|---|---|---|
| Averaging a Likert / star scale | Gaps between ranks aren't equal | Median + full distribution |
| Treating coded categories as numbers | Codes are labels, not quantities | One-hot encode nominal |
| Saying "20°C is twice 10°C" | Interval has no true zero | Compare differences, not ratios |
Each of these produces a clean-looking number — "3.0 average satisfaction," "gender = 1.5," "twice as hot." They feel rigorous, which is precisely why they slip into reports and models undetected. The type check is what catches them before they mislead a decision.
Type Decides How You Feed A Model
Label-encode a nominal column (Red=1, Blue=2, Green=3) and a linear model will believe Green > Blue > Red — a fake ordering that quietly corrupts predictions. Identifying the data type first is what tells you which encoder is safe.
Six Rules For Data Types
You Can Now Type Any Variable
Stevens' four levels — nominal, ordinal, interval, ratio — form a ladder where each rung adds one power: identity, order, equal gaps, true zero. That level decides which statistics are legal, which chart to draw, and how to encode the feature for a model. Type first, everything else second.
With types nailed down, revisit mean, median & mode and variance knowing exactly when each applies, and move on to data visualization — where the type also decides whether you reach for a bar chart, box plot, or histogram.
🏷️ End of tutorial · Press ← to review, or click Restart