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.

Part of a swimming club's member records.
SwimmerAge groupFavourite strokeRaces this seasonBest 50 m freestyle (s)
MiaUnder 14Butterfly1231.84
JackUnder 12Freestyle836.27
AanyaOpenBackstroke1529.05
LachlanUnder 14Freestyle1032.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?

Choose one answer

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.

The four types of variable, with examples.
TypeIts values areExamples
Categorical, nominallabels with no natural orderplace of birth (Australia, overseas); favourite stroke; postcode
Categorical, ordinallabels with a natural orderincome level (high, medium, low); age group (Under 12, Under 14, Open); clothing size
Numerical, discretecounts: separate values, usually whole numbersthe number of people in a room; races entered; goals scored
Numerical, continuousmeasurements: any value in a rangethe temperature in degrees Celsius; swim time; height; mass

Key idea

Two questions classify any variable

  1. Labels or numbers? Labels (categories) make the variable categorical. Counts or measurements make it numerical.
  2. 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?

Choose one answer

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

  • Simple familiar

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
5 steps

Try it yourself first, then check the working one step at a time.

Method

  1. Ask whether the values are labels (categorical) or counts and measurements (numerical).

  2. Categorical: is there a natural order? Yes, ordinal. No, nominal.

  3. Numerical: counted, discrete. Measured, continuous.

  4. 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?

Choose one answer

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.

Lesson 1 of 80% read

Save your progress with a free account