Two-way tables, segmented bar charts and categorical association: VCE General Mathematics Unit 3 Data analysis
“Construct and interpret frequency tables and two-way (contingency) frequency tables, percentage them by the explanatory variable, display them with percentage segmented bar charts, and use them to identify and describe associations between two categorical variables”
Put the data in a two-way table, then percentage within each category of the explanatory variable: column percentages if it is across the top, row percentages if it is down the side. Show the result as a percentage segmented bar chart with one bar per explanatory category. If the percentages (segments) differ noticeably between the categories, the variables are associated; if they are about the same, they are not. Always write the conclusion with one percentage from each group for the same response category, and never claim cause.
What this dot point is asking
This is the categorical half of the Study Design's "Investigating associations between two variables" topic: "contingency (two-way) frequency tables, their associated bar charts (including percentage segmented bar charts) and their use in identifying and describing associations between two categorical variables". It also relies on the single-variable skills from Investigating data distributions: "data tables, two-way frequency tables and their associated segmented bar charts".
You need to:
- build a frequency table (with percentages) for one categorical variable;
- build and read a two-way table, including its row and column totals;
- decide which variable is explanatory and percentage within its categories;
- draw and read a percentage segmented bar chart;
- write an association statement that quotes appropriate percentages.
These are early, high-scoring questions, but one detail keeps costing marks: which total to divide by. In 2023 Examination 2 Question 2b(ii), only half the cohort earned both marks for the "compare two appropriate percentages" sentence.
(When one variable is numerical, such as reaction time by age group, the tools are parallel boxplots and back-to-back stem plots; they have their own page.)
The answer
Categorical data and frequency tables
A categorical variable places each person or object into a group. It is nominal if the groups have no order (colour, sport) and ordinal if they do (small, medium, large). A frequency table lists each category, its count and usually its percentage:
Always include the total row (it was required in 2023 Examination 2 Question 2a). One categorical variable is displayed by a bar chart, or by a single percentage segmented bar that stacks the categories to .
Two-way (contingency) tables
A two-way frequency table cross-classifies the same people by two categorical variables. Each cell counts one combination; the margins hold the row totals, column totals and the grand total.
| Transport | Year 7 | Year 12 | Total |
|---|---|---|---|
| walk | 48 | 28 | 76 |
| car | 72 | 42 | 114 |
| bus | 40 | 70 | 110 |
| Total | 160 | 140 | 300 |
Three different questions use three different totals:
- "What percentage of Year 12 students catch the bus?" uses the Year 12 total: .
- "What percentage of bus users are in Year 12?" uses the bus total: .
- "What percentage of all students are Year 12 bus users?" uses the grand total: .
The words straight after "of" name the group you divide by.
Which way to percentage
To investigate whether the response depends on the explanatory variable, compare the distribution of the response within each explanatory category. So:
- if the explanatory variable is across the columns, use column percentages (each column adds to );
- if it is down the rows, use row percentages (each row adds to ).
VCAA often puts the explanatory variable in the columns, but not always: in 2025 Examination 1 Question 7 gender was in the rows, so "the percentage of female buyers" used the female row total, 105. Decide from the context, not the layout.
Why percentages at all? The groups are rarely the same size. Farm A had 44 large oysters and farm B had 46, yet farm A's rate of large oysters () was clearly higher than farm B's (), because farm B's sample was bigger.
Percentage segmented bar charts
A percentage segmented bar chart draws one bar for each category of the explanatory variable. Every bar has height and is divided into segments for the response categories, with a key.
Read it by comparing matching segments across the bars:
- Association: the segments differ noticeably between the bars. Here bus use doubles from to while car travel falls from to .
- No association: the bars look (almost) the same, because the response is distributed the same way in every group.
A side-by-side bar chart of the same percentages carries the same information. A bar chart of raw counts can mislead when the groups differ in size.
Writing an association statement
Examiners want a conclusion supported by evidence. A complete statement:
- says whether there is an association (or answers the specific claim with "yes" or "no");
- quotes two percentages for the same response category, one from each group;
- states which is larger, in context.
For the transport data: "Yes, transport mode is associated with year level: of Year 12 students catch the bus to school, compared with of Year 7 students."
There is no fixed cut-off for "noticeably different": against is clearly an association; against is not. When the difference is small, say so and conclude that there is little or no association.
An association between categorical variables is not evidence of causation. The Year 12 students may catch the bus because of where they live, what subjects they take, or their age, not because of their year level as such.
Column percentages and an association
Use the transport table above.
- Step 1: decide the explanatory variable
- The question is whether transport depends on year level, so year level (the columns) is explanatory.
- Step 2: column percentages
- Year 7: walk , car , bus . Year 12: walk , car , bus . Each column adds to .
- Step 3: compare and conclude
- The percentages differ noticeably, so transport mode is associated with year level. Evidence: of Year 12 students catch the bus compared with of Year 7 students.
Row percentages when the explanatory variable is in the rows
Use the 2025 car colour table (female: black 28, silver 42, white 35; male: black 55, silver 32, white 42).
- Step 1: find the group totals
- Gender is explanatory and is in the rows: female , male .
- Step 2: row percentages
- Female: black , silver , white . Male: black , silver , white .
- Step 3: conclude
- Preferred colour is associated with gender: of female buyers prefer silver compared with of male buyers (or of male buyers prefer black compared with of female buyers). White is not useful evidence here, as and are almost equal.
Recognising no association
A school records handedness by gender. Female: 12 left-handed out of 120. Male: 16 left-handed out of 150.
- Step 1: percentages within gender
- Female left-handed; male left-handed.
- Step 2: compare
- The percentages differ by less than one percentage point.
- Answer
- There is no clear association between handedness and gender in this sample: about of each group is left-handed. The larger count of left-handed males (16 against 12) is only because there are more males.
Completing a table from partial information
A table of 200 people shows whether they exercise (yes/no) by age group. Under 40: 110 people, of whom exercise. Overall, 102 people exercise.
- Step 1: fill the known column
- Under 40 who exercise: ; do not: .
- Step 2: use the totals
- 40 and over: people, of whom exercise and do not.
- Step 3: percentage and conclude
- 40 and over: exercise, against of under-40s. Exercising is associated with age group: of people under 40 exercise compared with of people aged 40 and over.
- Dividing by the wrong total
- "Of the female buyers" means divide by the number of female buyers. The grand total or the other variable's total answers a different question.
- Always using column percentages
- Percentage by the explanatory variable, wherever it sits in the table.
- Comparing counts instead of percentages
- Unequal group sizes make counts misleading (44 large oysters at farm A against 46 at farm B hides a against difference).
- An association statement without numbers
- Quote one percentage from each group for the same response category and say which is higher.
- Mixing response categories in the evidence
- " of Year 12 catch the bus but of Year 7 go by car" compares different things.
Leaving out the total in a frequency table, or writing tally marks instead of counts.
Claiming cause. An association in a two-way table does not show that one variable causes the other.
Before calculating, underline the words after "percentage of" to find the denominator. For "does the information support..." questions, begin with "Yes" or "No", then give the two percentages (rounded as instructed) in one sentence that names both groups. For a segmented bar chart, draw each bar to , stack the segments in the same order as the key, and label the axis "percentage (%)".
When both things you are recording are categories (like year level and how students get to school), put the counts in a table. Because the groups are usually different sizes, turn each group's counts into percentages of that group. If the percentages look different from group to group (half of Year 12 take the bus but only a quarter of Year 7 do), the two things are linked. If the percentages are about the same, they are not. Being linked does not mean one causes the other.
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-style2 marksA sample of car buyers gave their preferred car colour. Female: black 28, silver 42, white 35. Male: black 55, silver 32, white 42. (Question 7) The percentage of female car buyers whose preferred car colour is silver is closest to A. 33% B. 40% C. 42% D. 57%. (Question 8) Which one of the following is the most appropriate way to graphically display the data in the table? A. a histogram B. a back-to-back stem plot C. parallel boxplots D. a segmented bar chartShow worked answer →
Question 7. "Of the female car buyers" means the denominator is the female total, which here is a row total: . Then : option B ( correct). Option D () is , which wrongly divides by the silver total (the percentage of silver-preferring buyers who are female), and option C just copies the count 42.
Question 8. Both variables (gender and preferred colour) are categorical, so the display is a segmented bar chart, one bar per gender with segments for the colours: option D ( correct). Histograms, stem plots and boxplots all need a numerical variable.
Source: VCAA 2025 General Mathematics Examination 1, Questions 7 and 8, and the 2025 examination report.
2023 VCAA-style5 marks(a) The sizes of 20 oysters were: small small large medium medium medium large small medium medium small medium small small medium medium medium medium small large. (i) Complete a frequency table (number and percentage) for size. (ii) Use the percentages to construct a percentage segmented bar chart. (b) An oyster farmer's two farms gave: Farm A small 42, medium 124, large 44 (total 210); Farm B small 114, medium 160, large 46 (total 320). (i) Calculate the percentage of the total number of oysters graded as large, to the nearest whole number. (ii) The farmer believes farm A has a greater capacity to grow larger oysters than farm B. Does the information support her belief? Explain by comparing two appropriate percentages, rounded to the nearest whole number.
Show worked answer →
(a)(i) Tally the 20 values: small 7, medium 10, large 3. Percentages: , , , total 20 and . (1 mark; . Tally marks instead of numbers, or a missing total, were not accepted.)
(a)(ii) A single bar to : small from 0 to 35, medium from 35 to 85, large from 85 to 100, shaded to match the key. (1 mark; .)
(b)(i) Large oysters overall: out of , so . (1 mark; .)
(b)(ii) Yes. The percentage of large oysters at farm A is , which is greater than the percentage of large oysters at farm B, . (2 marks; scored both.) The report stressed answering the question explicitly and saying which percentage is higher. Comparing the counts 44 and 46 would suggest the opposite, because the farms' sample sizes differ.
Source: VCAA 2023 General Mathematics Examination 2, Question 2, and the 2023 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 marksA survey records whether 250 adults own a pet (yes/no) and their housing type (house/apartment). (a) Which variable is explanatory and which is the response, if the question is whether pet ownership depends on housing type? (b) Are these variables nominal or ordinal?
Show worked solution →
(a) Housing type is the explanatory variable (it may explain or predict pet ownership); pet ownership is the response variable. (1 mark)
(b) Both are nominal: their categories are names with no natural order. (1 mark)
foundation2 marksOf 80 students, 28 chose soccer, 20 chose basketball, 24 chose netball and 8 chose tennis as their favourite sport. Construct a frequency table with a percentage column.
Show worked solution →
| Sport | Number | Percentage (%) |
|---|---|---|
| soccer | 28 | 35 |
| basketball | 20 | 25 |
| netball | 24 | 30 |
| tennis | 8 | 10 |
| Total | 80 | 100 |
Each percentage is number . (1 mark for the numbers and total, 1 mark for the percentages.)
core3 marksA two-way table shows whether 300 workers work from home (WFH) at least one day a week, by age group. Under 35: 90 WFH out of 150. 35 and over: some values are missing. Overall, 165 of the 300 workers WFH. (a) Complete the table, with counts for both groups. (b) Find the percentage of each age group who WFH. (c) Is working from home associated with age group? Justify.
Show worked solution →
(a) 35 and over: workers, of whom WFH and do not. Under 35: do not.
| Under 35 | 35 and over | Total | |
|---|---|---|---|
| WFH | 90 | 75 | 165 |
| Not WFH | 60 | 75 | 135 |
| Total | 150 | 150 | 300 |
(1 mark)
(b) Under 35: . 35 and over: . (1 mark)
(c) Yes: of workers under 35 work from home at least one day a week, compared with of workers aged 35 and over, so working from home is associated with age group. (1 mark)
core2 marksA percentage segmented bar chart shows owners' satisfaction (satisfied, neutral, dissatisfied) for two phone brands. Brand X: 62%, 23%, 15%. Brand Y: 61%, 24%, 15%. A student says the chart shows an association between brand and satisfaction because the bars are different colours. Is the student right?
Show worked solution →
No. Association is shown by the segments differing between the bars, not by colour. Here the percentages are almost identical ( and satisfied, and neutral, and dissatisfied), so there is no association: satisfaction does not depend on brand. (2 marks: 1 for "no", 1 for quoting the near-equal percentages.)
exam3 marksA study of 520 patients recorded treatment type (new, standard) and outcome (improved, no change, worse). New: 168, 52, 20 (total 240). Standard: 140, 98, 42 (total 280). (a) Calculate the percentages needed to compare the outcomes of the two treatments, correct to one decimal place. (b) Write a sentence describing the association, quoting two appropriate percentages. (c) Explain why comparing the counts 168 and 140 alone would be poor practice.
Show worked solution →
(a) Percentage within each treatment (the explanatory variable):
| New | Standard | |
|---|---|---|
| improved | ||
| no change | ||
| worse |
(1 mark)
(b) Outcome is associated with treatment: of patients on the new treatment improved, compared with of patients on the standard treatment. (1 mark) (Comparing the "worse" percentages, and , is also acceptable.)
(c) The groups are different sizes (240 and 280), so counts are not comparable: the standard group could have more patients in every category just because it is larger. Percentages put both groups on the same base of 100. (1 mark)
exam2 marksIn the treatment study above, a student calculates that of the patients who improved were on the new treatment () and says this shows the new treatment works only slightly better than the standard one. Explain the error.
Show worked solution →
The student has percentaged by the response (improved), not the explanatory variable (treatment). answers "of those who improved, what fraction had the new treatment?", which also depends on how many patients were given each treatment. (1 mark)
To compare the treatments, percentage within each treatment: of new-treatment patients improved against of standard-treatment patients, a difference of 20 percentage points. (1 mark)
Practise this
Sources & how we know this
- VCE General Mathematics Examination 2 (2023) and examination report — VCAA (2023)
- VCE General Mathematics Examination 1 (2025) and examination report — VCAA (2025)
- VCE Mathematics Study Design: General Mathematics (from 2023) — VCAA
- VCE General Mathematics: examination specifications, past examinations and reports — VCAA