Skip to main content

Associations between a numerical and a categorical variable for VCE General Mathematics Unit 3 Data analysis

Syllabus dot point

“Use back-to-back stem plots, parallel dot plots and parallel boxplots to identify and describe associations between a numerical variable and a categorical variable, comparing centre, spread, shape and outliers”

VCEGeneral MathematicsUnit 3 Data analysis15 min read

Quick answer

When the explanatory variable is categorical and the response is numerical, display the data with a back-to-back stem plot (two groups), parallel dot plots or parallel boxplots. There is an association if the distribution changes from group to group, mainly shown by different medians; describe it by comparing medians and IQRs with values, in context, without claiming causation.

Jump to a section
  1. What this dot point is asking
  2. The answer
  3. Exam-style questions
  4. Practice questions

What this dot point is asking

Many statistical questions ask whether a numerical variable (height, time, income, rainfall, life expectancy) differs between the groups of a categorical variable (gender, year level, town, treatment). VCAA wants you to display the data with a back-to-back stem plot, parallel dot plots or parallel boxplots, and to decide whether there is an association by comparing the distributions: their centres, spreads, shapes and outliers. You then write a short report that quotes the relevant values.

This sits between two other skills in the study design: associations between two categorical variables (two-way tables and segmented bar charts) and associations between two numerical variables (scatterplots and correlation). Questions on comparing groups appear in both examinations; in 2025, Examination 1 Question 3 asked students to test four statements against parallel boxplots.

The answer

Explanatory and response variables

When one variable is categorical and the other numerical, the categorical variable is normally the explanatory variable (it defines the groups) and the numerical variable is the response variable (the thing we measure and compare). "Is weekly commuting time associated with where a person lives?": the place of residence (city or country) explains, commuting time responds.

The three displays

Back-to-back stem plot
Two groups share one central column of stems; one group's leaves go to the right, the other's to the left. The left leaves are read from the stem outward, so 7 | 4 on the left means 47. It keeps every data value, so you can count exactly, but it only works for two groups.
Parallel dot plots
A dot plot for each group, drawn on the same scale one above the other. Good for small data sets with repeated whole-number values (goals scored, number of pets).
Parallel boxplots
A boxplot for each group on a common scale. They work for any number of groups, show the five-number summary and outliers at a glance, and are the most common display in VCAA questions.

Parallel boxplots of daily steps by commuting modeThree horizontal boxplots on a common scale of daily steps in thousands from 2 to 18. Car: minimum 3.1, first quartile 4.8, median 5.9, third quartile 7.4, whisker to 9.8 and an outlier at 13.0. Public transport: minimum 4.5, first quartile 6.9, median 8.2, third quartile 9.6, maximum 12.4. Walk or cycle: minimum 7.2, first quartile 10.1, median 11.8, third quartile 13.5, maximum 16.0. The medians increase from car to public transport to walk or cycle, showing an association between commuting mode and daily steps.24681012141618daily steps (thousands)carpublictransportwalk or cycleoutlier5.98.211.8medians (accent lines) rise from car to walk or cycle

Deciding whether there is an association

A numerical variable is associated with a categorical variable if its distribution changes systematically from group to group. The main evidence is a clear difference in medians; differences in spread, shape and outliers add detail.

  • Centre. Compare the medians. If they differ noticeably relative to the spread (for example, one group's median lies outside the other group's box), there is an association.
  • Spread. Compare IQRs (and ranges). One group may be more variable than another.
  • Shape. Symmetric, positively skewed or negatively skewed. Shape can differ between groups too.
  • Outliers. Note any, and which group they belong to.

If the medians are about the same and the boxes overlap almost completely, there is little or no association: knowing the group tells you little about the value.

Key fact

To describe an association between a numerical and a categorical variable, compare the medians with values (and usually the IQRs), and state the direction in context: "The median ... is higher for group A (value) than for group B (value), so ... is associated with ...". Parallel boxplots work for any number of groups; a back-to-back stem plot needs exactly two.

Reading percentages from parallel boxplots

