Back to homeMathematics · High School Year 2 · Social Sciences · Change subject
Start for free
Prep 2 SS · Mathematics
Statistics · Statistics

Contingency Tables

Before you start, make sure you know: Bivariate distributions (High School Year 1 (semesters 1 and 2))
Before you start, make sure you know: Tables (Secondary Year 3)

At your school, students are asked whether they take the bus or walk, and also whether they live near or far. Do people who live far away use public transportation more? Two categorical variables, one question: does one influence the other, or are they independent? The contingency table helps you answer it.

Joint and marginal frequencies

Diagram of a contingency table with one joint cell highlighted, an extra column with the row totals, and an extra row with the column totals. n₁₁ joint marginals of row → column marginals ↑ N (total)
Practice★☆☆Not started
In a secondary school, a survey was conducted among the $100$ Year 12 students about their preferred extracurricular activity. The data have started to be organised in…

In a secondary school, a survey was conducted among the $100$ Year 12 students about their preferred extracurricular activity. The data have started to be organised in the following contingency table, but some values are missing.

Sport Music Total
Girls $35$ $55$
Boys $20$
Total $100$

Copy the table into your exercise book and complete it by finding the missing absolute frequencies.

Sport Music Total Girls Boys Total 35 55 20 100 ? ? ? ? ?
Solve
Practice★☆☆Not started
A video game shop registered its sales from this morning according to console type and game format. $12$ Nintendo Switch games were sold in physical format and $8$ in…

A video game shop registered its sales from this morning according to console type and game format. $12$ Nintendo Switch games were sold in physical format and $8$ in digital format. For the PlayStation 5, $15$ were sold in physical format and $10$ in digital format.

Organise this information in a two-way (contingency) table including the marginal frequencies (the total for each row and column).

Solve
Practice★☆☆Not started
A study has been carried out on the use of glasses in a class of $30$ students. We know that there are $16$ girls, of whom $4$ wear glasses. We also know that there are…

A study has been carried out on the use of glasses in a class of $30$ students. We know that there are $16$ girls, of whom $4$ wear glasses. We also know that there are $10$ students in total (boys and girls) who wear glasses.

Complete the contingency table and determine how many boys do not wear glasses.

Solve

Relative frequencies: to the total, by rows, by columns

Diagram of the three types of relative frequency in a contingency table: over the grand total, over the row total, and over the column total. Divide by what? ÷ N to the total ÷ row total by rows ÷ column total by columns each one answers a different question
Practice★☆☆Not started
A group of $50$ people were asked whether they regularly play sport and whether they are smokers. The results are shown in the following table: | | Plays sport | Does…

A group of $50$ people were asked whether they regularly play sport and whether they are smokers. The results are shown in the following table:

Plays sport Does not play sport Total
Smoker $5$ $15$ $20$
Non-smoker $25$ $5$ $30$
Total $30$ $20$ $50$

Calculate the table of joint relative frequencies. (Express each value as the result of dividing the absolute frequency by the sample total $N=50$).

Solve
Practice★☆☆Not started
Based on the following table on athletes and smokers, answer the following questions: | | Smokers | Non-smokers | | :--- | :---: | :---: | | Athletes | 10 | 30 | |…

Based on the following table on athletes and smokers, answer the following questions:

Contingency table with marginal frequencies for Athletes and SmokersContingency table: Athletes vs. SmokersSmokersNon-smokersTotalAthletes1030?Total (a)Non-athletes2535—Total—?Total (b)NTotalPart a) AthletesMarginal frequency and % of the totalPart b) Non-smokersMarginal frequency and % of the total
Smokers Non-smokers
Athletes 10 30
Non-athletes 25 35
  1. a) What is the marginal frequency of "Athletes"? What percentage of the total do they represent?
  2. b) What is the marginal frequency of "Non-smokers"? What percentage of the total do they represent?
Solve
Practice★☆☆Not started
Given the following relative frequency table about reading habits and library use: | | Reads a lot | Reads little | Total | |---|---|---|---| | Uses the library | $0.25$…

Given the following relative frequency table about reading habits and library use:

Reads a lot Reads little Total
Uses the library $0.25$ $0.05$ $0.30$
Doesn't use the library $0.15$ $0.55$ $0.70$
Total $0.40$ $0.60$ $1.00$

If the total sample is $200$ people, calculate how many people belong to the category of those who "Read a lot" and "Don't use the library". Write the complete operation and the numerical result.

Solve
Practice★★☆Not started
A video game company wants to know whether the type of console users own is related to their subscription to premium services. $300$ users are analyzed: | Subscription |…

A video game company wants to know whether the type of console users own is related to their subscription to premium services. $300$ users are analyzed:

Subscription Console A Console B Console C
Premium $45$ $60$ $15$
Basic $75$ $90$ $15$

a) Obtain the table of relative frequencies conditioned by columns (type of console).

b) Based on the results of the previous part, on which console is it most common to find a user with a Premium subscription?

c) Represent the distribution of the subscription by type of console using a stacked bar chart.

