Back to homeMathematics · Algebra 2 · Change subject
Start for free
Algebra 2 · Mathematics
Statistics · Statistics

Two-Way Tables

Before you start, make sure you know: Tables (Math 8 (Pre-Algebra))

Emma asks 200 juniors two yes/no questions: "Do you have a part-time job?" and "Do you play a varsity sport?" Both are categories, not numbers, so there is no scatter plot to draw. She still wants to know: if you tell me a student has a job, do I know anything new about whether they play a sport? A two-way table organizes this kind of data and gives you the tools to answer that question.

Joint and Marginal Frequencies

A two-way table with one joint frequency cell, the marginal totals, and the grand total highlighted in different colors. SportsMusicTotal 422870 362460 7852130 Grade 11Grade 12Total Joint frequency (one cell inside the table) Marginal frequencies (row and column totals) Grand total N (sample size)

Missing numbers are easy to find because every row and every column must add up to its total. Fill in whatever has only one unknown, then repeat.

Practice★☆☆Not started
In a high school, a survey has been carried out among the $100$ 11th grade students about their preferred social network. The data have started to be organized in the…

In a high school, a survey has been carried out among the $100$ 11th grade students about their preferred social network. The data have started to be organized in the following contingency table, but some values are missing.

Instagram TikTok Total
Girls $35$ $55$
Boys $20$
Total $100$

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

Instagram TikTok Total Girls Boys Total 35 55 20 100 ? ? ? ? ?
Solve
Practice★☆☆Not started
A video game store has recorded the sales from the last morning according to the type of console and the game format. $12$ Nintendo Switch games were sold in physical…

A video game store has recorded the sales from the last morning according to the type of console and the 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.

Organize this information into a two-way table (contingency) including the marginal frequencies (the totals for each row and column).

Solve
Practice★★☆Not started
In a study on digital content consumption among 200 teenagers, the preferred platform for watching shows and movies according to the main access device has been…

In a study on digital content consumption among 200 teenagers, the preferred platform for watching shows and movies according to the main access device has been analysed. The data collected are as follows: 65 mainly use a mobile 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) Organise the information into an absolute frequency contingency table relating the variables "Device" and "Platform".

b) Calculate the marginal frequencies of each variable.

c) What percentage of the total teenagers prefer Netflix?

Device TikTok Netflix YouTube Total Mobile Computer Smart TV Total 40 25 (65-40) 0 65 0 50 35 (85-50) 85 0 35 15 (50-35) 50 ? ? ? 200 Direct data Deduced data To calculate (Marginal)
Solve

Building a Table from Counts and Percents

Often a problem gives you percents instead of counts. The key rule: a percent of a group means a percent of that group's total, not of $N$.

A tree diagram splitting 800 students into bus riders and non-riders, then into band members and non-members, with counts and percents. 800 total Bus: 440 (55%) No bus: 360 (45%) Band: 88 (20%) Not band: 352 (80%) Band: 108 (30%) Not band: 252 (70%)
Practice★☆☆Not started
A study has been carried out on the use of glasses in a class of $30$ students. We know there are $16$ girls, of which $4$ wear glasses. We also know that in total there…

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

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

Solve
Practice★★☆Not started
In a sports club, $60\%$ of the members are men and $40\%$ are women. It is known that $30\%$ of the men swim, while $55\%$ of the women swim. The rest of the members…

In a sports club, $60\%$ of the members are men and $40\%$ are women. It is known that $30\%$ of the men swim, while $55\%$ of the women swim. The rest of the members play tennis.

a) If the club has a total of $500$ members, construct the absolute frequency contingency table.

b) Calculate the marginal relative frequency of the members who play tennis.

c) What is the majority profile in the club (combination of gender and sport)?

Solve
Practice★★☆Not started
A high school wants to analyze whether the use of public transportation to go to class depends on the distance to the school. $120$ students are classified into "Near"…