The five-number summary splits each group into quarters, so many exam statements can be checked without the raw data:

  • About 25%25\% of values are below Q1Q_1, 50%50\% below the median, 75%75\% below Q3Q_3.
  • If group A's minimum is above group B's median, then all of group A exceeds at least half of group B (the 2025 question).
  • If group A's Q1Q_1 is above group B's Q3Q_3, then at least 75%75\% of A is above at least 75%75\% of B, a very strong difference.
  • The range is maximum minus minimum, including any outliers; the whiskers stop at the most extreme non-outlier values.

Writing the comparison

VCAA mark schemes for "describe the association" questions typically award marks for:

  1. naming the statistic being compared (usually the median, then the IQR),
  2. quoting the values for each group, and
  3. stating the direction of the difference in context.

A good template: "The median [response] for [group A] ([value]) is higher than for [group B] ([value]). The [response] for [group A] is also more/less variable (IQR [value] compared with [value]). This suggests that [response] is associated with [explanatory variable]."

As always, an association between groups does not show that belonging to a group causes the difference; the groups may differ in other ways.

Worked examples: stem plots, boxplots and written reports

A back-to-back stem plot

Puzzle completion times (seconds) for 13 Year 7 and 13 Year 12 students:

Year 7 leaves Stem Year 12 leaves
2 2 5 8
8 4 3 1 3 4 6 8 9
9 7 5 1 4 1 4 8
8 6 3 2 5 5
7 1 6
2 7
Five-number summaries
Year 7: 34, 43, 52, 59.5, 72. Year 12: 22, 29.5, 36, 42.5, 55.
Compare
The median completion time is 52 seconds for Year 7 and 36 seconds for Year 12, 16 seconds less. The IQR is 16.5 seconds for Year 7 and 13 seconds for Year 12. Both distributions are approximately symmetric with no outliers (Year 7 fences 18.25 and 84.25; Year 12 fences 10 and 62).
Conclude
Completion time is associated with year level: Year 12 students tend to complete the puzzle faster, and their times are slightly less variable.

Marker's note: read the left leaves outward from the stem. "8 4 | 3" on the left is 34 and 38, not 83 and 43.

Parallel boxplots with three groups

Daily steps (thousands): car 3.1, 4.8, 5.9, 7.4, with a whisker to 9.8 and an outlier at 13.0; public transport 4.5, 6.9, 8.2, 9.6, 12.4; walk or cycle 7.2, 10.1, 11.8, 13.5, 16.0.

Centre
Medians 5.9, 8.2 and 11.8 thousand: they increase from car to public transport to walk or cycle.
Spread
IQRs 2.6, 2.7 and 3.4 thousand: similar, slightly larger for walkers and cyclists.
Outliers
One car commuter with 13.0 thousand steps (above the upper fence 7.4+1.5×2.6=11.37.4 + 1.5 \times 2.6 = 11.3).
Conclude
Daily steps are associated with commuting mode; the more active the commute, the higher the median step count.

Marker's note: in a three-group comparison, compare all three medians in one sentence and give their values in order.

Testing statements against boxplots

Using the step count summaries, decide whether each statement is true. (1) At least half of the walk or cycle group took more steps than every car commuter who was not an outlier. (2) At least 75%75\% of the public transport group took more steps than the median car commuter.

(1) The car group's highest non-outlier value is 9.8; the walk or cycle median is 11.8. At least half the walk or cycle group is at or above 11.8, which is above 9.8. True.

(2) The public transport Q1Q_1 is 6.9, which is above the car median of 5.9, so at least 75%75\% of public transport users took more than 5.9 thousand steps. True.

Marker's note: each statement becomes a comparison of one summary value from each plot. Identify which two values the statement is really about.

Common traps
Comparing only one number without values
"Group A is higher" earns little. State which statistic (median) and quote both values.
Using the mean for skewed data
For skewed distributions or data with outliers, compare medians and IQRs.
Reading left leaves backwards
On the left of a back-to-back stem plot, the leaf nearest the stem is the smallest.
Treating the whisker end as the maximum when there is an outlier
The maximum is the outlier; the whisker stops at the largest non-outlier value.
Claiming causation
Group differences show association only.
Mixing up the variables
The categorical variable is usually explanatory; the numerical variable is the response.
Exam technique

