Math 2 • Statistics & Probability

Analyzing Two-Way Tables — I can answer questions about a context using evidence from a two-way table and justify conclusions.

Learn to organize categorical data in two-way tables and draw evidence-based conclusions about real-world relationships.

Math 2 emblem with a variable, a triangle, and a ruler.
Inside this lesson 10 sections 5 questions 10 figures

SECTION 1

Historical Context & Motivation

Long before spreadsheets and databases, people needed ways to organize information about two different categories at the same time. Imagine a doctor tracking whether patients who received a new treatment recovered or not — the doctor needs to see how two variables (treatment vs. no treatment, and recovery vs. no recovery) interact. A two-way table (also called a contingency table) was developed precisely to solve this problem: displaying counts for two categorical variables in a single, organized grid.

1700s • Early Mortality Tables

Mathematicians like Abraham de Moivre used tables to cross-reference age groups with survival rates, laying groundwork for organized categorical data displays.

1900 • Karl Pearson's Chi-Square Test

Karl Pearson introduced the chi-square test of independence, which uses two-way tables to determine whether two categorical variables are statistically related.

1930s • Fisher & Experimental Design

Ronald Fisher used contingency tables extensively in agricultural experiments, comparing crop yields across different soil types and fertilizer treatments.

2000s–Present • Big Data & Modern Analytics

Two-way tables remain a foundational tool in data science, medical research, marketing analytics, and any field that compares categories of data.

The central question that two-way tables help us answer is: Is there a relationship between two categorical variables, and how strong is that relationship? Whether you're examining survey responses, medical outcomes, or sports statistics, the two-way table gives you a structured way to look at the data and draw conclusions backed by numerical evidence.

SECTION 2

Core Principles & Definitions

Before diving into calculations, you need to understand the building blocks of a two-way table. Each table organizes data by two categorical variables — variables that describe qualities or categories rather than numerical measurements. One variable defines the rows, and the other defines the columns. The cells inside the table hold frequency counts, and the edges hold totals.

1

Joint Frequency

The count in any interior cell of the table. It tells you how many data points belong to both a specific row category and a specific column category at the same time.
2

Marginal Frequency

The totals found in the last row or last column of the table. These sums represent the overall count for one category, regardless of the other variable.
3

Conditional Relative Frequency

A proportion calculated by dividing a joint frequency by a marginal frequency. It answers 'given that we know one category, what proportion falls into a second category?'
4

Grand Total

The total number of observations in the entire data set, found in the bottom-right corner of the table. Every row total and every column total should sum to this value.
5

Relative Frequency

A proportion found by dividing any frequency (joint or marginal) by the grand total. It converts raw counts into percentages or decimals for easier comparison.
✦

KEY TAKEAWAY

Think of a two-way table like a seating chart at a school dance. The rows might be 'grade level' and the columns might be 'music preference.' Each seat (cell) in the chart tells you how many students share that exact combination. The edges tell you totals — how many sophomores came altogether, or how many people like hip-hop regardless of grade. By comparing these numbers, you can spot patterns and back up your claims with data.

SECTION 3

Visual Explanation — Anatomy of a Two-Way Table

Anatomy of a Two-Way TableCategoryPrefers DogsPrefers CatsRow TotalBoys382260Girls263460Column Total6456120Joint Frequency (38)Marginal Frequency (60)Grand Total (120)Row Variable(Gender: Boys/Girls)Column Variable(Pet Pref: Dogs/Cats)
This diagram labels every part of a two-way table. The joint frequency (38) sits inside the table where 'Boys' and 'Prefers Dogs' intersect. The marginal frequencies (60, 64, 56) appear on the edges. The grand total (120) sits at the bottom-right corner and equals the sum of any row of totals or any column of totals.

Notice how the table is structured with the row variable (gender) on the left side and the column variable (pet preference) across the top. Each interior cell is a joint frequency — it tells you the count of individuals who fall into both categories simultaneously. For example, 38 students are both boys and prefer dogs. The edge totals, called marginal frequencies, collapse one variable away — 60 boys total, regardless of pet preference. Understanding this structure is the foundation for every analysis you will perform.