A high school wants to analyze whether the use of public transportation to go to class depends on the distance to the school. $120$ students are classified into "Near" ($< 2$ miles) and "Far" ($\geq 2$ miles).

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 student who lives near uses public transportation.

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

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

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

Relative Frequencies: Total, Row, Column

A relative frequency is a count divided by a total: $\text{relative frequency} = \dfrac{\text{count}}{\text{total}}$. In a two-way table you can divide by three different totals, and each one answers a different question.

Three boxes showing the three possible denominators for relative frequencies: the grand total, the row total, and the column total. Divide by what? ÷ Ngrand total ÷ row totalrelative to rows ÷ column totalrelative to columns each one answersa different question
Practice★☆☆Not started
A group of $50$ people have been asked if they play sports regularly and if they are smokers. The results are shown in the following table: | | Athlete | Non-athlete |…

A group of $50$ people have been asked if they play sports regularly and if they are smokers. The results are shown in the following table:

Athlete Non-athlete Total
Smoker $5$ $15$ $20$
Non-smoker $25$ $5$ $30$
Total $30$ $20$ $50$

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

Solve
Practice★☆☆Not started
From the previous table about athletes and smokers, answer the following questions: a) What is the marginal frequency of "Athletes"? What percentage do they represent of…

From the previous table about athletes and smokers, answer the following questions:

  1. a) What is the marginal frequency of "Athletes"? What percentage do they represent of the total?
  2. b) What is the marginal frequency of "Non-smokers"? What percentage do they represent of the total?
Marginal Frequencies and Percentages Contingency table: Athletes vs. Smokers + = + = Smokers Non-smokers Total Athletes Non-athletes Total n11 n12 n21 n22 ... ... Frec = ? % = ? Frec = ? % = ? N a) % Deportistas = ( Frecuencia Marginal / N ) × 100 b) % No Fumadores = ( Frecuencia Marginal / N ) × 100
Solve
Practice★☆☆Not started
Given the following relative frequency table on reading habits and the use of libraries: | | Reads a lot | Reads little | Total | |---|---|---|---| | Uses Library |…

Given the following relative frequency table on reading habits and the use of libraries:

Reads a lot Reads little Total
Uses Library $0,25$ $0,05$ $0,30$
Does not use 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 "Do not use the library".

Reads a lot Reads little Total Uses Library Does not use Library Total 0.25 0.05 0.30 0.15 0.55 0.70 0.40 0.60 1.00 0.15 Relative Freq. × 200 Total (N) = 30 People
Solve

Conditional Relative Frequency

A two-way table of grade group and platform preference with the 9th-10th grade row highlighted, showing that its total is the denominator for the conditional frequency. YouTubeTwitchTotal 7248120 305080 10298200 9th–10th11th–12thTotal P(YouTube | 9th–10th) = 72 ÷ 120 = 0.60 The highlighted row total is the new "whole."

When a question asks for the most common category within a group (the mode), look only inside that group's row or column and pick the biggest count.

Practice★☆☆Not started
In a courier company, the mode of transportation used by its workers is analyzed according to their place of residence: | | Lives in city | Lives outside | Total |…

In a courier company, the mode of transportation used by its workers is analyzed according to their place of residence:

Lives in city Lives outside Total
Public Transportation $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 transportation? (Calculate the conditional frequency).

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

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

Animation Horror Total
Salty $24$ $36$ $48$
Sweet $56$ $16$ $72$
Total $80$ $52$ $132$

Observe the table and answer:

  1. a) What is the majority preference (mode) among viewers of animated movies?
  2. b) What percentage of viewers who prefer sweet popcorn have gone to see a horror movie?
Solve
Practice★★☆Not started
A survey has been carried out among the students of a school about their favorite extracurricular activity (Sports or Music), differentiated by educational level (Grade…

A survey has been carried out among the students of a school about their favorite extracurricular activity (Sports or Music), differentiated by educational level (Grade $1^\circ$ or $2^\circ$). The results are shown in the following incomplete table:

Year Sports Music Total
Grade $1^\circ$ $42$ $70$
Grade $2^\circ$ $24$
Total $78$ $130$

a) Complete the missing values in the contingency table.