For "Is there an association? Explain" questions, answer with "Yes" or "No" first, then justify with the medians (values for each group), then add IQRs if space allows. For multiple-choice statements about parallel boxplots, write the five-number summary of each group beside the plot before you read the options, then test each option against the numbers.

Note

Sometimes you want to know whether a measurement is different for different groups, like whether walkers take more steps than drivers. You draw the groups' results side by side on the same scale and look at where the middle of each group sits. If the middles are clearly different, the measurement is linked to the group. Then you also look at how spread out each group is. When you write it up, always give the actual middle values for each group, because "it's higher" is not as convincing as "11.8 thousand compared with 5.9 thousand".

Exam-style questions

Questions in the style of VCAA exam questions on this dot point, each with a worked answer. They are written by ExamExplained unless tagged "Past paper"; the year shows the paper a question is modelled on.

2025 VCAA-style1 mark
Parallel boxplots show life expectancy (years) for samples of countries from two continents, Sample H and Sample T. Read from the plots, Sample T has minimum about 68, Q1Q_1 about 73.6 and median about 76.5, with an IQR of about 5.6; Sample H has median about 67.2 and Q3Q_3 about 70.8, with an IQR of about 7.8. Which statement is correct? A. The IQR for Sample T is greater than the IQR for Sample H. B. The median for Sample T is more than 10 years greater than the median for Sample H. C. The third quartile for Sample H is greater than the first quartile for Sample T. D. Life expectancy in all Sample T countries exceeds the median life expectancy in Sample H.
Show worked answer →

Test each statement against the values.

  • A: 5.6<7.85.6 < 7.8, so false.
  • B: 76.5−67.2=9.376.5 - 67.2 = 9.3 years, which is not more than 10, so false.
  • C: Q3Q_3 for H is 70.8 and Q1Q_1 for T is 73.6; 70.8<73.670.8 < 73.6, so false.
  • D: the minimum of Sample T (about 68) is greater than the median of Sample H (about 67.2), so every country in T has a higher life expectancy than the median of H. True.

The answer is D (82%82\% of students chose it). Statement D is the kind of "all" or "percentage" comparison that can be read straight from the five-number summary: the minimum tells you about all values.

Source: VCAA 2025 General Mathematics Examination 1, Question 3, with the values read from the boxplots as given in the 2025 examination report.

Practice questions

Original practice questions graded from foundation to exam level, each with a full worked solution. Try them before revealing the solution.

foundation2 marks
A researcher records whether each person lives in a city or a country town, and the number of hours they spend commuting per week. (a) Identify the explanatory variable and the response variable. (b) Name a display that could show the association.
Show worked solution →

(a) Explanatory: place of residence (city or country town), which is categorical. Response: weekly commuting time, which is numerical. (1 mark) The explanatory variable is the one we think may explain differences in the other.

(b) Parallel boxplots (or a back-to-back stem plot, since there are exactly two groups, or parallel dot plots). (1 mark)

foundation2 marks
Five-number summaries for the daily step counts (thousands) of two groups are: car commuters 3.1, 4.8, 5.9, 7.4, 13.0; walkers and cyclists 7.2, 10.1, 11.8, 13.5, 16.0. (a) Compare the medians. (b) Does this suggest an association between commuting mode and step count?
Show worked solution →

(a) The median for walkers and cyclists (11.8 thousand) is much higher than for car commuters (5.9 thousand). (1 mark)

(b) Yes. Step count differs systematically between the groups: walkers and cyclists tend to take more steps, so step count is associated with commuting mode. (1 mark)

foundation1 mark
Which display is most appropriate for comparing the distribution of a numerical variable across **four** groups? A. a back-to-back stem plot B. parallel boxplots C. a segmented bar chart D. a scatterplot
Show worked solution →

B. Parallel boxplots can show any number of groups side by side. A back-to-back stem plot only works for exactly two groups, a segmented bar chart is for two categorical variables, and a scatterplot is for two numerical variables.

core3 marks
A back-to-back stem plot shows the times (seconds) taken to complete a puzzle by 13 Year 7 students and 13 Year 12 students. Year 7: 34, 38, 41, 45, 47, 49, 52, 53, 56, 58, 61, 67, 72. Year 12: 22, 25, 28, 31, 33, 34, 36, 38, 39, 41, 44, 48, 55. (a) Find the median and IQR for each group. (b) Use the medians and IQRs to describe the association between year level and completion time.
Show worked solution →

