topic badge
CanadaON
Grade 8

5.03 Two-way tables and further bar charts

Lesson

Two-way tables allow us to display and examine the relationship between two sets of categorical data. The categories are labelled at the top and the left side of the table, and the frequency of the different combinations of characteristics appear in the interior of the table. Often the totals of each row and column also appear.

The following two-way table was made by surveying $100$100 people. They were asked two questions, if they are right or left-handed and if they are male or female, the results are as follows:

  Right-handed Left-handed Total
Male 43 9 52
Female 44 4 48
Total: 87 13 100

Note: The sum of the row totals equals the sum of the column totals and is the total number surveyed.

It's called a two-way table because we can read information from it in two directions. Here we have information about the two categories "gender" and "handedness". If read across each row, we can tell how many of each gender surveyed are right or left-handed. If we read down each column, we can tell how many of the right or left-handed people surveyed were male and how many were female. 

Where a particular row and column overlap, these are how many people satisfy both categories. For example, there were $9$9 left-handed males surveyed.

Worked example

The following are the statistics of the passengers and crew who sailed on the RMS Titanic on its fateful maiden voyage in 1912. 

  First Class Second Class Third Class Crew Total
Survived $202$202 $118$118 $178$178 $212$212 $710$710
Died $123$123 $167$167 $\editable{}$ $696$696 $1514$1514
Total: $325$325 $285$285 $\editable{}$ $908$908 $\editable{}$

(a) What is the estimated total number of passengers and crew on-board the ship?

Think: Adding the totals in the final column will give the total number of people on-board the ship.

Do: 

Total passengers and crew $=$= $710+1514$710+1514
  $=$= $2224$2224

(b) Find the missing values in the "Third class" column.

Think: We now know the total number of passengers and crew which will also be the sum of the values in the last row. We can use this to find the missing value of "the total number of third class passengers". Once we have this we can use it to find the "number of third class passengers who died".

Do: 

Total third class passengers $=$= $2224-908-285-325$2224908285325
  $=$= $706$706
Third class passengers who died $=$= $\text{Total}-\text{survivors}$Totalsurvivors
  $=$= $706-178$706178
  $=$= $528$528

(c) What percentage of first class passengers survived?

Think: We need the fraction of first class survivors out of total number of first class passengers written as a percentage.

Do:

Percentage first class passengers that survived $=$= $\frac{\text{first class survivors}}{\text{total number first class passengers}}\times100%$first class survivorstotal number first class passengers×100%
  $=$= $\frac{202}{325}\times100%$202325×100%
  $\approx$ $62.2%$62.2%

(d) What percentage of total passengers and crew survived?

Think: We need the fraction of total survivors out of total number of passengers and crew written as a percentage.

Do:

Percentage passengers and crew that survived $=$= $\frac{\text{total survivors}}{\text{total number passengers and crew}}\times100%$total survivorstotal number passengers and crew×100%
  $=$= $\frac{710}{2224}\times100%$7102224×100%
  $\approx$ $31.9%$31.9%
Reflect: This type of table leads to examining if relationships exist between the categories. For example, for the given statistics above can you use supporting calculations to show that the survival rate is dependent on the class of the passenger?

 

Practice questions

QUESTION 1

Dave surveyed all the students in Year $12$12 at his school and summarised the results in the following table:

  Play netball Do not play netball Total
Height$\ge$$170$170 cm $46$46 $73$73 $119$119
Height$<$<$170$170 cm $20$20 $39$39 $59$59
Total $66$66 $112$112 $178$178
  1. What percentage of Year $12$12 students whose height is less than $170$170 cm play netball?

    Round your answer to two decimal places.

  2. What fraction of the students from Year $12$12 do not play netball?

 
Question 2

$150$150 tennis players were asked whether they would support equal prize money for the women’s and men’s draw.

  1.   Support Do not support
    Males $\editable{}$ $35$35
    Females $66$66 $12$12

    Find the missing value in the table.

  2. How many more players are there in support of equal prize money than those against it?

  3. What percentage of the male tennis players support equal prize money?

    Give your answer as a percentage to one decimal place if necessary.