b) If we choose a student at random from $2^\circ$ of high school, what is the probability that their favorite activity is Sports?

c) Among the students who prefer Music, what percentage belongs to $1^\circ$ of high school?

Solve

Comparing Conditional Distributions

To compare groups of different sizes, don't compare counts. Compare conditional distributions: for each group (each row, say), find the relative frequency of every category within that row. A segmented bar graph draws each group as one bar of the same length (100%), cut into pieces.

Two segmented bars comparing the share of YouTube and Twitch fans in 9th-10th grade and in 11th-12th grade, with a dashed line at the overall 51 percent YouTube share. Prefers YouTube Prefers Twitch 9th–10th 60%40% 11th–12th 37.5%62.5% all students: 51% YouTube

Choose the direction that fits the question. To ask "how does the subscription depend on the console?" make one bar per console (relative to columns, if consoles are the columns). To ask the reverse, make one bar per subscription type.

Practice★★☆Not started
A video game company wants to know if 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 if 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) Find the relative frequency table conditional on columns (type of console).

b) In light of the results from the previous section, on which console is it most frequent to find a user with a Premium subscription?

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

100% 75% 50% 25% 0% 62.5% 37.5% 60% 40% 50% 50% Console A Console B Console C Premium Basic
Solve
Practice★★☆Not started
The reading habits of a group of people are analyzed according to their level of education. The data are presented in this relative frequency table with respect to the…

The reading habits of a group of people are analyzed according to their level of education. The data are presented in this relative frequency table with respect to the total sample:

Education Reads daily Reads occasionally Does not read
High School $0,12$ $0,18$ $0,10$
College $0,25$ $0,20$ $0,05$

a) Calculate the marginal relative frequencies of the variable "Education".

b) If we know that a person never reads, what is more probable: that they have a high school or college education? Reason by comparing the corresponding conditional frequencies.

c) If the total sample were $400$ people, how many of them would be college educated and read occasionally?

Solve

Association and Independence

Back to Emma's question. If knowing one category tells you nothing new about the other variable, we say the variables are independent. If it does tell you something, there is an association between them.

Two identical segmented bars for 11th and 12th grade, each with 25 percent coffee drinkers, matching the dashed overall line, which illustrates independence. Coffee before school No coffee 11th grade 25%75% 12th grade 25%75% all students: 25%

The YouTube/Twitch table is different. There the conditional values $0.60$ and $0.375$ are far from the marginal $0.51$, so grade group and platform are associated.

Practice★★☆Not started
A study has been carried out on the preference for diet type (Omnivorous or Vegetarian) depending on the area of residence (Urban or Rural). The following data have been…

A study has been carried out on the preference for diet type (Omnivorous or Vegetarian) depending on the area of residence (Urban or Rural). The following data have been obtained:

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

a) Calculate the relative frequency table by rows.

b) Is there a dependence 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
To investigate the relationship between the use of Artificial Intelligence (AI) for homework and academic performance, $150$ students have been surveyed. The data show…

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

a) Construct the relative frequency table with respect to the total.

b) Calculate the distribution of the variable "Use of AI" conditional on having "Excellent grades".

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

Solve
Practice★★★Not started
In a study on streaming music consumption among teenagers, two platforms ($A$ and $B$) and the account type (Free or Premium) are compared. The percentage data indicate:…

In a study on streaming music consumption among teenagers, two platforms ($A$ and $B$) and the account type (Free or Premium) are compared.

The percentage data indicate:

  • $60\%$ of users use platform $A$.

  • $70\%$ of users of platform $B$ have a Free account.

  • In the total sample, the percentage of Premium accounts is $40\%$.

  1. a) Calculate the percentage of users of platform $A$ who have a Premium account.
  2. b) If we choose a user with a Premium account, what is the probability that they belong to platform $B$?
  3. c) Determine if there is independence between the chosen platform and the account type. Justify numerically.