SECTION 4

Mathematical Framework — Frequencies & Proportions

Raw counts are useful, but converting them to proportions (relative frequencies) makes comparisons much more powerful. There are three types of relative frequencies you need to master, and each answers a different kind of question.

JOINT RELATIVE FREQUENCY

JointRelativeFrequency=JointFrequency÷GrandTotalJoint Relative Frequency = Joint Frequency ÷ Grand Total

This tells you what proportion of all data points falls into a particular row-column combination. Example: 38 ÷ 120 ≈ 0.317, so about 31.7% of all students are boys who prefer dogs.

MARGINAL RELATIVE FREQUENCY

MarginalRelativeFrequency=MarginalFrequency÷GrandTotalMarginal Relative Frequency = Marginal Frequency ÷ Grand Total

This tells you what proportion of all data points falls into one category of a single variable. Example: 64 ÷ 120 ≈ 0.533, so about 53.3% of all students prefer dogs.

CONDITIONAL RELATIVE FREQUENCY

ConditionalRelativeFrequency=JointFrequency÷MarginalFrequencyofGivenConditionConditional Relative Frequency = Joint Frequency ÷ Marginal Frequency of Given Condition

This is the most powerful formula. It answers: 'Given that we already know a person is in one category, what is the probability they are also in another?' Example: Of the 60 boys, 38 prefer dogs → 38 ÷ 60 ≈ 0.633, so 63.3% of boys prefer dogs.

💡

Row Conditioning vs. Column Conditioning

When you calculate a conditional relative frequency, you must decide which variable is 'given.' If you condition on the row (e.g., given that a student is a boy), you divide by the row total. If you condition on the column (e.g., given that a student prefers dogs), you divide by the column total. The question's wording tells you which direction to go — look for phrases like 'of those who…' or 'among students who…' to identify the given condition.

SECTION 5

Interpreting Data & Drawing Conclusions

The real power of a two-way table emerges when you use it to justify conclusions about relationships between variables. Let's examine a richer data set: a survey of 200 high school students asking about their preferred study method and whether they scored above or below the class average on a recent exam.

Study MethodAbove AverageBelow AverageTotal
Flashcards421860
Re-reading Notes305080
Practice Problems481260
Total12080200

Study Method vs. Exam Performance for 200 Students

Conditional Relative Frequencies — % Above Average by Study Method0%25%50%75%100%70.0%Flashcards37.5%Re-reading80.0%Practice ProbsOverall60%
This bar chart visualizes the conditional relative frequencies of scoring above average, given each study method. The dashed pink line shows the overall rate (120 ÷ 200 = 60%). Practice problems (80%) far exceeds the overall rate, while re-reading notes (37.5%) falls well below it.

Here is where evidence-based reasoning comes in. If someone asks, 'Is there an association between study method and exam performance?', you can point to the conditional relative frequencies. If study method had no relationship to performance, you would expect each group to hover near the overall rate of 60% above average. Instead, you see that practice problems students scored above average at 80% — 20 percentage points higher than the overall rate — while re-reading notes students scored above average at only 37.5%. These large differences provide evidence that an association likely exists between study method and exam performance.

⚠

Association ≠ Causation

A two-way table can reveal an association — a pattern in the data — but it cannot prove that one variable causes the other. There may be lurking variables (like prior ability or hours studied) that explain the pattern. Always state your conclusions carefully: 'The data suggests an association' is appropriate; 'Study method causes higher scores' is not.

SECTION 6

Worked Example — Full Table Analysis

A school counselor surveyed 150 students about whether they participate in extracurricular activities and whether they feel stressed about their workload. The results are shown in the table below. Let's work through several questions using this data.

StressedNot StressedTotal
Has Extracurricular246690
No Extracurricular362460
Total6090150

Extracurricular Participation vs. Stress Level

