Lesson 1 of 8 · 12 min
Univariate data and types of variables
Recognise univariate data and classify any variable as categorical (nominal or ordinal) or numerical (discrete or continuous).
What you will be able to do
- Explain what univariate data is and how it differs from bivariate data.
- Classify a statistical variable as categorical or numerical.
- Classify a categorical variable as nominal or ordinal, and a numerical variable as discrete or continuous.
A swimming club keeps records on its members. Each row of the table below is one swimmer. Each column is something that changes from swimmer to swimmer.
| Swimmer | Age group | Favourite stroke | Races this season | Best 50 m freestyle (s) |
|---|---|---|---|---|
| Mia | Under 14 | Butterfly | 12 | 31.84 |
| Jack | Under 12 | Freestyle | 8 | 36.27 |
| Aanya | Open | Backstroke | 15 | 29.05 |
| Lachlan | Under 14 | Freestyle | 10 | 32.61 |
Each column is a statistical variable: a characteristic that can vary from one person or thing to the next. When you study the data on one variable on its own, such as every swimmer's best 50 m time, you are working with univariate data. (Uni means one.)
If you record two variables for each swimmer and study them together, such as age group and best time, the data is bivariate. That comes in Unit 3. In this topic, every analysis is about one variable at a time.
Definition
Univariate data
Data on a single variable, such as the heights of 30 students or the favourite sport of 80 people. Each data value is one observation of that variable.
Which of these is univariate data?
The first thing to decide about a variable is what kind of values it has. Are they labels that sort people or things into groups, or numbers that count or measure something? The answer decides which tables, displays and statistics make sense, so it comes first in every investigation.
Every variable sits at the end of one branch of this tree.
| Type | Its values are | Examples |
|---|---|---|
| Categorical, nominal | labels with no natural order | place of birth (Australia, overseas); favourite stroke; postcode |
| Categorical, ordinal | labels with a natural order | income level (high, medium, low); age group (Under 12, Under 14, Open); clothing size |
| Numerical, discrete | counts: separate values, usually whole numbers | the number of people in a room; races entered; goals scored |
| Numerical, continuous | measurements: any value in a range | the temperature in degrees Celsius; swim time; height; mass |
Key idea
Two questions classify any variable
- Labels or numbers? Labels (categories) make the variable categorical. Counts or measurements make it numerical.
- Which kind? A categorical variable is ordinal if its labels have a natural order and nominal if they don't. A numerical variable is discrete if it is counted and continuous if it is measured.
At a Brisbane busway station, the number of passengers on each bus that arrives is recorded. How should this variable be classified?
Common mistake
Numbers are not always numerical
A postcode such as 4870 is written with digits, but it is a label for an area. So are jersey numbers and phone numbers. Test it: would the mean make sense? The mean of the postcodes 4000 and 4870 is 4435, which tells you nothing. Postcode is categorical, nominal.
Tip
Counted or measured?
If you count it, it is discrete. If you measure it with an instrument (a clock, a ruler, scales, a thermometer), it is continuous. A measurement is still continuous when it is rounded for recording: a time written as 31.84 s could really have been 31.8412… s.
Worked example
Classify the variables in a surf club survey
A Sunshine Coast surf life saving club surveys its members. Classify each variable as categorical (nominal or ordinal) or numerical (discrete or continuous).
- (a) Patrol team (Red, Blue, Gold, Green)
- (b) Experience level (beginner, intermediate, advanced)
- (c) Number of patrols completed this season
- (d) Time taken to swim 400 m in the ocean
- (e) Postcode of home address
Step 1: Patrol team
The values are the names of teams. They are labels with no natural order, so patrol team is categorical, nominal.
Step 2: Experience level
The values are labels, but they have a natural order: beginner, then intermediate, then advanced. Experience level is categorical, ordinal.
Ordinal categories can be ranked, even though you can't do arithmetic with them.
Step 3: Number of patrols
You count patrols: 0, 1, 2, … A member can't complete 7.4 patrols, so this is numerical, discrete.
Step 4: Swim time
You measure time, and it can take any value in a range (7 min 41.3 s, 7 min 41.35 s, …). Swim time is numerical, continuous.
Step 5: Postcode
A postcode such as 4558 is written with digits, but it is a label for an area. Adding or averaging postcodes means nothing, so postcode is categorical, nominal.
The test is whether arithmetic on the values makes sense, not whether they are written with digits.
Try it yourself first, then check the working one step at a time.
Answer
(a) Categorical, nominal. (b) Categorical, ordinal. (c) Numerical, discrete. (d) Numerical, continuous. (e) Categorical, nominal.
Method
Ask whether the values are labels (categorical) or counts and measurements (numerical).
Categorical: is there a natural order? Yes, ordinal. No, nominal.
Numerical: counted, discrete. Measured, continuous.
Check for numbers used as labels. They are categorical.
Watch out for
Calling postcode numerical because it is written with digits.
Calling a measured variable discrete because it was rounded when it was recorded.
A café records the size of each coffee it sells: small, regular or large. How should this variable be classified?
Exam tip
Classifying in an exam
Give both levels, such as "categorical, ordinal", not just "categorical". If you are asked to justify, add the reason in a few words: "numerical, continuous, because time is measured and can take any value in a range".
Summary
Univariate data is data on one variable. Bivariate data records two variables for each individual.
Categorical variables have labels as values: nominal if the labels have no natural order, ordinal if they do.
Numerical variables have numbers that count or measure: discrete if counted, continuous if measured.
Numbers used as labels, such as postcodes and jersey numbers, are categorical.
The type of variable decides which displays and statistics make sense, as the rest of this topic shows.
Finished the lesson?
Try the 3 quick checks above and the lesson completes itself, or mark it complete now.