Solve

From Percent Clues to a Full Table

Harder problems give only conditional percents, or percents of a total you don't know yet. The plan is always the same: turn each clue into one cell or one total, and let the row and column sums fill the rest.

A tree diagram splitting 1,000 teens into iPhone and Android owners, then into Snapchat users and non-users, with counts and percents. 1,000 teens iPhone: 550 (55%) Android: 450 (45%) Snapchat: 385 (70%) No Snapchat: 165 (30%) Snapchat: 180 (40%) No Snapchat: 270 (60%)

Sometimes the percent is of a total you don't know yet. Call it $x$ (or use the clues to find it).

Practice★★★Not started
A study on the impact of social networks on the emotional well-being of 11th grade teenagers has classified a sample of 200 students according to their daily screen time…

A study on the impact of social networks on the emotional well-being of 11th grade teenagers has classified a sample of 200 students according to their daily screen time and their self-reported level of life satisfaction. The incomplete data obtained are as follows:

  • 40% of the total sample reports a "Low" life satisfaction.

  • Among those who use social networks for "More than 3 hours", 60% present a "Low" life satisfaction.

  • There are 50 students who use social networks for "Less than 1 hour", of which only 10% have a "Low" satisfaction.

  • The number of students with "High" satisfaction who use social networks for "Between 1 and 3 hours" is twice that of those with "High" satisfaction with "More than 3 hours".

  • In total, 70 students use social networks for "Between 1 and 3 hours".

From this information:

  1. a) Reconstruct the complete contingency table with the absolute frequencies.
  2. b) Calculate the distribution of the variable "Life Satisfaction" conditional on each of the levels of "Screen time".
  3. c) Can we state that the variables are independent? Justify your answer by comparing the conditional relative frequencies.
Use / Sat. Low High Total < 1 hour 1 - 3 hours > 3 hours Total 5 10% of 50 ? 50 ? 2x 70 ? 60% of the row x ? 80 40% of 200 ? 200 ×2
Solve
Practice★★★Not started
A health center is investigating the relationship between playing federated sports and the type of injuries suffered by young people. We have the following table of…

A health center is investigating the relationship between playing federated sports and the type of injuries suffered by young people. We have the following table of relative frequencies conditional on columns (type of sport):

Injury / Sport Basketball ($D_1$) Soccer ($D_2$) Athletics ($D_3$)
Muscular ($L_1$) $0,30$ $0,55$ $0,40$
Bone ($L_2$) $0,70$ $0,45$ $0,60$

If we know that $40\%$ of the young people in the sample play soccer, $35\%$ play basketball and the rest do athletics:

  1. a) Find the joint relative frequency table.
  2. b) Calculate the probability that a randomly chosen young person plays basketball given that they have suffered a bone injury.
  3. c) In which sport is it most probable to suffer a muscular injury? Does the answer change if we analyse the absolute frequencies with respect to the total population? Justify your answer.
Solve
Practice★★★Not started
The labor market for recent graduates in a region is analysed. The variables are "Type of Education" ($X$: University or Vocational Training) and "Employment Status"…

The labor market for recent graduates in a region is analysed. The variables are "Type of Education" ($X$: University or Vocational Training) and "Employment Status" ($Y$: Employed, Unemployed or Internship). Some records from a sample of 1,000 individuals have been lost, but the distributions conditional on rows (Type of Education) are preserved:

$X \setminus Y$ Employed Unemployed Internship
University $0,65$ $0,10$ $0,25$
Vocational Training $0,75$ $0,15$ $0,10$

Knowing that the marginal frequency of "Employed" is 690 people:

  1. a) Calculate how many individuals in the sample have a university education and how many have vocational training.
  2. b) Determine the distribution of the variable "Type of Education" conditional on being "Unemployed".
  3. c) If a company is looking for profiles for an internship contract, in which education group will it find a greater absolute number of candidates according to this study?
