Classification of Data
Theory
Data can be categorical (nominal or ordinal) or numerical (discrete or continuous). This Year 11 Maths Standard page shows how to classify a variable by asking two questions: is it a label or a quantity, and is it ordered, counted or measured? It also covers the tricky cases: numbers that are only labels, rounded measurements and data recorded in groups.
A variable is something that is recorded about each person or item in a survey, such as height, favourite sport or number of siblings. The values collected are the data.
Categorical data are labels or words that put each person or item into a group, such as hair colour or type of phone. Categorical data is also called qualitative data.
- Nominal: the categories have no natural order (e.g. favourite fruit, type of transport).
- Ordinal: the categories have a natural order or ranking (e.g. small, medium, large; poor, fair, good).
Numerical data are numbers that measure or count a quantity, so it makes sense to add them or find an average. Numerical data is also called quantitative data.
- Discrete: the data are counted and can only take separate values, usually whole numbers (e.g. number of cars in a driveway).
- Continuous: the data are measured and can take any value in a range (e.g. time, mass, length, temperature).
How the data are recorded matters. A number that is only a label, such as a phone number or a bus route number, is categorical. Exact ages are numerical, but age groups (under \(20\), \(20\)–\(39\), \(40\) and over) are categorical and ordinal.
There are no formulas in this topic. Use the table and the two questions below to classify any variable.
| Type | What it looks like | Examples |
|---|---|---|
| Categorical, nominal | labels with no order | eye colour, type of transport, car brand |
| Categorical, ordinal | labels that can be ranked | shirt size, star rating, level of agreement, age group |
| Numerical, discrete | counted values | emails received, people in a queue, tries scored |
| Numerical, continuous | measured values | height, mass, time, distance, temperature |
How to classify a variable
- Look at what is actually recorded: a number, a word, or a group or bracket.
- Decide categorical or numerical: can you sensibly add or average the values?
- If numerical, ask: is it counted (discrete) or measured (continuous)?
- If categorical, ask: do the categories have a natural order (ordinal) or not (nominal)?
- Write both words in the answer, e.g. “numerical, continuous”.
Questions that list several variables
- Classify each variable one at a time, writing both words next to it.
- Count the ones the question asks about.
(i) the number of coffees ordered
(ii) the time the customer waits, in minutes
(iii) the temperature of the coffee when served, in \(^\circ\text{C}\).
Classify each variable.
All three are numbers you could average, so all three are numerical.
(i) Coffees are counted: \(1, 2, 3, \ldots\) ⇒ numerical, discrete.
(ii) Time is measured and can be any value, e.g. \(4.35\) minutes ⇒ numerical, continuous.
(iii) Temperature is measured ⇒ numerical, continuous.
(i) their home state
(ii) their overall rating: poor, average, good or excellent
(iii) how they paid: cash, card or bank transfer
(iv) the coffee cup size they prefer: small, regular or large.
Classify each variable.
All four answers are words, so all four are categorical. Now check for a natural order.
(i) States have no natural order ⇒ categorical, nominal.
(ii) Poor < average < good < excellent ⇒ categorical, ordinal.
(iii) Payment methods have no order ⇒ categorical, nominal.
(iv) Small < regular < large ⇒ categorical, ordinal.
(i) The membership number of each member of a gym (e.g. \(10\,482\)).
(ii) The height of each patient at a clinic, recorded to the nearest centimetre.
(i) A membership number is written with digits, but it only names the member. Adding or averaging membership numbers has no meaning, and they are not ranked as categories.
\(\therefore\) categorical, nominal.
(ii) Height is measured. A patient’s true height could be \(171.38\text{ cm}\); rounding to the nearest centimetre is only how it is written down.
\(\therefore\) numerical, continuous.
(1) suburb
(2) number of people in the household
(3) electricity used last month (in kWh)
(4) satisfaction: very unhappy, unhappy, happy, very happy
(5) age group: under \(30\), \(30\)–\(59\), \(60\) and over
(6) length of the phone call (in minutes)
(i) How many of the variables are categorical?
(ii) How many are numerical and continuous?
(iii) Can the company find the exact mean age of its customers from this survey?
Classify each variable first:
| Variable | Type |
|---|---|
| (1) suburb | categorical, nominal |
| (2) people | numerical, discrete |
| (3) electricity | numerical, continuous |
| (4) satisfaction | categorical, ordinal |
| (5) age group | categorical, ordinal |
| (6) call length | numerical, continuous |
(i) Variables (1), (4) and (5) are categorical: 3 variables.
(ii) Variables (3) and (6) are measured: 2 variables.
(iii) No. Age was recorded in groups, so the exact ages are lost. A mean age could only be estimated.
Common pitfalls
Frequently asked questions
What is the difference between categorical and numerical data?
Categorical data are labels or words that sort things into groups, such as eye colour. Numerical data are numbers that count or measure a quantity, such as the number of siblings or a height.
What is the difference between discrete and continuous data?
Discrete data are counted, so they take separate values such as \(0, 1, 2, 3\). Continuous data are measured, so they can take any value in a range, such as \(1.62\text{ m}\) or \(1.625\text{ m}\).
What is the difference between nominal and ordinal data?
Both are categorical. Ordinal categories have a natural order, such as junior, intermediate, senior. Nominal categories have no order, such as bus, train, ferry.
Is a phone number numerical or categorical?
Categorical (nominal). A phone number is written with digits, but it is a label that identifies a phone. Adding or averaging phone numbers means nothing.
What do quantitative and qualitative data mean?
Quantitative data is another name for numerical data. Qualitative data is another name for categorical data.