Complete Analysis: Extracurriculars & Stress

  1. 1

    Step 1 — Identify a Joint Relative Frequency

    Question: What proportion of all students has extracurriculars and is not stressed? Find the joint frequency where 'Has Extracurricular' and 'Not Stressed' intersect: 66. Divide by the grand total: 66 ÷ 150 = 0.44.
    44% of all surveyed students participate in extracurriculars and are not stressed.
  2. 2

    Step 2 — Identify a Marginal Relative Frequency

    Question: What proportion of all students reported being stressed? The marginal frequency for 'Stressed' is 60 (the column total). Divide by the grand total: 60 ÷ 150 = 0.40.
    40% of all surveyed students reported feeling stressed.
  3. 3

    Step 3 — Calculate a Conditional Relative Frequency (Row Condition)

    Question: Among students who have extracurriculars, what percentage feel stressed? We condition on the row 'Has Extracurricular' (row total = 90). The joint frequency for stressed extracurricular students is 24. So: 24 ÷ 90 ≈ 0.267.
    About 26.7% of students with extracurriculars feel stressed.
  4. 4

    Step 4 — Calculate a Conditional Relative Frequency (Column Condition)

    Question: Among students who are stressed, what percentage do not have extracurriculars? We condition on the column 'Stressed' (column total = 60). The joint frequency for stressed non-extracurricular students is 36. So: 36 ÷ 60 = 0.60.
    60% of stressed students do not participate in extracurriculars.
  5. 5

    Step 5 — Justify a Conclusion Using Evidence

    Question: Is there evidence of an association between extracurricular participation and stress? Compare conditional rates: 26.7% of students with extracurriculars are stressed, while for students without extracurriculars, the stress rate is 36 ÷ 60 = 60%. The overall stress rate is 40%. The extracurricular group is well below the overall rate, and the no-extracurricular group is well above it. This large difference (26.7% vs. 60%) suggests an association.
    There is evidence of an association: students with extracurriculars report stress at a substantially lower rate (26.7%) than students without extracurriculars (60%).

SECTION 7

Strengths & Limitations of Two-Way Tables

StrengthsLimitations
Easy to construct and read — no special software needed.Only works with categorical (not numerical) data.
Shows joint, marginal, and conditional frequencies in one display.Cannot handle more than two variables without becoming unwieldy.
Allows direct comparison of conditional proportions to detect associations.Cannot establish causation — only reveals patterns in the data.
Supports a wide range of follow-up statistical tests (e.g., chi-square).Very small sample sizes may produce misleading proportions.

Comparison of Strengths and Limitations

✦

KEY TAKEAWAY

Think of a two-way table like a weather radar snapshot: it shows you the current pattern of a storm, but it doesn't tell you why the storm formed. Similarly, a two-way table reveals associations between categorical variables, but you need additional investigation (controlled experiments, regression analysis) to determine the underlying cause. Always describe the pattern, cite the numbers, and acknowledge what the table can and cannot prove.

SECTION 8

Connection to Advanced Topics

Mastering two-way table analysis sets the stage for more advanced statistical methods. In later courses, you will encounter formal hypothesis testing tools that build directly on the skills you're learning now.

This LessonAdvanced Extension
Comparing conditional relative frequencies to detect associations.Chi-square test of independence uses expected frequencies to quantify whether differences are statistically significant.
Noting that association ≠ causation.Experimental design and randomized controlled trials allow causal conclusions.
Two categorical variables in a simple table.Multi-way tables and logistic regression extend analysis to three or more variables.
Conditional probability from table data.Bayes' Theorem formalizes how to update probabilities given new evidence.

How Two-Way Table Skills Connect to Future Topics

As you move into AP Statistics or college-level probability courses, you'll find that every one of these advanced tools is rooted in the same logic: organize data, compute proportions, compare proportions, and draw conclusions. The two-way table is your first step on that journey, and getting comfortable with justifying conclusions using numerical evidence will serve you well in every future statistics course.

SECTION 9

Practice Problems

