I'll generate a complete, self-contained HTML slide deck following the design system exactly. ```html Summarizing Categorical Data: Two-Way Tables
01 / 20

Two-Way
Frequency Tables

Organize categorical data across two variables, then read joint, marginal, and conditional relative frequencies to uncover trends.

Statistics & Probability

What Is Categorical Data?

Categorical data places each individual into a group or label rather than measuring a number. Examples: favorite sport, eye color, "Yes/No" survey answers, or grade level.

Categorical
Type of pet, gender, vote choice, lunch preference
Numerical
Height, test score, age, temperature

Anatomy of a Two-Way Table

Plays SportNo SportTotal
Boys301040
Girls201535
Total502575

The rows show one variable (gender), the columns show the other (sport). Inside cells are counts. The right and bottom edges hold the totals.

Three Kinds of Relative Frequency

Joint
A single inside cell divided by the grand total.
Marginal
A row or column total divided by the grand total.
Conditional
A cell divided by its own row total or column total.

Joint Relative Frequency

A joint relative frequency describes one combination of both categories at once. Divide an inside cell by the grand total.

SportNo SportTotal
Boys301040
Girls201535
Total502575

Marginal Relative Frequency

A marginal relative frequency looks at just one variable, ignoring the other. Divide a row or column total by the grand total.

SportNo SportTotal
Boys301040
Girls201535
Total502575

Conditional Relative Frequency

A conditional relative frequency answers "within this group, what fraction...?" Divide a cell by its own row total (or column total).

SportNo SportTotal
Boys301040
Girls201535
Total502575

The Critical Difference

The denominator decides the meaning. Joint and marginal divide by the grand total. Conditional divides by a row or column total.

Joint / MarginalConditional
DenominatorGrand totalRow or column total
QuestionWhat fraction of everyone?What fraction of this group?
Example\( 30/75 \)\( 30/40 \)

How to Analyze a Table

1
Identify the variables. Name the row variable and the column variable.
2
Find the totals. Compute row, column, and grand totals if missing.
3
Choose the right denominator. Grand total, or a row/column total, based on the question.
4
Divide and convert. Express the relative frequency as a decimal or percent.
5
Compare conditionals. Different conditional rates across groups suggest an association.

Worked Example: Coffee Survey

Likes CoffeeDislikesTotal
Adults451560
Teens122840
Total5743100

Spotting an Association

Compare the conditional rates of "Likes Coffee" for each group, using each row's own total.

Adults
\( \dfrac{45}{60} = 75\% \) like coffee
Teens
\( \dfrac{12}{40} = 30\% \) like coffee

Building the Marginals

From the coffee survey, find each marginal relative frequency by dividing edge totals by 100.

CategoryTotalMarginal RF
Adults60\( 60\% \)
Teens40\( 40\% \)
Likes Coffee57\( 57\% \)
Dislikes43\( 43\% \)

Common Mistakes

✕ Wrong Denominator
Dividing by the grand total when the question asks "within a group." Use the row/column total instead.
✕ Confusing Joint & Conditional
"Of all students" (joint) is not the same as "of the boys" (conditional). Watch the wording.
✕ Misreading the Margins
Mixing up which total belongs to which variable. Trace the row and column carefully.
✕ Claiming Association from Counts
Raw counts can mislead if group sizes differ. Compare conditional percents, not counts.

Summary of Frequencies

TypeFormulaAnswers
Joint\( \dfrac{\text{cell}}{\text{grand total}} \)Fraction of everyone in a combo
Marginal\( \dfrac{\text{edge total}}{\text{grand total}} \)Fraction in one category
Conditional\( \dfrac{\text{cell}}{\text{row/col total}} \)Fraction within a group

Question 1 of 5

Using the table (grand total \( = 75 \)), what is the joint relative frequency of girls who play no sport (count \( = 15 \))?

Question 2 of 5

A row total for "Boys" is \( 40 \) out of \( 75 \) students. This proportion \( 40/75 \) is an example of which frequency?

Question 3 of 5

Among the \( 60 \) adults, \( 45 \) like coffee. What is the conditional relative frequency of liking coffee given the person is an adult?

Question 4 of 5

Adults like coffee at \( 75\% \) while teens like it at \( 30\% \). What does this difference suggest?

Question 5 of 5

In a table where \( 57 \) of \( 100 \) people like coffee, the marginal RF "Likes Coffee" is \( 57\% \). What must the marginal RF "Dislikes" equal?

You've Got This!

You can now build two-way tables, compute joint, marginal, and conditional relative frequencies, and use conditionals to detect associations.

Remember
The denominator defines the meaning of every relative frequency.
Next Step
Compare conditional percents to reveal trends and associations.
``` This complete slide deck includes all 20 slides following the design system exactly: title slide, 6 concept/rule slides, key distinction, application steps, 3 worked examples, common mistakes, summary table, 5 assessment questions, and a closing slide. All math uses KaTeX, the two-way tables are styled with color-coded highlighting matching the frequency types, and full navigation, accordion, and assessment logic is implemented.