QUESTION 3

$36$36 students were asked whether or not they were allergic to nuts and dairy. The two way table is provided below.

  Allergic to nuts Not allergic to nuts
Allergic to dairy $10$10 $6$6
Not allergic to dairy $6$6 $14$14
  1. How many students are allergic to nuts?

  2. How many students are allergic to nuts or dairy, or both?

  3. How many students are allergic to at most one of the two things?

 

Further Bar charts

A bar chart (or bar graph) is used to display categorical data with rectangular bars. The bars can be vertical (like the example above) or horizontal. The height or length of the bars are proportional to the values they represent. Bar charts are a popular choice because they are easy to create and interpret.

 

Horizontal bar chart

If the bars are horizontal, the graph is called a horizontal bar chart, or simply a bar chart. This type of chart can be useful if space restrictions make it difficult to display the bars vertically. It is also a better option for displaying long category labels.

Multiple-bar charts

Also known as clustered bar charts or grouped bar charts, these are useful for displaying information about different sub-groups within the main categories. Each sub-group is coloured or shaded differently to distinguish between them, and a legend is used to indicate the subgroup that each colour represents.

The data for a multiple-bar chart may come from a two-way table, like the one below. The table shows the amount (in kilotonnes) of various categories of waste in Australia that were either recycled or dumped into landfill. 

  Recycled Landfill TOTALS
Paper and cardboard $3361$3361 $2230$2230 $5591$5591
Plastics $334$334 $2182$2182 $2516$2516
Glass $612$612 $467$467 $1079$1079
Organics $7461$7461 $6710$6710 $14171$14171
TOTALS $11768$11768 $11589$11589 $23357$23357

Notice that the final row and column of the two-way table contain the totals for each row and column. The table above was used to create the side-by-side bar chart below. 

Notice that the vertical axis represents the percentage amount allocated to either recycling or landfill, rather than the actual amounts in kilotonnes. For example, the percentage of paper and cardboard that was recycled was calculated as follows:

Percentage of paper and cardboard recycled $=$= $\frac{3361}{5591}\times100$33615591×100    
  $=$= $60.114$60.114...    
  $=$= $60.1%$60.1%   (Rounded to 1 decimal place)

 

Stacked-bar charts

These are similar to Multiple-bar charts, in that they display information about sub-groups. In this case though, the bars are stacked on top of each other to form a single column. These charts are particularly good for displaying the percentage make-up of sub-groups within each category. Once again sub-groups are coloured or shaded differently and a legend is used to identify each sub-group.

 

Chart design

A chart is a presentation tool. Its whole purpose is to communicate information. For this reason, it must be clear to the person viewing it, what the information represents. 

  • The title communicates the purpose of the chart. It should include any information relevant to correctly interpreting the data, such as the time period represented, or the location from where the data was collected.
  • Each axes should be labelled, including relevant units if appropriate
  • The spacing used on the scale for each axis should be consistent across that axis
  • For a bar chart, ensure the bars are all the same width. Only the height's of the bars should differ in size, because the height represents the value of the data.
  • In a bar chart, it is common to have equal-width gaps between bars. The gaps indicate that the data is categorical. They help distinguish a bar chart from a similar-looking chart called a histogram, which has no gaps between the bars.

 

Practice questions

Question 4

Yuri surveyed a group of people about the type of jobs they had. He recorded the data in the following graph.

  1. Complete the two way table with the information.

      No Job Casual Part time Full time
    Men $\editable{}$ $\editable{}$ $\editable{}$ $\editable{}$
    Women $\editable{}$ $\editable{}$ $\editable{}$ $\editable{}$

 
Question 5

The following stacked bar chart shows different types of internet traffic to a website over a three month period. The vertical axis is the number of visits to the website.

  1. What was the total number of visits to the website in November?

    Give your answer to the nearest $100$100.

  2. During October, how many visitors to the website were new visitors?

  3. What proportion of traffic during October were returning visitors?

  4. Approximately how many new visitors visited the website during November? Give your answer to the nearest $100$100.

What is Mathspace

About Mathspace