Start with the recap, study the fully worked examples, then use the practice problems to
check your understanding of Two-Way Tables.
This page combines explanation, solved examples, and follow-up practice so you can move
from recognition to confident problem-solving in Statistics.
Concept Recap
A two-way table (contingency table) displays the frequency of data categorized by two different categorical variables simultaneously, with one variable in rows and the other in columns, allowing comparison of distributions across groups.
A two-way table is like a spreadsheet that shows how two questions relate. 'Do you like pizza?' and 'Are you a kid or adult?' becomes a 2×2 grid showing how many kid pizza-lovers, adult pizza-lovers, etc.
Read the first worked example with the solution open so the structure is clear.
Try the practice problems before revealing each solution.
Use the related concepts and background knowledge badges if you feel stuck.
What to Focus On
Core idea:Two-Way Tables asks whether the same cases connect two variables or groups in a pattern that can be described carefully.
Common stuck point:Students often know a procedure related to two-way tables but skip the recognition step: Am I studying a relationship between variables, and have I separated association from causation? That leads to a calculation or graph that looks reasonable but answers a different question.
Sense of Study hint:Ask: Am I studying a relationship between variables, and have I separated association from causation?
Common Mistakes to Watch For
Before you work through the examples, skim the mistake guide so you know which shortcuts and
sign errors to avoid.
From a two-way table: Smokers (Yes/No) vs Disease (Yes/No). Smokers-Disease =30; Smokers-NoDisease =70; NonSmokers-Disease =10; NonSmokers-NoDisease =90. What is the proportion of smokers who get the disease?What proportion of smokers get the disease?
Answer
30/100=0.30
First step
1
Conditional on Smokers, denominator =30+70=100.
See the full worked solution + why-it-works coaching
Setup·Key insight·Why it works·Common pitfall·Connection
Given: Boys 35 total, Girls 45 total, Soccer 45 total, Basketball 35 total, grand total 80. Compute expected count of Boy-and-Soccer if Gender and Sport were independent.Expected count of Boy-and-Soccer under independence = ?
Example 3
hard
In the treatment table (A: 90/30; B: 60/120), compute the expected count of (Treatment A, Cured) under independence.Expected count of (Treatment A, Cured) under independence = ?
Example 4
hard
Conditional distributions of Sport given Gender are identical (60% soccer, 40% basketball for both Boys and Girls). What does this say about association?
Example 5
challenge
A study finds Treatment A beats Treatment B overall, but within each severity subgroup, Treatment B is better. What is this phenomenon called and what does it teach us about two-way tables?
Example 6
medium
A survey of 80 people classifies Coffee (Yes/No) by Tea (Yes/No). 30 drink both; 20 coffee only; 15 tea only; the rest drink neither. Find each marginal total.Find each marginal total.
Example 7
medium
100 students were surveyed: 70 play sports; among those, 49 also play music. Among non-sport students, 9 play music. Build the table and find the percent of music players overall.
Example 8
hard
A two-way table by Treatment (Drug/Placebo) and Outcome (Recover/Not): Drug 40/10; Placebo 25/25. Compare the recovery rates and decide which group did better.Compare recovery rates: which group did better?
Example 9
easy
A survey of 60 students recorded their gender and whether they prefer cats or dogs. Boys who prefer cats: 8, boys who prefer dogs: 17, girls who prefer cats: 15, girls who prefer dogs: 20. Organise this into a two-way table with row and column totals.
Example 10
medium
From the two-way table: Passed exam — studied (40), didn't study (10); Failed exam — studied (5), didn't study (25). Calculate the percentage of students who passed among those who studied, and among those who didn't study.
Practice Problems
Try these problems on your own first, then open the solution to compare your method.
Example 1
easy
A survey records 30 students. The two-way table has rows Kid/Adult and columns Likes Pizza/Dislikes Pizza. Kids: 12 like, 3 dislike. Adults: 9 like, 6 dislike. How many people are in the survey total?Grand total = ?
Example 2
easy
In the table, Kids who like pizza =12, Kids who dislike =3. What is the marginal total of Kids?
Example 3
easy
Adults: 9 like pizza, 6 dislike. What is the marginal total of Adults?
Example 4
easy
Using the table (Kids: 12 like, 3 dislike; Adults: 9 like, 6 dislike), how many people in total like pizza?
Example 5
easy
From the same table, how many people dislike pizza in total?
Example 6
easy
In the two-way table, what is the joint count of Kids who dislike pizza?What is the joint count for Kids who dislike pizza?
Example 7
easy
A 2×2 table has cells a=8, b=2, c=5, d=5. What is the grand total?Grand total = ?
Example 8
easy
A two-way table classifies people by Gender (row) and Owns a Bike (column). Which variable types make a two-way table the right tool?
Example 9
medium
Table: Sport played (Yes/No) by Grade (9th/10th). 9th: 20 Yes, 10 No. 10th: 15 Yes, 25 No. How many 10th graders are there, and what fraction of ALL students are 10th graders?How many 10th graders are there, and what fraction are 10th graders?
Example 10
medium
Same table (9th: 20 Yes, 10 No; 10th: 15 Yes, 25 No). What fraction of students play a sport (Yes)?What fraction of students play a sport?
Example 11
medium
Table cells: a=18, b=12 (row 1), c=6, d=24 (row 2). What proportion of the data is in cell d (joint relative frequency)?What is the joint relative frequency of cell d?
Example 12
medium
A two-way table of Color preference by Age group has row totals 25 and 35 and a grand total of 60. If one column total is 40, what is the other column total?
Example 13
medium
Table: Pass/Fail by Studied (Yes/No). Studied-Yes: 28 Pass, 4 Fail. Studied-No: 6 Pass, 12 Fail. How many students total, and how many failed?How many students total, and how many failed?
Example 14
medium
From the Pass/Fail table (Studied-Yes: 28 Pass, 4 Fail; Studied-No: 6 Pass, 12 Fail), what fraction of ALL students both studied and passed?What fraction of ALL students both studied and passed?
Example 15
medium
A table has row totals 40 and 60. A cell in the first row is 10. What is the joint relative frequency of that cell if the grand total is 100?
Example 16
medium
Survey of 80 people by Coffee (Yes/No) and Tea (Yes/No). Coffee-Yes/Tea-Yes =30, Coffee-Yes/Tea-No =20, Coffee-No/Tea-Yes =18, Coffee-No/Tea-No =12. How many drink coffee?How many people drink coffee?
Example 17
medium
In a 2×3 table, the three column totals are 15, 25, and 20, and one row total is 36. What is the other row total?
Example 18
challenge
A two-way table (Treatment/Placebo by Recovered/Not) is consistent if all marginals match the grand total. Treatment: a recovered, 30−a not (row total 30). Placebo: b recovered, 40−b not (row total 40). If 52 total recovered, express b in terms of a, then find b when a=28.
Example 19
challenge
A table reports that a+ba=0.6 for row 1 and the row-1 total a+b=50. Cell a is also 41 of the grand total. Find the grand total.
Example 20
challenge
Two groups, A (size 100) and B (size 100), are merged. In A, 70 of 100 succeed; in B, 30 of 100 succeed. After merging into one 2×2 table (Group by Success), what is the overall success relative frequency, and why can it differ from each group's rate?
Example 21
easy
A two-way table classifies 80 students by Gender (Boy/Girl) and Sport (Soccer/Basketball). Boys: 20 soccer, 15 basketball. Girls: 25 soccer, 20 basketball. What is the total number of soccer players?Total soccer players = ?
Example 22
easy
Using the same table (Boys: 20 soccer, 15 basketball; Girls: 25 soccer, 20 basketball), how many girls are in the survey?
Example 23
easy
Boys total 35, Girls total 45, soccer total 45, basketball total 35. What is the grand total?What is the grand total?
Example 24
medium
Given (Boys: 20 soccer, 15 bb; Girls: 25 soccer, 20 bb), what proportion of boys play soccer (conditional)?What proportion of boys play soccer?
Example 25
medium
Same data. What proportion of soccer players are boys?What proportion of soccer players are boys?
Example 26
medium
Using the same smoker table, what proportion of non-smokers get the disease, and what does the comparison say about association?What proportion of non-smokers get the disease?
Example 27
medium
A table has row marginal totals 40,60 and column marginal totals 50,50. If variables are independent, what is the expected count in the (Row1, Col1) cell?
Example 28
medium
In a 2×2 table with grand total 200, the cell (A, X) count is 50. What is the joint relative frequency?
Example 29
medium
Joint distribution: (P(A∩X),P(A∩Y),P(B∩X),P(B∩Y))=(0.25,0.15,0.10,0.50). Find P(A), the marginal probability for row A.
Example 30
medium
A survey of 200 people: 60 like coffee, 140 don't; 80 are over 30, 120 are under. If like-coffee and age-over-30 are independent, what is the expected count of 'likes coffee AND over 30'?
Example 31
hard
A two-way table cross-classifies 300 patients by Treatment (A/B) and Outcome (Cured/Not). Treatment A: 90 cured, 30 not. Treatment B: 60 cured, 120 not. Compute the cure rate for each treatment.Compute the cure rate for each treatment.
Example 32
hard
A two-way table has expected count 40 and observed count 50 in one cell. Compute that cell's contribution to the χ2 statistic.
Example 33
hard
A 2×3 two-way table has 2 rows and 3 columns. How many degrees of freedom for the chi-square test of independence?
Example 34
medium
120 surveyed. Cell counts: Yes-Like =30, Yes-Dislike =30, No-Like =20, No-Dislike =40. What is P(Like∣Yes)?Find P(Like | Yes)
Example 35
medium
Same table. Compute P(Yes∣Like).Find P(Yes | Like)
Example 36
medium
From a 2×2 table with marginal proportions P(Row A)=0.4,P(Col X)=0.5, what would P(A∩X) equal if rows and columns are independent?
Example 37
easy
A two-way table has row totals 18 and 22. What is the grand total?
Example 38
easy
A 2×2 table has cells a=7, b=3, c=4, d=6. What is the column 1 total?
Example 39
easy
Pet/No Pet by Cat/Dog table: 20 cat owners, 30 dog owners. Of cat owners, 15 also own a dog. How many own only a cat?
Example 40
easy
A two-way table has 50 people. Row 1 total =30. What fraction are in row 1?
Example 41
easy
A two-way table cell shows 8 students who are Female AND play Soccer out of 40 students. What is the joint relative frequency?
Example 42
easy
In a two-way table for Has Job (Yes/No) by Year (Junior/Senior), Juniors: 5 Yes, 15 No. Seniors: 10 Yes, 10 No. How many students total?How many students total?
Example 43
medium
From the previous table (Juniors: 5 Yes, 15 No; Seniors: 10 Yes, 10 No), among Seniors, what fraction have a job (conditional relative frequency)?Among Seniors, what fraction have a job?
Example 44
medium
A 2×2 table has a=12, b=8, c=18, d=22. What fraction of cases in column 1 are from row 1 (conditional)?What fraction of column 1 is from row 1?
Example 45
medium
Movie Genre (Action/Comedy) by Age (Teen/Adult): Teens: 24 Action, 6 Comedy; Adults: 10 Action, 20 Comedy. Among Teens, what percent prefer Comedy?Among Teens, what percent prefer Comedy?
Example 46
medium
In the same Action/Comedy table, among Adults, what percent prefer Action?Among Adults, what percent prefer Action?
Example 47
medium
A 2×2 table with grand total 200: a=60, b=40, c=30. Find d and the column 2 marginal total.Find d and the column 2 marginal total.
Example 48
medium
In a 2×2 table the row 1 marginal is 40, row 2 is 60, column 1 is 50. If cell a (row 1, col 1) is 25, fill in the rest.Fill in cells b, c, and d.
Example 49
medium
In a survey of 240 people, 83 are children and 21 of children own a bike. How many children own a bike?
Example 50
hard
A 2×2 table has cells a,b,c,d with a+b=60, c+d=40, a+c=55, and a=30. Find b, c, d.Find cells b, c, and d.
Example 51
hard
A school of 400 has 60% boys; 25% of boys take art; 40% of girls take art. How many students take art total?
Example 52
hard
Two variables have joint relative frequency 0.3 in a cell and the row marginal proportion is 0.5. What is the conditional relative frequency within that row?
Example 53
hard
In a 2×2 table, the four conditional row distributions read: Row 1 has 60% Yes, 40% No; Row 2 has 60% Yes, 40% No. Is there an association?
Example 54
hard
From a 2×2 table with cells a=18,b=12,c=12,d=8, is there an association between the row and column variables?Is there an association between the row and column variables?
Example 55
challenge
A 2×2 table has marginal totals 40 and 60 (rows) and 50 and 50 (columns). If the two variables are independent (equal conditional distributions), find every cell.
Example 56
medium
A two-way table shows transport to school: Walk (Year 7: 30, Year 8: 20), Bus (Year 7: 15, Year 8: 25), Car (Year 7: 5, Year 8: 10). What percentage of Year 8 students take the bus?
Example 57
hard
A two-way table shows exercise frequency and health rating for 200 adults: Exercise regularly — Good health: 70, Fair: 20, Poor: 10. Don't exercise regularly — Good health: 30, Fair: 40, Poor: 30. Is there an association between exercise and health? Support your answer with conditional percentages.