You can do it on paper and send a photo with your answer.

Solve

Conditional frequencies

Comparison between the conditional and marginal frequency of public transportation to check for dependence. P(public | city) = 40/60 ≠ P(public) = 50/100 conditional 0.67 marginal 0.50 they don't match → there is dependence
Practice★☆☆Not started
A courier company analyses the mode of transport used by its workers according to their place of residence: | | Lives in city | Lives outside | Total | |---|---|---|---|…

A courier company analyses the mode of transport used by its workers according to their place of residence:

Lives in city Lives outside Total
Public Transport $40$ $10$ $50$
Own Vehicle $20$ $30$ $50$
Total $60$ $40$ $100$

If we randomly choose a worker who lives in the city, what is the relative frequency that they use public transport? (Calculate the conditional frequency).

Solve
Practice★☆☆Not started
A movie theater analyzes popcorn preference (salted or sweet) according to movie type (animation or horror). | | Animation | Horror | Total | |---|---|---|---| | Salted…

A movie theater analyzes popcorn preference (salted or sweet) according to movie type (animation or horror).

Animation Horror Total
Salted $24$ $36$ $60$
Sweet $56$ $16$ $72$
Total $80$ $52$ $132$

Look at the table and answer:

  1. a) What is the majority preference (mode) among viewers of animation movies?
  2. b) What percentage of viewers who prefer sweet popcorn went to see a horror movie?
Solve
Practice★★☆Not started
To investigate the relationship between using Artificial Intelligence (AI) to do homework and academic performance, $150$ students were surveyed. The data show that $60$…

To investigate the relationship between using Artificial Intelligence (AI) to do homework and academic performance, $150$ students were surveyed. The data show that $60$ students use AI frequently, of which $15$ have excellent marks. On the other hand, of the students who do not use AI, $45$ have excellent marks.

a) Construct the table of relative frequencies with respect to the total.

b) Calculate the distribution of the variable "AI use" conditional on having "Excellent marks".

c) Can we state that the variables are independent? Justify your answer by comparing a joint relative frequency with the product of the corresponding marginal frequencies.

You can do it on paper and send a photo with your answer.

Solve

Independence between variables

Number line from 0 to 40 percent locating the rural conditional frequency (10), the marginal (30), and the urban conditional (40) to illustrate dependence. 0 % 10 % 30 % 40 % rural marginal urban far from the marginal in both cases → dependence
Practice★★☆Not started
In a study on digital content consumption among 200 teenagers, the preferred platform for watching series and movies was analyzed according to the main access device.…

In a study on digital content consumption among 200 teenagers, the preferred platform for watching series and movies was analyzed according to the main access device. The data collected are as follows: 65 mainly use their cell phone (of which 40 prefer TikTok and the rest Netflix), 85 use a computer (50 prefer Netflix and the rest YouTube), and 50 use a Smart TV (35 prefer Netflix and the rest YouTube).

a) Organize the information into a contingency table of absolute frequencies relating the variables "Device" and "Platform".

b) Calculate the marginal frequencies of each variable.

c) What percentage of the total number of teenagers prefers Netflix?

Device TikTok Netflix YouTube Total Cell phone Computer Smart TV Total 40 25 (65-40) 0 65 0 50 35 (85-50) 85 0 35 15 (50-35) 50 ? ? ? 200 Given data Deduced data To calculate (Marginal)
Solve
Practice★★☆Not started
A study was conducted on the preference for type of diet (Omnivorous or Vegetarian) depending on the area of residence (Urban or Rural). The following data were…

A study was conducted on the preference for type of diet (Omnivorous or Vegetarian) depending on the area of residence (Urban or Rural). The following data were obtained:

Residence Omnivorous Vegetarian Total
Urban $120$ $80$ $200$
Rural $90$ $10$ $100$
Total $210$ $90$ $300$

a) Calculate the row relative frequency table.

b) Is there a dependency between the area of residence and the type of diet? Compare the conditional distributions of diet for urban and rural residents.

c) What value should the frequency of "Rural-Vegetarian" have for the variables to be independent, maintaining the marginal totals for residence?

Solve
Practice★★☆Not started
A high school wants to analyze whether the use of public transportation to travel to school depends on the distance from the school. $120$ students are classified as…

A high school wants to analyze whether the use of public transportation to travel to school depends on the distance from the school. $120$ students are classified as "Near" ($< 2$ km) and "Far" ($\geq 2$ km).

a) Complete the table knowing that $25\%$ of the students live near, and that of the students who live far, $80\%$ use public transportation. Furthermore, no students living near use public transportation.

b) Obtain the relative frequency table with respect to the total.

c) Calculate the relative frequency of "living far" given "not using public transportation".

Transportation Distance Public Other Total Near Far Total ? ? ? ? ? ? ? ? 120
Solve

Back to the beginning: to find out whether living far away influences using public transportation, compare the frequency of using it among those who live far away with the frequency of using it in the whole group. If they match, the variables are independent; if they differ, there is an association.

Summary

See all the exercises in this section