5.3 - Conditional probability

5.3 - Conditional probability

A machine may produce most of a factory's items without producing most of its faulty items. In this part of 5.3, you will update a probability when information restricts the sample space, use tree diagrams for successive choices, and reverse a condition by keeping the correct denominator.

A restricted sample space

Machine A makes 60%60\% of a factory's items, but its fault rate is lower than machine B's. If an item is known to be faulty, is its chance of coming from A still 60%60\%? We will return to this question after learning how “given that” changes the set of possible outcomes.

Start with a count you can see. Among 5050 students, membership of music and drama clubs is as follows.

DramaNot dramaTotal
Music6612121818
Not music141418183232
Total202030305050

If a randomly chosen student is known to be in music, the relevant total is 1818, not 5050. The six students in both clubs are six of the eighteen still possible students.

Conditional probability

P(A∣B)\mathrm{P}(A\mid B) is the probability of event A given that event B has occurred. The condition restricts the sample space to B. Of B's outcomes, count the ones also in A. The vertical line means “given”, not division or “and”.

Using probabilities instead of counts gives the same ratio: divide the probability of both events by the probability of the condition.

Conditional probability

For P(B)>0\mathrm{P}(B)>0,

P(A∣B)=P(A∩B)P(B).\mathrm{P}(A\mid B)=\frac{\mathrm{P}(A\cap B)}{\mathrm{P}(B)}.

Equivalently, P(A∩B)=P(B)P(A∣B)\mathrm{P}(A\cap B)=\mathrm{P}(B)\mathrm{P}(A\mid B).
Not in the formula booklet: learn it.

A zero-probability condition gives a zero denominator, so this elementary conditional-probability formula is not defined for it. Always identify the condition before calculating.

Worked example 1: given membership of one club

Question. Using the table above, find the probability that a randomly chosen student belongs to drama, given that the student belongs to music.

Plan. Restrict the possible students to the music row and take its drama fraction.

Let D mean drama membership and M mean music membership. Then

P(D∣M)=618=13.\mathrm{P}(D\mid M)=\frac6{18}=\frac13.

Answer. 1/31/3.

Check. Using whole-group probabilities gives the same result: (6/50)/(18/50)=6/18=1/3(6/50)/(18/50)=6/18=1/3. Both numerator and denominator refer to the same original experiment.

Keep the condition and change only the target event to its complement. The denominator must stay the same.

Worked example 2: the complementary event under the same condition

Question. Using the same table, find the probability that a randomly chosen student does not belong to drama, given that the student belongs to music.

Plan. Stay within the music row, but count its twelve non-drama students.

P(D′∣M)=1218=23.\mathrm{P}(D'\mid M)=\frac{12}{18}=\frac23.

Answer. 2/32/3.

Check. Within M, drama and not drama are disjoint and exhaustive. Thus P(D∣M)+P(D′∣M)=1/3+2/3=1\mathrm{P}(D\mid M)+\mathrm{P}(D'\mid M)=1/3+2/3=1.

The whole-group probability of drama is 20/50=2/520/50=2/5; after restricting to music it is 1/31/3. This change also shows that D and M are not independent. For independent A and B with P(B)>0\mathrm{P}(B)>0, the conditional formula gives P(A∣B)=P(A)\mathrm{P}(A\mid B)=\mathrm{P}(A): the condition makes no change.

Watch out

P(D∩M)=6/50\mathrm{P}(D\cap M)=6/50 answers “both clubs”; P(D∣M)=6/18\mathrm{P}(D\mid M)=6/18 answers “drama among music members”. They use the same overlap but different sample-space totals.

Apply the restriction to a fresh table.

Tree diagrams

A probability tree records what is possible next after each earlier outcome. Probabilities on branches leaving a point are conditional on reaching that point, so they must sum to 11.

For a path containing first event A and then event B, the conditional multiplication rule gives

P(A∩B)=P(A)P(B∣A).\mathrm{P}(A\cap B)=\mathrm{P}(A)\mathrm{P}(B\mid A).

Thus multiply along a path. If several complete paths describe the requested event, add their probabilities: the different complete paths are disjoint.

Without replacement, the first selected ball changes both the remaining composition and the total. With replacement and mixing before a new random draw, the original composition is restored. Independence then follows from the unchanged draw probabilities; it is not a licence to ignore the stated sampling rule.

[DIAGRAM: asset_name: Two draws without replacement; asset_slug: probability-without-replacement-tree; caption: The second-draw probabilities depend on the first colour, and each complete path has its own product; description: A two-stage probability tree for five red and three blue balls drawn twice without replacement. First branches are R with probability 5 over 8 and B with probability 3 over 8. After R, probabilities are R 4 over 7 and B 3 over 7; after B, probabilities are R 5 over 7 and B 2 over 7. Terminal paths RR RB BR BB have products 20 over 56, 15 over 56, 15 over 56, 6 over 56. The mixed-colour paths RB and BR are highlighted consistently.]
The second-draw probabilities depend on the first colour, and each complete path has its own product

The denominators in the second stage are 77 because one ball has been removed. Only the colour removed loses one from its numerator.

Worked example 3: two different colours without replacement

Question. A bag contains five red and three blue balls. Two balls are selected at random without replacement. Find the probability that one ball of each colour is selected.

Plan. Calculate the red-blue and blue-red path probabilities, then add them.

P(RB)=5837=1556P(BR)=3857=1556P(one of each)=1556+1556=1528\begin{aligned} \mathrm{P}(RB)&=\frac58\frac37=\frac{15}{56}\\ \mathrm{P}(BR)&=\frac38\frac57=\frac{15}{56}\\ \mathrm{P}(\text{one of each})&=\frac{15}{56}+\frac{15}{56}=\frac{15}{28} \end{aligned}

Answer. 15/2815/28.

Check. Count unordered pairs instead: (51)(31)/(82)=15/28\binom51\binom31/\binom82=15/28. This independently checks both the changing denominators and the two possible orders.

Continue this lesson.

You’re previewing NovaLearn without an account. Create a free account to read the rest.

Create free account