Educerie

Educerie · AP · Statistics

AP Statistics 2.6

Conditional Probability

How do we describe chance and variation, so that a claim about a population can be backed by numbers?

What you will learn

  • Understand that P(A given B) is the probability of A when the sample space is cut down to B
  • Know the formula P(A given B) = P(A and B) / P(B), which is on the Exam Reference Information
  • Know the general multiplication rule and when it is needed
  • Understand that P(A given B) and P(B given A) are usually different

You must be able to

  1. Calculate a conditional probability from a two-way table
  2. Calculate a conditional probability from P(A and B) and P(B)
  3. Use the general multiplication rule, for example for draws without replacement
  4. Interpret a conditional probability in context
  5. Explain why P(A given B) is not P(B given A)
  6. Show the formula, the substituted values and the answer

In the exam. Section I multiple choice often gives a two-way table and asks for a conditional probability, or gives two probabilities and asks for a joint one with the multiplication rule. Many questions are built to catch the swap of P(A∣B)P(A \mid B) with P(B∣A)P(B \mid A). In Section II, conditional probabilities arrive inside a context such as a screening test or a survey, and they lead on to independence and, later, to the idea of a p-value as a conditional probability. Skill 3.C.

1Reading the notation

P(A∣B)P(A \mid B) is read "the probability of A given B". The condition BB is after the bar and is the group you restrict to. The event AA is before the bar.

In words, three phrases signal a conditional probability:

  • "given that", as in "given that the test is positive";
  • "of those who", as in "of the students who take the bus";
  • "if", as in "if a customer pays by card".

2From a two-way table

Example (invented): a health screening is given to 1000 people. In the group, 40 have the condition and 960 do not. The test is positive for 36 of the 40 who have it, and positive for 48 of the 960 who do not. Table 1 shows the counts.

Test positiveTest negativeTotal
Has the condition36440
Does not have it48912960
Total849161000

Let DD be "has the condition" and ++ be "test is positive".

Given a positive test, what is the probability the person has the condition?

Restrict to the 84 people with a positive test. Of them, 36 have the condition.

P(D∣+)=3684≈0.429the cell over the total for the condition "+"P(D \mid +) = \frac{36}{84} \approx 0.429 \qquad \textcolor{#838c91}{\text{the cell over the total for the condition "+"}}

The same answer comes from the formula, with counts over 1000:

P(D∣+)=P(D∩+)P(+)=36/100084/1000=3684the 1000 cancelsP(D \mid +) = \frac{P(D \cap +)}{P(+)} = \frac{36/1000}{84/1000} = \frac{36}{84} \qquad \textcolor{#838c91}{\text{the 1000 cancels}}

Given that the person has the condition, what is the probability of a positive test?

P(+∣D)=3640=0.90now the condition is "has the condition": restrict to the 40P(+ \mid D) = \frac{36}{40} = 0.90 \qquad \textcolor{#838c91}{\text{now the condition is "has the condition": restrict to the 40}}

The two answers are very different. 90% of the people who have the condition test positive, but only about 43% of those who test positive have it. The reason is the denominator: the 84 positives include 48 people without the condition.

In a table, the sample space shrinks to the row or column of the condition. You never need the formula for a table, but you must be able to write what you did: "36 out of the 84 people who tested positive".

3Never swap the two

P(A∣B)P(A \mid B) and P(B∣A)P(B \mid A) are usually different. They share the numerator, P(A∩B)P(A \cap B), and they have different denominators, P(B)P(B) and P(A)P(A).

P(D∣+)=0.429P(+∣D)=0.90same numerator, different conditionsP(D \mid +) = 0.429 \qquad P(+ \mid D) = 0.90 \qquad \textcolor{#838c91}{\text{same numerator, different conditions}}

A test that picks up 90% of the cases (the second figure) can still have most of its positives wrong when the condition is rare (the first figure). Always ask: what is the group I am told about, and so what is the denominator?

4The general multiplication rule

Rearranging P(B∣A)=P(A∩B)/P(A)P(B \mid A) = P(A \cap B)/P(A) gives the rule for "A and B":

P(A∩B)=P(A)⋅P(B∣A)the chance of A, then the chance of B once A has happenedP(A \cap B) = P(A) \cdot P(B \mid A) \qquad \textcolor{#838c91}{\text{the chance of A, then the chance of B once A has happened}}

Use it when the joint probability is wanted and the second probability depends on what has happened first.

Worked example 1 (without replacement). A group of 10 students has 4 seniors and 6 juniors. Two are chosen at random to give a talk. What is the probability that both are seniors?

Let S1S_1 be "the first chosen is a senior" and S2S_2 be "the second chosen is a senior". After one senior has been taken, 3 seniors remain among 9 students.

P(S1∩S2)=P(S1)⋅P(S2∣S1)=410⋅39=1290≈0.133the second probability uses the changed groupP(S_1 \cap S_2) = P(S_1) \cdot P(S_2 \mid S_1) = \frac{4}{10} \cdot \frac{3}{9} = \frac{12}{90} \approx 0.133 \qquad \textcolor{#838c91}{\text{the second probability uses the changed group}}

Worked example 2 (from stated probabilities). 60% of the students at a school ride the bus. Of the students who ride the bus, 25% are late at least once a month. What is the probability that a randomly chosen student rides the bus and is late at least once a month?

Let AA be "rides the bus" and BB be "late at least once a month". P(A)=0.60P(A) = 0.60 and P(B∣A)=0.25P(B \mid A) = 0.25.

P(A∩B)=0.60×0.25=0.1515% of all students ride the bus and are lateP(A \cap B) = 0.60 \times 0.25 = 0.15 \qquad \textcolor{#838c91}{\text{15\% of all students ride the bus and are late}}

Note that 0.25 is a percentage of the bus riders, not of all students, so it cannot be the answer. It must be multiplied by the share of students who are bus riders.

5A conditional probability from the multiplication rule

Continue the bus example. Of the students who do not ride the bus, 10% are late at least once a month. We want the probability that a student rides the bus, given that the student is late at least once a month.

First find P(B)P(B). A late student either rides the bus or does not, and these cannot overlap, so add the two joint probabilities.

P(B)=P(A∩B)+P(A′∩B)=0.60(0.25)+0.40(0.10)=0.15+0.04=0.19two ways to be lateP(B) = P(A \cap B) + P(A' \cap B) = 0.60(0.25) + 0.40(0.10) = 0.15 + 0.04 = 0.19 \qquad \textcolor{#838c91}{\text{two ways to be late}}

Now use the definition:

P(A∣B)=P(A∩B)P(B)=0.150.19≈0.789the share of the late students who ride the busP(A \mid B) = \frac{P(A \cap B)}{P(B)} = \frac{0.15}{0.19} \approx 0.789 \qquad \textcolor{#838c91}{\text{the share of the late students who ride the bus}}

Among the late students, about 79% ride the bus. This is a very different number from P(B∣A)=0.25P(B \mid A) = 0.25, the share of bus riders who are late.

Practice questions

30 questions on this note, from easy to hard. Each one you get right lights a star of this topic's constellation.