AP Statistics · Lesson 1

Two-way tables and probability rules

Know Know it

A two-way table counts individuals by two categorical variables. A joint proportion uses one cell over the grand total. A marginal proportion uses a row or column total over the grand total. A conditional proportion uses one cell over the total of its own row or column.

Two categorical variables are associated when the conditional distributions differ. Compare the percent of seniors who drive with the percent of juniors who drive, not the raw counts, because the groups have different sizes.

The rules for any events A and B: 0≤P(A)≤10 \leq P(A) \leq 1; the complement is P(not A)=1−P(A)P(\text{not } A) = 1 - P(A); the general addition rule is P(A or B)=P(A)+P(B)−P(A and B)P(A \text{ or } B) = P(A) + P(B) - P(A \text{ and } B).

Conditional probability is P(A∣B)=P(A and B)P(B)P(A \mid B) = \frac{P(A \text{ and } B)}{P(B)}. Turned around, it gives the multiplication rule P(A and B)=P(B)⋅P(A∣B)P(A \text{ and } B) = P(B) \cdot P(A \mid B).

Events are mutually exclusive when they cannot both happen, so P(A and B)=0P(A \text{ and } B) = 0. Events are independent when P(A∣B)=P(A)P(A \mid B) = P(A); then P(A and B)=P(A)⋅P(B)P(A \text{ and } B) = P(A) \cdot P(B). These are different ideas: two mutually exclusive events with positive probabilities are never independent, because one happening rules the other out.

Worked example Easy

How 200 students at a fictional high school get to school

GradeCarBusWalk or bikeTotal
Junior30402090
Senior603020110
Total907040200

What proportion of the seniors get to school by car?

  1. 0.667
  2. 0.300
  3. 0.545Answer
  4. 0.450

How to solve it

  1. The phrase "of the seniors" names the group, so the denominator is the senior row total, 110.
  2. The seniors who come by car are in the Senior row, Car column: 60.
  3. 60110≈0.545\frac{60}{110} \approx 0.545.

Why each choice is right or wrong

  • A. Incorrect. 0.667 is 60/90, the proportion of car riders who are seniors, which conditions on the wrong group.
  • B. Incorrect. 0.300 is 60/200, the joint proportion of all students who are seniors and come by car.
  • C. Correct. The group is the 110 seniors, and 60 of them come by car, so the proportion is 60/110, about 0.545.
  • D. Incorrect. 0.450 is 90/200, the marginal proportion of all students who come by car, seniors or not.

Trap The given group goes in the denominator

P(car∣senior)P(\text{car} \mid \text{senior}) and P(senior∣car)P(\text{senior} \mid \text{car}) are different numbers. In the table, 60110≈0.545\frac{60}{110} \approx 0.545 of seniors drive, but 6090≈0.667\frac{60}{90} \approx 0.667 of drivers are seniors. Read the condition first and divide by that group's total.

Explain Explain it

Task verbs: calculate, explain

When a problem gives percents of percents, draw a tree. The first branches are the first event, the second branches are conditional on the first, and you multiply along a path to get a joint probability. To reverse the condition, divide the joint probability of the path you want by the total probability of every path that leads to the given event.

To test independence, compare a conditional probability with the matching unconditional one, using numbers. If P(A∣B)P(A \mid B) differs from P(A)P(A), the events are not independent, and you say how knowing B changes the chance of A.

Worked example Medium

At a fictional clinic, 4 percent of the patients screened have a certain condition. The screening test is positive for 90 percent of patients who have the condition and for 8 percent of patients who do not have it.

A patient's test is positive. What is the probability that the patient has the condition?

  1. 0.900
  2. 0.036
  3. 0.113
  4. 0.319Answer

How to solve it

  1. Condition and positive: 0.04⋅0.90=0.0360.04 \cdot 0.90 = 0.036.
  2. No condition and positive: 0.96⋅0.08=0.07680.96 \cdot 0.08 = 0.0768.
  3. P(positive)=0.036+0.0768=0.1128P(\text{positive}) = 0.036 + 0.0768 = 0.1128.
  4. P(condition∣positive)=0.0360.1128≈0.319P(\text{condition} \mid \text{positive}) = \frac{0.036}{0.1128} \approx 0.319. Most positive tests come from the much larger group without the condition.

Why each choice is right or wrong

  • A. Incorrect. 0.900 is the probability of a positive test given the condition, which reverses the condition the question asks about.
  • B. Incorrect. 0.036 is the joint probability of having the condition and testing positive, not a probability given a positive test.
  • C. Incorrect. 0.113 is the total probability of a positive test, which is the denominator, not the final answer.
  • D. Correct. A positive test happens with probability 0.036 + 0.0768 = 0.1128, and 0.036 of that comes from patients with the condition, so the answer is 0.036/0.1128, about 0.319.

Explain Your turn

At a fictional high school, 200 students were surveyed. Of the 200, 90 get to school by car and 110 are seniors, and 60 of those 110 seniors get to school by car. One of the 200 students is picked at random. Explain, using numbers, whether the events "the student is a senior" and "the student gets to school by car" are independent.

Write it, then compare. Nothing you type here is saved or graded.

Compare with a model answer

A full answer does this

  • Compares a conditional probability with the matching overall probability, with both values
  • Concludes the events are not independent because the two probabilities differ

Model answer

P(car) = 90/200 = 0.45, but P(car given senior) = 60/110, about 0.545. Knowing that the student is a senior raises the chance of coming by car from 0.45 to about 0.545, so the two probabilities differ and the events are not independent.

Apply Apply it

Practice these topics. AP Practice questions on exactly what this lesson covers, with an explanation for every answer.