Lesson 1: Bivariate data: two variables at once
Classify the variables and choose the display
SkillsRecognising bivariate dataExplanatory and response variables
Worked example
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.
Step 1: Classify each variable
Age group and flu vaccination take categories as their values, so they are categorical. (Age group is ordinal: its categories have an order.) Hours of exercise and resting heart rate are measurements, so they are numerical.
Ask whether a mean makes sense. A mean number of hours of exercise does; a mean of "yes" and "no" doesn't.
Step 2: Choose the display for the categorical pair
Age group and flu vaccination are both categorical, so count the adults in each combination in a two-way frequency table.
Step 3: Choose the display for the numerical pair
Weekly exercise and resting heart rate are both numerical, so plot one point for each adult on a scatterplot.
Step 4: Decide which variable explains the other
Regular exercise can lower a person's resting heart rate, but resting heart rate doesn't set how much someone exercises. So hours of exercise is the explanatory variable and resting heart rate is the response variable.
The explanatory variable is the one that could influence, or be used to predict, the other.
Answer
(a) Age group and flu vaccination are categorical; hours of exercise and resting heart rate are numerical. (b) A two-way frequency table for age group and flu vaccination; a scatterplot for exercise and resting heart rate. (c) Hours of exercise is the explanatory variable and resting heart rate is the response variable.
Try a similar one
A fresh question of the same kind, checked as you answer, with hints and a full solution.
Method
Classify each variable as categorical (labels) or numerical (counts and measurements).
Two categorical variables go in a two-way frequency table; two numerical variables go on a scatterplot.
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.