Two-Way Tables

TipLearning Objectives

By the end of this lesson, you’ll be able to:

  • Read counts and totals from a two-way table.
  • Identify joint and marginal frequencies.
  • Calculate joint, marginal, and conditional probabilities.
  • Translate information from a real-world situation into a two-way table.
  • Compare groups using proportions and conditional percentages.

Key Ideas

A two-way table organizes data involving two categorical variables.

For example, suppose students are divided by:

  • Group: Group 1 or Group 2
  • Preference: Category A or Category B

A two-way table can show how these two variables are related.

Example Two-Way Table

Category A Category B Row Total
Group 1 12 18 30
Group 2 8 22 30
Column Total 20 40 60

The number:

\[ 60 \]

in the bottom-right corner is the grand total.


Joint Frequency

A joint frequency is a count involving both variables.

It appears in an interior cell of the table.

For example:

\[ 12 \]

students are both:

  • in Group 1
  • in Category A

So the joint frequency for Group 1 and Category A is:

\[ \boxed{12} \]


Marginal Frequency

A marginal frequency is a row total or column total.

These values appear along the margins, or edges, of the table.

For example:

\[ 40 \]

students chose Category B.

Therefore:

\[ \boxed{40} \]

is the marginal frequency for Category B.

Similarly:

\[ 30 \]

is the marginal frequency for Group 1.


Joint Probability

A joint probability is the probability that two conditions are both true.

Use:

\[ \boxed{ P(A\text{ and }B) = \frac{\text{joint frequency}} {\text{grand total}} } \]

For example, the probability that a randomly selected student is in Group 1 and chose Category A is:

\[ P(\text{Group 1 and Category A}) = \frac{12}{60} = \boxed{0.20} \]


Marginal Probability

A marginal probability uses a row or column total divided by the grand total.

For example, 40 of the 60 students chose Category B.

Therefore:

\[ P(\text{Category B}) = \frac{40}{60} = \boxed{\frac23} \]


Conditional Probability

A conditional probability asks for a probability within a particular group.

The notation:

\[ P(A\mid B) \]

means:

the probability of \(A\) given that \(B\) is already known to be true.

The key idea is that the word given restricts the group you are considering.

Use:

\[ \boxed{ P(A\mid B) = \frac{\text{count satisfying both }A\text{ and }B} {\text{total count satisfying }B} } \]

For example, what is the probability that a student chose Category B given that the student is in Group 1?

There are 30 Group 1 students.

Of those, 18 chose Category B.

Therefore:

\[ P(\text{Category B}\mid\text{Group 1}) = \frac{18}{30} = \boxed{0.60} \]

NoteWatch the Denominator

The denominator tells you which group you are considering.

For a joint probability, the denominator is usually the grand total.

For a conditional probability, the denominator is the total for the given group.


Reading a Two-Way Table

Using the same table:

Category A Category B Row Total
Group 1 12 18 30
Group 2 8 22 30
Column Total 20 40 60

we can answer several different questions.

Joint Frequency

How many students are in Group 2 and chose Category A?

Look at the intersection of the Group 2 row and Category A column:

\[ \boxed{8} \]

Marginal Frequency

How many students chose Category A?

Look at the Category A column total:

\[ \boxed{20} \]

Joint Probability

What is the probability that a randomly selected student is in Group 2 and chose Category A?

\[ P(\text{Group 2 and Category A}) = \frac{8}{60} = \boxed{\frac{2}{15}} \]

Conditional Probability

What is the probability that a student chose Category A given that the student is in Group 2?

Restrict attention to the 30 Group 2 students:

\[ P(\text{Category A}\mid\text{Group 2}) = \frac{8}{30} = \boxed{\frac{4}{15}} \]

Notice that:

\[ \frac{8}{60} \ne \frac{8}{30} \]

The numerator is the same, but the denominator changes because the second question restricts us to Group 2.


Common Problem Types

1. Finding Missing Table Entries

Use row and column totals to work backward.

Example:

Suppose a row has a total of 40:

Category A Category B Category C Total
12 18 ? 40

The entries must add to 40.

So:

\[ 12+18+x=40 \]

Therefore:

\[ x = 40-30 = \boxed{10} \]


2. Finding Marginal Frequencies

Marginal frequencies are the totals along the edges of the table.