Total 1000 Univ. x Voc. Training 1000-x Employed 0.65x Unemployed 0.10x Internship 0.25x Employed 0.75(1000-x) Unemployed 0.15(1000-x) Internship 0.10(1000-x) Total Emp. 690 0,65 0,10 0,25 0,75 0,15 0,10 0,65x + 0,75(1000 - x) = 690
Solve

Using Independence to Fill in a Table

When a problem says two events are independent, it hands you a formula for a cell. Combine it with the marginal totals and the rest of the table follows.

The independence formula for a cell: row total times column total divided by N equals the cell count, shown as 60 times 50 divided by 200 equals 15. 60row total × 50column total ÷ 200grand total N = 15cell count
Practice★★★Not started
A technology consultancy analyzes the relationship between the use of Artificial Intelligence (AI) in studying and the mean grade in a sample of students. It is known…

A technology consultancy analyzes the relationship between the use of Artificial Intelligence (AI) in studying and the mean grade in a sample of students. It is known that:

  1. $30\%$ of the students never use AI.

  2. $25\%$ of the students have a mean grade of "Excellent".

  3. The probability that a student has an "Excellent" grade given that they use AI regularly is $0,4$.

  4. The total sample size is 400 students.

  5. It has been observed that the events "Having an Excellent grade" and "Never using AI" are independent.

Calculate:

  1. a) The number of students who never use AI and have an Excellent grade.
  2. b) The probability that a student uses AI regularly given that their grade is not Excellent.
  3. c) Complete the contingency table by dividing the sample into two usage categories (AI / No AI) and two grade categories (Excellent / Rest).
Solve
Practice★★★Not started
A city council wants to promote the use of sustainable transport. After surveying 500 citizens about their main mode of transport ($X$) and their age group ($Y$), the…

A city council wants to promote the use of sustainable transport. After surveying 500 citizens about their main mode of transport ($X$) and their age group ($Y$), the following marginal frequency data have been obtained:

  • $n_{Bus} = 180$; $n_{Bici} = 120$; $n_{Coche} = 200$.

  • $n_{Joven} = 150$; $n_{Adulto} = 250$; $n_{Senior} = 100$.

Furthermore, the following information is known:

  1. $60\%$ of those who use a bike are young.

  2. Seniors do not use a bike at all.

  3. $50\%$ of car users are adults.

  4. The events "Being a Bus user" and "Being an Adult" have a joint absolute frequency of 90 people.

  1. a) Determine the complete absolute frequency table.
  2. b) Study the dependence between age and car use by comparing the marginal and conditional distributions.
  3. c) What is the most frequent transport profile for a Senior citizen?
Solve
Practice★★★Not started
A sociological study on reading habits analyses the relationship between the preferred format (Paper, E-book, Audio) and the number of books read per year (Fewer than 5,…

A sociological study on reading habits analyses the relationship between the preferred format (Paper, E-book, Audio) and the number of books read per year (Fewer than 5, Between 5 and 12, More than 12).

It is known that in the sample:

  1. The "Paper" format is preferred by $50\%$ of readers.

  2. The "Audio" format is the least frequent, with only $10\%$.

  3. Among "E-book" readers, the three categories for the number of books have the same relative frequency ($1/3$ each).

  4. The event "Reading more than 12 books" is independent of the "Paper" format, and it is known that $20\%$ of total readers read more than 12 books.

  5. $10\%$ of the total sample are "Paper" readers who read "Fewer than 5" books.

  6. None of the "Audio" users read fewer than 5 books per year.

Find:

  1. a) The joint relative frequency table.
  2. b) The distribution of the number of books read conditional on "Audio" users, knowing that none of them read fewer than 5 books a year.
  3. c) What percentage of readers who read "Between 5 and 12" books prefer the Paper format?
Solve

Back to the start: To decide whether having a job and playing a varsity sport are related, Emma compares the percent of athletes among students with a job to the percent of athletes among all her students. If they are about equal, the variables look independent. If they are far apart, there is an association.

Summary

See all the exercises in this section