01 / 21

Classifying Variables
& Scales of Measurement

Learn to identify categorical, ordinal, and continuous variables and understand the four scales of measurement that underpin every statistical analysis.

Biostatistics

Why Variable Classification Matters

Every dataset is made up of variables: characteristics that vary from one observation to the next. Before you choose a statistical test, graph, or model, you must first know what type of variable you are working with.

The Two Families of Variables

Variables Categorical Quantitative Nominal Ordinal Discrete Continuous Blood type, Sex Pain scale, Stage Pulse count Temperature, Weight

Nominal Variables

Nominal variables represent categories with no natural order. You can label them with names or codes, but ranking them makes no sense.

Blood Type
A, B, AB, O: labels with no ranking
Sex
Male, Female: distinct groups, not ordered
Diagnosis Code
ICD codes: identifiers, not magnitudes

Ordinal Variables

Ordinal variables have categories that can be ranked, but the gaps between ranks are not guaranteed to be equal.

None Mild Moderate Severe Pain Severity Scale (ranked, but gaps unequal)

Discrete vs Continuous

Discrete
Countable, finite set of values. Example: number of hospitalizations (0, 1, 2, 3 ...)
Continuous
Infinitely divisible within a range. Example: body temperature (36.7, 36.72, 36.718 ...)

The Four Scales of Measurement

Ratio True zero + equal intervals + order + categories Interval Equal intervals + order + categories (no true zero) Ordinal Meaningful order + categories (gaps unequal) Nominal Named categories only (no order, no arithmetic) More information →

Nominal vs Ordinal: Key Distinction

Nominal Ordinal
Categories ✓ ✓
Natural order ✕ ✓
Equal intervals ✕ ✕
Meaningful arithmetic ✕ ✕
Example Blood type (A, B, O) Cancer stage (I, II, III)
Central tendency Mode only Median, mode

Interval vs Ratio: The Zero Question

Interval Ratio
Order ✓ ✓
Equal intervals ✓ ✓
True zero ✕ ✓
Ratios meaningful ✕ ✓
Example Temperature \(^\circ\text{C}\) Weight (kg)

How to Classify a Variable

1
Is it numeric? If no: it is categorical (nominal or ordinal).
2
If categorical, can values be ranked? If yes: ordinal. If no: nominal.
3
If numeric, is it countable? Whole-number counts only: discrete. Values on a continuum: continuous.
4
Does zero mean "none"? True zero: ratio scale. Arbitrary zero: interval scale.

Example 1: Blood Pressure

A patient's systolic blood pressure is recorded as 120 mmHg. What type of variable is this?

1
Numeric? Yes: 120 mmHg is a number.
2
Countable integers? No: blood pressure can be 120.5 mmHg. This is continuous.
3
True zero? Yes: 0 mmHg would truly mean no pressure. This is the ratio scale.

Example 2: Patient Satisfaction

A survey asks patients to rate their satisfaction: Very Dissatisfied, Dissatisfied, Neutral, Satisfied, Very Satisfied.

Very Dissat. Dissatisfied Neutral Satisfied Very Sat. Increasing satisfaction (ranked but gaps unequal)

Example 3: Temperature in Two Scales

A lab records temperature as \(37.0\,^\circ\text{C}\). Another records the same measurement as \(310.15\,\text{K}\). Are these the same scale of measurement?

Celsius (\(^\circ\text{C}\))
\(0\,^\circ\text{C}\) = freezing point of water (arbitrary). This is interval.
Kelvin (\(\text{K}\))
\(0\,\text{K}\) = absolute zero (true absence of thermal energy). This is ratio.

Tricky Cases in Biostatistics

Age Groups
"0-17, 18-34, 35-54, 55+" looks numeric, but when grouped into bins, it becomes ordinal.
Zip Codes
Digits, but no ordering or arithmetic meaning. Zip codes are nominal.
Number of Children
Countable whole numbers with a true zero: discrete, ratio.

Common Mistakes

✕ Treating ordinal as interval
Computing a mean of Likert-scale responses (1-5) assumes equal spacing. Use median instead.
✕ Calling all numbers "continuous"
Zip codes, jersey numbers, and ICD codes are numbers but are nominal: arithmetic is meaningless.
✕ Forgetting the true-zero test
Saying "\(40\,^\circ\text{C}\) is twice as hot as \(20\,^\circ\text{C}\)" is wrong because Celsius lacks a true zero.

Complete Summary Table

Scale Category Order Equal Gaps True Zero Example
Nominal ✓ ✕ ✕ ✕ Blood type
Ordinal ✓ ✓ ✕ ✕ Pain severity
Interval ✓ ✓ ✓ ✕ Temp. \(^\circ\text{C}\)
Ratio ✓ ✓ ✓ ✓ Weight (kg)

Question 1 of 5

A researcher records patients' marital status as Single, Married, Divorced, or Widowed. What type of variable is this?

Question 2 of 5

A clinical trial measures patient weight in kilograms. What scale of measurement is this?

Question 3 of 5

A nurse records the number of times a patient vomited in 24 hours. This variable is best classified as:

Question 4 of 5

Temperature in degrees Fahrenheit is measured on which scale?

Question 5 of 5

A study records cancer stage as Stage I, Stage II, Stage III, or Stage IV. Why is computing the mean stage inappropriate?