(a) With 13 values, the median is the 7th value and each half has 6 values.

  • Year 7: median 52; Q1=41+452=43Q_1 = \frac{41 + 45}{2} = 43, Q3=58+612=59.5Q_3 = \frac{58 + 61}{2} = 59.5, IQR =16.5= 16.5.
  • Year 12: median 36; Q1=28+312=29.5Q_1 = \frac{28 + 31}{2} = 29.5, Q3=41+442=42.5Q_3 = \frac{41 + 44}{2} = 42.5, IQR =13= 13.

(2 marks)

(b) Completion time is associated with year level. The median time for Year 12 students (36 seconds) is 16 seconds less than for Year 7 students (52 seconds), and Year 12 times are also slightly less variable (IQR 13 seconds compared with 16.5 seconds). (1 mark)

core2 marks
For the puzzle data in the previous question, what percentage of Year 12 students took less time than the median Year 7 student? Explain using the display.
Show worked solution →

The Year 7 median is 52 seconds. In the Year 12 data, 12 of the 13 values (all except 55) are less than 52. (1 mark)

1213×100%≈92%\frac{12}{13} \times 100\% \approx 92\% of Year 12 students were faster than the median Year 7 student. (1 mark) Counting leaves in the stem plot gives this exactly; with only a boxplot you could say "more than 75%75\%", because Q3=42.5<52Q_3 = 42.5 < 52.

core2 marks
Parallel boxplots of monthly rainfall (mm) at two towns have almost identical medians (62 mm and 64 mm), but town A has an IQR of 18 mm and town B has an IQR of 55 mm. Is there an association between town and monthly rainfall? Explain.
Show worked solution →

There is some association, but only in spread, not in centre. The typical (median) rainfall is about the same at both towns, so knowing the town tells you little about the typical rainfall. (1 mark) However, town B's rainfall is far more variable (IQR 55 mm against 18 mm), so knowing the town does tell you how predictable the rainfall is. (1 mark)

In VCAA questions, an association is usually judged mainly on differences in median; a difference in spread alone should be described carefully.

exam3 marks
The five-number summaries for daily steps (thousands) are: car 3.1, 4.8, 5.9, 7.4, 13.0; public transport 4.5, 6.9, 8.2, 9.6, 12.4; walk or cycle 7.2, 10.1, 11.8, 13.5, 16.0. (a) Show that the car group has an outlier. (b) Write a report that describes the association between commuting mode and daily steps, referring to median and IQR.
Show worked solution →

(a) Car: IQR =7.4−4.8=2.6= 7.4 - 4.8 = 2.6; upper fence =7.4+1.5×2.6=11.3= 7.4 + 1.5 \times 2.6 = 11.3. The maximum, 13.0, is above 11.3, so it is an outlier. (1 mark)

(b) "Daily step count is associated with commuting mode. The median step count increases from 5.9 thousand for car commuters, to 8.2 thousand for public transport users, to 11.8 thousand for walkers and cyclists. The spread also increases slightly: the IQR is 2.6 thousand for car commuters, 2.7 thousand for public transport users and 3.4 thousand for walkers and cyclists." (2 marks: 1 for comparing all three medians with values, 1 for the IQR comparison with values.)

Quoting the actual values is what earns the marks.

exam2 marks
Parallel dot plots show goals scored per game by two netball teams over 10 games. Team A: 0, 1, 1, 2, 2, 2, 3, 3, 4, 5. Team B: 1, 2, 2, 3, 3, 3, 4, 4, 5, 6. (a) Compare the two distributions. (b) Explain why the shapes of the plots support using the median to compare them.
Show worked solution →

(a) Team B's distribution is the same shape as Team A's, shifted up by exactly one goal: median 3 for B against 2 for A, identical ranges (5) and identical IQRs (2). Team B tends to score one more goal per game. (1 mark)

(b) Both distributions are slightly positively skewed (a tail towards the higher scores), so the median is a better measure of the typical score than the mean, which is pulled towards the tail. (1 mark)

Practise this

Sources & how we know this

ExamExplained