Lesson 1 of 8 · 10 min

Bivariate data: two variables at once

Recognise bivariate data, classify each variable as categorical or numerical, choose a two-way table or a scatterplot, and name the explanatory and response variables.

What you will be able to do

  • Explain what makes a data set bivariate.
  • Classify each variable in a pair as categorical or numerical, and choose a two-way frequency table or a scatterplot.
  • Identify the explanatory variable and the response variable in a context.

In Unit 2 you analysed one variable at a time: the heights of a class, or the waiting times at a clinic. That is univariate data.

Many of the questions people actually ask involve two variables. Do students who live further away take longer to get to school? Do older people get their news from different places from younger people? To answer questions like these, you need both values for each individual.

Definition

Bivariate data

Bivariate data records two variables for each individual — each person, day, car or suburb. Every individual gives a pair of values, and the pairing is what lets you look for an association: a pattern linking the two variables.

Part of a survey of senior students at a Brisbane school. Each row is one student.
StudentYear levelTravel modeDistance (km)Travel time (min)
Ava11Walk0.810
Ben12Bus3.015
Chloe11Car4.513
Dev12Bike2.29
Ella11Bus6.022
Finn12Car8.518

Any two columns of this table form bivariate data, because both values in each pair belong to the same student. Year level and travel mode is bivariate. Distance and travel time is bivariate. The travel times on their own are univariate.

Here are the distances and travel times for these six students and four more from the same survey. Each student becomes one point.

Each point is one student: two values, one dot. Ben travels 3.0 km in 15 minutes.

Key idea

The type of variable decides the tool

  • Both categorical (year level and travel mode): organise the counts in a two-way frequency table and compare percentages. That's the next three lessons.
  • Both numerical (distance and travel time): draw a scatterplot. That's the last four lessons.

One of each, like year level and travel time, is a comparison of groups — the parallel box plots you used in Unit 2.

Common mistake

Numbers that are really labels

A postcode, a jersey number or a phone number is made of digits, but it is a categorical variable: it names a category, and an average postcode means nothing. Ask yourself whether it makes sense to calculate a mean. If it doesn't, the variable is categorical.

Which of these data sets is bivariate?

Choose one answer

With bivariate data, one variable often helps to explain or predict the other. A hotter day might sell more ice-creams; an older car is usually worth less. Naming the roles of the two variables tells you how to set up the analysis.

Definition

Explanatory and response variables

The explanatory variable is the one that may explain, influence or be used to predict the other.

The response variable is the one that may respond to changes in the explanatory variable.

On a scatterplot, the explanatory variable goes on the horizontal axis and the response variable on the vertical axis.

The explanatory variable is the one that could drive or predict the other.
Pair of variablesExplanatory variableResponse variable
Daily maximum temperature and ice-creams soldTemperatureIce-creams sold
The resale value of a car and its ageAge of the carResale value
Distance of a taxi trip and the fareDistanceFare
Age group and main news sourceAge groupMain news source

Tip

Three questions to find the explanatory variable

Which variable could influence the other? Which one would you know first? Which one would you use to predict the other? The answer to all three is the explanatory variable.

The order the variables are named in tells you nothing — in the second row of the table, the response variable is named first.

Worked example

Classify the variables and choose the display

  • Foundation

A health researcher records four variables for each of 500 Queensland adults:

  • age group (18–34, 35–54, 55 and over)
  • whether they had a flu vaccination this year (yes or no)
  • hours of exercise in a typical week
  • resting heart rate (beats per minute).

(a) Classify each variable as categorical or numerical.

(b) Which display would you use to look for an association between age group and flu vaccination? And between weekly exercise and resting heart rate?

(c) For the second pair, identify the explanatory and response variables.

4 steps

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

Method

  1. Classify each variable as categorical (labels) or numerical (counts and measurements).

  2. Two categorical variables go in a two-way frequency table; two numerical variables go on a scatterplot.

  3. The explanatory variable is the one that could influence or predict the other.

Watch out for

  • Calling age group numerical because its categories contain numbers. The values 18–34, 35–54 and 55+ are labels for groups.

A household records the number of hours of sunshine each day and the electricity its solar panels generate that day. Which is the explanatory variable?

Choose one answer

Note

When neither variable causes the other

Height and arm span are linked, but neither causes the other. When that happens, the explanatory variable is the one you plan to predict from: to estimate arm span from height, height is explanatory.

Summary

  • Bivariate data records two variables for each individual, so the data comes in pairs.

  • Two categorical variables go in a two-way frequency table; two numerical variables go on a scatterplot.

  • A number used as a label, like a postcode, is categorical.

  • The explanatory variable may explain or predict the response variable. Decide from the context, not from the order the variables are named.

Finished the lesson?

Try the 2 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