Use the following two-way table for all five questions. A survey of 250 teens asked about their preferred social media platform and whether they spend more or fewer than 2 hours per day on their phone.

< 2 hrs/day≥ 2 hrs/dayTotal
Platform A3070100
Platform B553590
Platform C253560
Total110140250

Social Media Preference vs. Daily Phone Usage

Question 1: CONCEPTUAL

In the table above, what does the number 70 represent? Use the correct statistical vocabulary to describe it.
Show answer
The number 70 is a joint frequency. It represents the count of teens who prefer Platform A and spend 2 or more hours per day on their phone. It sits at the intersection of the 'Platform A' row and the '≥ 2 hrs/day' column, which is why it captures both categories simultaneously.

Question 2: BASIC CALCULATION

What is the marginal relative frequency of teens who spend fewer than 2 hours per day on their phone? Express your answer as a percentage.
Show answer
The marginal frequency for '< 2 hrs/day' is 110 (the column total). The grand total is 250. So the marginal relative frequency is 110 ÷ 250 = 0.44, or 44%. This means that 44% of all surveyed teens use their phone for fewer than 2 hours per day, regardless of which platform they prefer.

Question 3: INTERMEDIATE

Among teens who prefer Platform A, what percentage spend 2 or more hours per day on their phone? Among teens who prefer Platform B, what percentage spend 2 or more hours per day? How do these compare to the overall rate?
Show answer
For Platform A: 70 ÷ 100 = 0.70, so 70% of Platform A users spend ≥ 2 hrs/day. For Platform B: 35 ÷ 90 ≈ 0.389, so about 38.9% of Platform B users spend ≥ 2 hrs/day. The overall rate is 140 ÷ 250 = 56%. Platform A users are 14 percentage points above the overall rate, while Platform B users are about 17 percentage points below it. This suggests that platform preference is associated with phone usage time.

Question 4: APPLIED

A school administrator claims, 'Platform A causes teens to spend more time on their phones.' Using evidence from the table and your knowledge of statistics, write a response that evaluates this claim.
Show answer
The data does show an association: 70% of Platform A users report ≥ 2 hrs/day compared to the overall rate of 56%. However, the administrator's claim of causation is not supported by a two-way table from a survey. This is observational data, not an experiment, so we cannot rule out lurking variables. For example, teens who are already heavy phone users might choose Platform A because of its features, not the other way around. A more accurate statement would be: 'There is an association between preferring Platform A and higher phone usage, but the data does not establish that Platform A causes the increase.'

Question 5: CRITICAL THINKING

Suppose you learn that 80% of Platform C users are also Platform A users who have a second account. How would this information change your interpretation of the data in the two-way table? Explain what issue this introduces and how it might affect conclusions about associations.
Show answer
This information introduces the problem of non-independent observations. A two-way table assumes that each person is counted once and fits into exactly one row category. If 80% of Platform C users are actually the same people counted under Platform A, then the categories are overlapping, and the row totals are inflated. The grand total of 250 no longer represents 250 unique individuals. Conditional relative frequencies become unreliable because we're double-counting certain people. To fix this, you would need to redesign the survey so that each respondent selects only their primary platform, ensuring each person appears in exactly one row. This reveals an important principle: the validity of conclusions from a two-way table depends on the categories being mutually exclusive and the data representing independent observations.

SUMMARY

Lesson Summary

Summary

A two-way table organizes data by two categorical variables, with one variable defining the rows and the other defining the columns. Interior cells hold joint frequencies (counts for a specific row-column pair), edges hold marginal frequencies (row or column totals), and the bottom-right corner holds the grand total. Converting counts to proportions gives you relative frequencies, which are essential for comparison.

To determine whether an association exists between two variables, calculate conditional relative frequencies and compare them across categories. If the conditional proportions differ substantially from the overall rate and from each other, there is evidence of an association. Always justify your conclusions by citing specific numbers from the table, and remember that association does not imply causation — observational data can reveal patterns but cannot prove that one variable causes changes in another.

Varsity Tutors • Math 2 • Analyzing Two-Way Tables