Learn
Concept·

Data Types & Measurement Levels

Your spreadsheet will happily average the ZIP code column

Open a spreadsheet and every column looks the same. Numbers are numbers, they line up on the right, and one function gives you a mean. So what happens when you average the ZIP code column?

The mean of 90210 and 10001 is 50105.5. Nothing errors. Nothing is highlighted in red. You get a clean number with a decimal point — and it refers to nothing at all.

Being stored as a number and being safe to calculate with are two completely different things. Two columns can both hold "numbers" and still differ in what they let you claim.

ExampleSame or different?Bigger or smaller?Bigger by how much?How many times bigger?
ZIP code 90210yesnonono
Satisfaction, 1–5yesyesnono
Temperature, 20°Cyesyesyesno
Body weight, 60 kgyesyesyesyes

The top row is the ZIP code you just averaged. Taking a mean is using the "bigger by how much" column — and for ZIP codes that column is closed.

The third row is worth a second look. 20°C is not twice 10°C. Zero degrees Celsius is not "no heat at all"; it is just the temperature at which water freezes, so there is no anchor from which to count multiples. Zero kilograms, by contrast, really is nothing — which is why 60 kg genuinely is twice 30 kg.

Those four rungs are the levels of measurement. Deciding which rung each column sits on, before you touch anything else, is very nearly the whole job of choosing an analysis.

The key question

What am I allowed to say about this number — same? bigger? bigger by how much? how many times bigger?

1

Concept

How much a number is promising you

The first split: qualitative and quantitative

Qualitative data sorts things into groups; quantitative data measures how much of something there is. Blood type and region are qualitative. Height and revenue are quantitative. You count the first kind and you measure the second.

Quantitative data then splits again, into discrete and continuous. Number of children is discrete — there is nothing between two and three. Body weight is continuous, because there are infinitely many values between 62.4 kg and 62.5 kg.

The four levels of measurement

The more useful distinction is the four-rung ladder Stevens laid out. Each rung up, the number promises you more.

Nominal

names only

Categories with no order. Blood type, region, brand.

Ordinal

ranked gaps unknown

Order is real, spacing is not. Rank, grade, satisfaction.

Interval

zero is arbitrary
0?

Differences mean something, ratios do not. °C, year, IQ.

Ratio

true zero
0

Zero means none. Length, weight, revenue, count.

  • Nominal — a label, nothing else. Blood type, region, brand, sex. No order, no spacing.
  • Ordinal — order is real, spacing is unknown. Rank, letter grade, satisfaction, income bracket.
  • Interval — the gaps are equal but zero was chosen by someone. Celsius, calendar year, IQ, z-scores.
  • Ratio — zero means "none at all". Length, weight, duration, revenue, counts.

What each level lets you do

Every rung unlocks one more operation, and the unlocks are cumulative: anything legal lower down stays legal higher up, never the reverse.

Level= ≠< >+ −× ÷Centre
NominalMode
OrdinalMode, median
Interval+ arithmetic mean
Ratio+ geometric mean, CV

Zero is the only thing separating interval from ratio

Zero degrees Celsius is not the absence of temperature — it is the point where water freezes, a spot somebody picked. That is why 20° cannot be twice 10°. Revenue of zero, on the other hand, really is nothing, so $200m genuinely is twice $100m.

Levels of measurement

4

Nominal, ordinal, interval, ratio

Levels that allow a mean

2

Interval and ratio only

Levels that allow a ratio

1

Ratio only

2

Why It Matters

The level picks the method before you do

The level decides the method

"Which test should I use?" is almost always answered by the measurement level of the variables. This is precisely why software cannot choose for you: from the digits alone, nothing distinguishes a ZIP code from a revenue figure.

LevelChartSummaryTypical test
NominalBar, pie, mosaicCounts, proportionsChi-square
OrdinalStacked bar, ordered barMedian, quartilesMann–Whitney, Kruskal–Wallis
IntervalHistogram, line, boxMean, SDt-test, ANOVA
RatioAll of the above, plus log scale+ CV, geometric mean+ ratio and elasticity models

What goes wrong, and how quietly

Assume the wrong level and the computation still succeeds. That silence is the dangerous part. The output is a plausible-looking number, so nobody thinks to question it.

The mistakeWhat you getWhat it actually is
Mean of a ZIP code column50105.5A place that does not exist
Mean of sex coded 1 / 21.43The share of 2s, arrived at by accident
Correlating customer ID with revenuer = 0.31Older accounts spend more
Mean of a satisfaction rank2.7thSomething between 2nd and 3rd
Regressing on a colour codeβ = 1.2Renumber the colours, get a new answer

