The Story That Makes It Click
You are a data scientist at a delivery company. Your boss drops four spreadsheets on your desk and says: "Find the average for each of these."
| Spreadsheet | Column | Sample values |
|---|---|---|
| A | Driver region | North, South, East, West, North, East |
| B | Customer satisfaction | Very Happy, Happy, Neutral, Unhappy, Very Happy |
| C | Outside temperature at delivery | −5°C, 0°C, 12°C, 18°C, 25°C |
| D | Package weight | 0.5 kg, 1.2 kg, 4.8 kg, 0.3 kg, 12.0 kg |
You open Python and type df.mean() on all four. Spreadsheet D
gives a sensible answer — 3.76 kg. The rest either error or produce
nonsense. What went wrong?
The mean of North and South is not "East." The average satisfaction between "Very Happy" and "Unhappy" is not necessarily "Neutral." And whether −5°C is "half as cold" as 10°C depends on which scale you use. Data type determines which operations are mathematically valid. Using the wrong statistic on the wrong data type produces numbers that look precise but mean nothing.
In 1946, psychologist Stanley Stevens published a landmark paper defining four levels of measurement — also called data types — that answer exactly this question: what can you legitimately do with this data?
The Four Types — Overview
The four types form a hierarchy. Each level inherits the properties of all levels below it and adds one more. As you move up the hierarchy, the data becomes more informative and more statistics become valid.
Property added: Identity — values have names that distinguish them.
Property added: Order — values can be ranked meaningfully.
Property added: Equal intervals — the distance between any two adjacent values is the same.
Property added: True zero — zero means complete absence of the quantity.
| Type | Has identity? | Has order? | Equal gaps? | True zero? |
|---|---|---|---|---|
| Nominal | Yes | No | No | No |
| Ordinal | Yes | Yes | No | No |
| Interval | Yes | Yes | Yes | No |
| Ratio | Yes | Yes | Yes | Yes |
Nominal Data — Just Names
Nominal data is the simplest type. Values are labels or categories with no natural order. You can count how many are in each category, but you cannot rank them or do arithmetic.
The story — sorting the post room
A post room worker sorts 200 parcels into four regions: North, South, East, West. She counts: 62 North, 48 South, 55 East, 35 West. The mode is North — the most common destination. That is the only statistic that makes sense here.
If someone asks "what is the average region?" the question is meaningless. If someone asks "is North bigger than South?" they mean count, not value. North is not a bigger number than South — it is just a different label.
- Mode (most common)
- Frequency counts
- Percentages
- Chi-square test
- Mean (no average label)
- Median (no order)
- Standard deviation
- Any arithmetic
- Blood type: A, B, AB, O
- Eye colour
- Programming language
- Country, city, postcode
| Situation | Nominal column | Correct question to ask |
|---|---|---|
| Customer database | Gender | Which gender is most common in our users? |
| Hospital records | Blood type | What percentage of patients are blood type O? |
| E-commerce orders | Payment method | Is credit card or PayPal used more often? |
| Job applications | Degree subject | What is the most common degree among applicants? |
| App analytics | Device type | What share of users are on iOS vs Android? |
Many datasets encode nominal categories as integers — 1 = Male, 2 = Female, 3 = Non-binary, or 1 = North, 2 = South, 3 = East, 4 = West. The numbers are just shorthand labels. The average of (1 + 3) / 2 = 2 does not mean "Female." Always check what encoded numbers represent before applying any arithmetic to them.
Ordinal Data — Order Without Equal Gaps
Ordinal data has a meaningful order — you know which value is higher or lower. But the gaps between values are not necessarily equal. You cannot say the difference between rank 1 and rank 2 is the same as the difference between rank 4 and rank 5.
The story — the restaurant table
Four friends eat at a restaurant and each rates their experience: Alice gives 5 stars, Bob gives 4 stars, Carol gives 2 stars, Dan gives 5 stars. You know Alice enjoyed it more than Carol. You know 5 stars is better than 4 stars. But is the gap between 4 and 5 the same emotional distance as the gap between 1 and 2?
Not necessarily. The jump from "Terrible" to "Bad" might represent far more improvement in experience than the jump from "Good" to "Excellent." The numbers create an illusion of precision that does not really exist. This is why the median, not the mean, is the correct measure of centre for ordinal data.
[5, 5, 5, 5, 5, 1, 1, 1, 1, 1]Five absolutely love it. Five absolutely hate it.
Interpretation: "Average satisfaction — customers are neutral." This is completely wrong. Nobody rated it 3. Nobody is neutral.
[1, 1, 1, 1, 1, 5, 5, 5, 5, 5]Median = average of 5th and 6th values = (1+5)/2 = 3.0
Same number — still misleading. This is why for ordinal data you must always look at the full distribution, not just a single central value.
⭐⭐⭐⭐⭐ = 50% ⭐⭐⭐⭐ = 0% ⭐⭐⭐ = 0% ⭐⭐ = 0% ⭐ = 50%
Bimodal distribution revealed. This product divides opinion completely. That is the real story.
- Mode
- Median
- Percentiles / IQR
- Frequency distribution
- Mean (gaps not equal)
- Standard deviation
- Pearson correlation
- Ratio comparisons
- Star ratings 1–5
- Education level
- Pain scale 1–10
- Likert scale surveys