Example:

Suppose a column contains:

\[ 15 \]

and:

\[ 10 \]

The column total is:

\[ 15+10 = \boxed{25} \]


3. Finding Joint Probabilities

A joint probability describes two conditions occurring together.

Divide the appropriate interior cell by the grand total.

Using the original table:

\[ P(\text{Group 1 and Category A}) = \frac{12}{60} = \boxed{0.20} \]


4. Finding Marginal Probabilities

Use the appropriate row or column total as the numerator and the grand total as the denominator.

For example:

\[ P(\text{Category B}) = \frac{40}{60} = \boxed{\frac23} \]


5. Finding Conditional Probabilities

The phrase given that tells you which row or column becomes the new total.

For example:

What is the probability of Category B given Group 2?

There are 30 students in Group 2.

Of those, 22 chose Category B.

Therefore:

\[ P(\text{Category B}\mid\text{Group 2}) = \frac{22}{30} = \boxed{\frac{11}{15}} \]

or approximately:

\[ \boxed{0.733} \]


6. Comparing Groups Using Conditional Percentages

When groups have different sizes, raw counts can be misleading.

Compare proportions instead.

Suppose:

  • 15 of 25 students in Group A participate in a sport
  • 20 of 50 students in Group B participate in a sport

Group B has more participants:

\[ 20>15 \]

But the participation rates are:

\[ \text{Group A: }\frac{15}{25}=0.60 \]

\[ \text{Group B: }\frac{20}{50}=0.40 \]

Therefore:

\[ \boxed{\text{Group A has the higher participation rate}} \]

even though Group B has the larger raw count.


7. Translating Information Into a Two-Way Table

Sometimes the information is given in words rather than in a completed table.

Suppose a class contains:

  • 20 boys
  • 30 girls
  • 12 boys who play sports
  • 18 girls who play sports

Start with the known values:

Play Sports Don’t Play Row Total
Boys 12 ? 20
Girls 18 ? 30

Find the missing counts.

For boys:

\[ 20-12=8 \]

For girls:

\[ 30-18=12 \]

Now complete the table:

Play Sports Don’t Play Row Total
Boys 12 8 20
Girls 18 12 30
Column Total 30 20 50

Strategies

Identify What Type of Quantity Is Being Asked For

Ask whether the problem wants a:

  • joint frequency
  • marginal frequency
  • joint probability
  • marginal probability
  • conditional probability

Look for “Given That”

When you see:

given that

immediately identify the given group.

That group’s total becomes the denominator.

For example:

\[ P(\text{Play}\mid\text{Boys}) \]

means restrict attention to the boys.


Use the Correct Denominator

A useful guide is:

Type Typical Denominator
Joint probability Grand total
Marginal probability Grand total
Conditional probability Total of the given group

Compare Proportions, Not Just Counts

If two groups have different sizes, compare:

\[ \frac{\text{number with characteristic}} {\text{group total}} \]

rather than simply comparing the numerators.


Check the Totals

Each row total should equal the sum of the cells in that row.

Each column total should equal the sum of the cells in that column.

The row totals and column totals should both lead to the same grand total.


Worked Examples

Example 1 — Conditional Probability

A table shows club participation by grade level.

There are 80 juniors, and 25 of them participate in a club.

What is:

\[ P(\text{in club}\mid\text{junior})? \]

Because the condition is junior, restrict attention to the 80 juniors.

Of those, 25 participate in a club.

Therefore:

\[ P(\text{in club}\mid\text{junior}) = \frac{25}{80} = \boxed{0.3125} \]


Example 2 — Joint Probability

A particular cell in a two-way table contains 14 students.

There are 56 students total.

The probability of randomly selecting a student represented by that cell is:

\[ P(\text{joint event}) = \frac{14}{56} = \boxed{\frac14} \]


Example 3 — Build and Interpret a Two-Way Table

A class has:

  • 20 boys
  • 30 girls
  • 12 boys who play sports
  • 18 girls who play sports

Complete the table.

For boys who do not play:

\[ 20-12=8 \]

For girls who do not play:

\[ 30-18=12 \]

The completed table is:

Play Sports Don’t Play Row Total
Boys 12 8 20
Girls 18 12 30
Column Total 30 20 50

The joint frequency for girls who play sports is:

\[ \boxed{18} \]

The marginal frequency for students who play sports is:

\[ \boxed{30} \]

Now compare the conditional probabilities.

For boys:

\[ P(\text{Play}\mid\text{Boys}) = \frac{12}{20} = 0.60 \]

For girls:

\[ P(\text{Play}\mid\text{Girls}) = \frac{18}{30} = 0.60 \]

Therefore:

\[ \boxed{\text{Both groups participate at the same rate}} \]


Example 4 — Same Cell, Different Denominator

Consider the table:

Likes Math Doesn’t Like Math Total
Seniors 18 12 30
Juniors 12 18 30
Total 30 30 60

What is the probability that a randomly selected student is a senior and likes math?

Use the grand total:

\[ P(\text{senior and likes math}) = \frac{18}{60} = \boxed{0.30} \]

Now find the probability that a student likes math given that the student is a senior.

Restrict attention to the 30 seniors:

\[ P(\text{likes math}\mid\text{senior}) = \frac{18}{30} = \boxed{0.60} \]

The same cell count appears in both calculations, but the denominator changes.


WarningCommon Mistakes
  • Dividing by the grand total when the problem asks for a conditional probability.
  • Using a row total when the condition refers to a column, or vice versa.
  • Confusing a joint frequency with a joint probability.
  • Confusing marginal frequencies with interior cell counts.
  • Comparing raw counts when the groups have different sizes.
  • Reading \(P(A\mid B)\) backward: the condition is the event after the vertical bar.
  • Forgetting to check that row and column totals match the interior cells.

Practice Problems

Use the following table for Questions 1–4.

Works Part-Time Does Not Work Total
Seniors 12 10 22
Juniors 6 12 18
Total 18 22 40
  1. What is the joint frequency for seniors who work part-time?

  2. What is the marginal frequency for students who work part-time?

  3. What is the probability that a randomly selected student is a senior and works part-time?

  4. What is the probability that a student works part-time given that the student is a senior?

  5. A row in a two-way table has a total of 30. Two of its entries are 11 and 9. Find the missing entry.

  6. In Group A, 15 of 25 students play sports. In Group B, 20 of 50 students play sports. Which group has the higher participation rate?

1. Look at the intersection of:

  • Seniors
  • Works Part-Time

The joint frequency is:

\[ \boxed{12} \]


2. Use the column total for Works Part-Time.

There are:

\[ 12+6=18 \]

students who work part-time.

Therefore:

\[ \boxed{18} \]


3. This is a joint probability, so divide the joint frequency by the grand total.

The joint count is:

\[ 12 \]

and the grand total is:

\[ 40 \]

Therefore:

\[ P(\text{senior and works}) = \frac{12}{40} = \boxed{\frac{3}{10}} \]


4. The phrase given that the student is a senior restricts us to the senior row.

There are:

\[ 22 \]

seniors total, and:

\[ 12 \]

of them work part-time.

Therefore:

\[ P(\text{works}\mid\text{senior}) = \frac{12}{22} = \boxed{\frac{6}{11}} \]


5. The three entries must add to 30.

Let the missing entry be \(x\):

\[ 11+9+x=30 \]

So:

\[ x = 30-20 = \boxed{10} \]


6. Compare the participation rates.

For Group A:

\[ \frac{15}{25} = 0.60 \]

For Group B:

\[ \frac{20}{50} = 0.40 \]

Since:

\[ 0.60>0.40 \]

we conclude:

\[ \boxed{\text{Group A has the higher participation rate}} \]

Summary

A two-way table organizes data involving two categorical variables.

  • Joint frequency → an interior cell
  • Marginal frequency → a row or column total
  • Joint probability → interior cell divided by the grand total
  • Marginal probability → row or column total divided by the grand total
  • Conditional probability → joint count divided by the total of the given group

For conditional probability:

\[ \boxed{ P(A\mid B) = \frac{\text{count satisfying both }A\text{ and }B} {\text{total satisfying }B} } \]

  • Joint → look inside the table.
  • Marginal → look along the edges.
  • Given that → restrict to that group first.
  • For conditional probability, the given group’s total is the denominator.
  • Compare proportions, not just raw counts.
  • The event after the vertical bar in \(P(A\mid B)\) is the condition.
  • Check that all row and column totals are consistent.