You can go down the ladder, never up

Age is ratio; bucket it into 20s, 30s and 40s and it becomes ordinal. You lose information, but nothing breaks. The reverse is impossible. From "in their 20s" you cannot recover the age, and the moment you assume "call it 25" you have invented data that was never collected.

What bucketing costs you

Cutting a continuous variable into bins throws away all the variation inside each bin. Bucket age by decade and a 29-year-old becomes identical to a 20-year-old and different from a 30-year-old. In a regression this visibly reduces power.Unless a bin has a real-world meaning, keep the raw values.

The same rules govern machine learning

  • Nominal — one-hot encode. Feed the raw codes in and the model will read an order that was never there.
  • Ordinal — integer-encode in a way that preserves the order. One-hot encoding throws that order away.
  • Interval and ratio — use as they are, or standardise. Distance-based algorithms need the scaling.
  • High-cardinality nominal — with thousands of categories, like ZIP codes or SKUs, one-hot stops being viable and target encoding takes over.
3

How It Works

Three questions settle every column

1. Three questions, in order

Ask them in sequence and every column lands on exactly one rung.

  • Can the values be ranked? If not, you are done — it is nominal.
  • Are the gaps equal? Is the distance from 1st to 2nd the same as from 2nd to 3rd? If not, it is ordinal.
  • Does zero mean "none"? If not, interval. If so, ratio.

The test that never fails

There is an easier way to ask the third question: "does the multiple survive a change of units?" Convert 20°C and 10°C to Fahrenheit and you get 68°F and 50°F — the multiple has changed. Convert 2 kg and 1 kg to pounds and it is still exactly double.

2. The columns that pretend to be numbers

Almost every real-world mistake happens in one of two places: columns stored as numbers that are not quantities at all, and columns that look interval but are only ordinal.

Table 1 Frequently misclassified columns and what breaks when they are
ColumnLooks likeActuallyWhat breaks
Postal codeNumberNominalThe mean of two postal codes is a third place
Sex coded 1 / 2NumberNominalA mean of 1.4 has no referent
Customer IDNumberNominalCorrelating it with revenue finds signup order
Likert 1–5IntervalOrdinalThe gap 1→2 is not the gap 4→5
Year (2024)RatioInterval2024 is not twice 1012
Temperature °CRatioInterval20° is not twice as warm as 10°
Phone numberNumberNominalSorting it is meaningless
Star rating 1–5IntervalOrdinalTwo shops averaging 3.0 can be opposites

3. What to do about Likert scales

A "1 = strongly disagree … 5 = strongly agree" scale is, strictly, ordinal: nothing guarantees that the distance from 1 to 2 matches the distance from 4 to 5. And yet everybody averages them. So what should you actually do?

SituationRecommendedWhy
A single itemMedian plus the response distributionOne item gives a mean too little to stand on
Several items summedA mean is defensibleSummed scores behave close to interval
Comparing two groupsMann–WhitneyUses only the ordering, so it assumes less
Reporting to stakeholdersMean plus top-box shareA mean alone hides the shape
Five points or fewerTreat the mean carefullyFewer levels, more distortion

The question is not really whether to use a mean. It is whether to use only a mean. Show the distribution alongside it and most of the objection evaporates.

4. Settle it once, at the start

Write down the level of every column the moment the data lands, and every later decision falls out of that table on its own.

ColumnLevelSafe summariesWatch out for
Customer IDNominalDistinct countNever treat as a quantity
Signup regionNominalCounts, sharesOne-hot encode
Tier (basic / silver / gold)OrdinalMedian, distributionOrder-preserving encoding
Signup yearIntervalDifferences, trendDo not divide one year by another
Lifetime spendRatioMean, total, ratiosConsider a log transform
4

Example

What a 3.0-star average hides

In practice: three restaurants, all rated 3.0

Three restaurants on a delivery app hold an average rating of exactly 3.00, from thirty reviews each. On the app they are indistinguishable.

Shop1 · 2 · 3 · 4 · 5MeanSD% giving 5
Shop A(Everyone said 3)0 · 0 · 30 · 0 · 03.000.000%
Shop B(Clustered on 3)3 · 6 · 12 · 6 · 33.001.1110%
Shop C(Loved or hated)15 · 0 · 0 · 0 · 153.002.0350%

Shop A disappointed nobody and delighted nobody. Shop C is half five-star, half one-star. Filing those two under "a three-star place" is plainly wrong — and that is exactly what the mean does.

A distribution like C's usually means something specific: quality that depends on which dish you order, food that survives some delivery zones and not others, or a batch of planted reviews. Reading only the mean, you would have filed the whole thing under "average".

The lesson here

Averaging an ordinal scale is dangerous not because the arithmetic fails but because it flattens genuinely different distributions into the same number. Print the top-box share next to the mean and the three restaurants separate immediately.

In practice: taking one survey apart

Sort the questions on an ordinary customer survey by level, and the available analyses assign themselves.

QuestionLevelWhat you can run
SexNominalCounts, crosstabs, chi-square
RegionNominalCounts, map visualisation
Age bracket (20s / 30s / …)OrdinalMedian, ordinal regression
Age in yearsRatioMean, correlation, regression
Income bandOrdinalMedian, nonparametric tests
Likelihood to reorder (1–5)OrdinalMedian, Mann–Whitney
Days since last visitRatioMean, survival analysis
Number of visitsRatio (discrete)Mean, Poisson regression

Notice that "age bracket" and "age in years" sit side by side. Same underlying fact, different level, different toolkit. Always collect the raw age if you can — bucketing it later is free, and unbucketing it is impossible.

Common misunderstandings

Misconception 1

❌ If it is stored as a number, it is quantitative.

ZIP codes, phone numbers, customer IDs and squad numbers are all stored as numbers and all nominal. What settles the level is not the storage type but what the digits stand for.

Misconception 2

❌ If the scale has a zero, it is a ratio scale.

There is still temperature at 0°C, and time still passed in the year 0. What you need is not the digit zero but a zero that means the quantity is absent.

Misconception 3

❌ You must never average an ordinal scale.

Summed multi-item scales behave close enough to interval that published research averages them routinely. The real problem is letting a single item's mean be the only thing you report. Show the distribution and the objection mostly goes away.

Misconception 4

❌ Bucketing a continuous variable makes it easier to interpret.

It does — at the cost of information and statistical power. Worse, the conclusion can turn on where you put the cut points, which leaves room to land on whichever answer you were hoping for.

5

Interactive

Find out where each scale keeps its zero

Find out where each scale keeps its zero

Below, three units are drawn along a single physical axis. Choose temperature and their three zeros land in three different places; choose weight and they land on the same one. The B ÷ A column is the consequence.

Each scale drawn on one physical axis. The dot is where that unit calls zero.

Kelvin (K)0Celsius (°C)0Fahrenheit (°F)0AB
UnitABB ÷ A
Kelvin (K)283.15293.151.035
Celsius (°C)10.020.02.000
Fahrenheit (°F)50.068.01.360

The three units disagree on the ratio, so the ratio is a property of the unit rather than of the temperature. Whichever number you quote, someone using another unit gets a different one.

A ratio means something only when zero means "none at all".

What to look for

  • With A = 10°C and B = 20°C, what multiple does each unit report?
  • Why is the Kelvin multiple the one closest to 1?
  • Switch to weight — why do all three multiples become identical?
  • Swap A and B around and check the property still holds.
  • B − A differs by unit too, so why are differences still safe to compare?

Learning points

A ratio means something only when zero means "none at all".

On an interval scale differences remain perfectly meaningful — division is the only casualty.

If "twice as much" changes when you change units, it was a claim about the unit, not the data.

Key takeaways

Nominal & ordinal

Labels, and labels you can rank

  • Counting is the only safe operation
  • Median is fine, mean is not
  • Numeric codes are still labels

Interval

Even gaps, arbitrary zero

  • Differences are meaningful
  • Ratios are not
  • °C, year, IQ, standardised scores

Ratio

Zero means none at all

  • "Twice as much" is a real statement
  • Log transforms and CV are available
  • Length, weight, revenue, count

The question is not "is this column numeric?"

It is "what am I allowed to claim with these numbers?" The arithmetic succeeds on any column. Whether the answer means anything is something only the measurement level can tell you.

How does this apply to real data?

Measurement level is settled once, right after the data loads, and every subsequent choice follows from it. In SKARI you can check the following alongside.

Data profile

Column Types, Unique Counts, Missing Map

Categorical analysis

Frequency Table, Crosstab, Chi-square

Ordinal analysis

Mann–Whitney, Kruskal–Wallis, Ordinal Regression

Encoding

One-Hot, Ordinal, Target Encoding

Once this clicks, you can answer questions like these.

  • Is a mean even defined for this column?
  • Which columns are stored as numbers but are really labels?
  • Which chart and which test suit this variable?
  • Is there any real reason to bucket this continuous variable?
  • Should this category be one-hot encoded or order-encoded?
Now try it on real dataOpen in Lab

Go Deeper

Exploratory Data Analysis (EDA)