Discord

INAIO Guide Stage 1 8Probability

8.3 Conditional probability

Restrict the sample space to a known condition, then divide the overlap by the probability of that condition.

The phrase “given that” changes a probability question. Once you know a result passed a filter, results outside that filter no longer belong in the denominator. This idea is needed for Bayes' theorem, classifier questions, and probability trees.

This is intermediate probability. Start with OpenStax's conditional-probability examples. A table of counts is often easier to read than a formula at first.

A basic idea: which group are we asking about?

Suppose a batch contains 100100 items, of which 2020 are faulty. If we choose an item at random without knowing anything else, the chance that it is faulty is 20/100=0.2020/100=0.20. That is the ordinary, or unconditional, probability: the denominator is the whole batch.

Now suppose we are told that the chosen item was flagged by a test. The table shows that only 1010 items were flagged: 88 faulty and 22 sound. The question has changed. We are no longer asking about faults among all 100100 items; we are asking about faults among the 1010 flagged items. That chance is 8/10=0.808/10=0.80. The test did not change the item. The new information changed which group we consider possible.

Let AA mean “faulty” and BB mean “flagged.” We write this new question as P(A∣B)P(A\mid B), read “the probability of AA given BB.” The event after the bar is the known condition. It supplies the new denominator; we then count how much of that smaller group also belongs to the event before the bar.

A two-way table of 100 items shows 8 faulty flagged, 2 sound flagged, 12 faulty unflagged, and 78 sound unflagged; the flagged row of 10 is highlighted.A two-way table of 100 items shows 8 faulty flagged, 2 sound flagged, 12 faulty unflagged, and 78 sound unflagged; the flagged row of 10 is highlighted.
After conditioning on a flag, count inside the highlighted row.

A quick tour of rules

If P(B)>0P(B)>0, then

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

Rearrange to get P(A∩B)=P(B)P(A∣B)P(A\cap B)=P(B)P(A\mid B). You may instead condition on AA, but P(A∣B)P(A\mid B) and P(B∣A)P(B\mid A) generally differ. Always label which event is the known condition.

Application 1: a filtered die roll

A fair die shows an even number. What is the probability that it is greater than 33?

  1. The condition leaves {2,4,6}\{2,4,6\}.
  2. Of these three equally likely outcomes, {4,6}\{4,6\} are greater than 33.
  3. The answer is 2/32/3, not 3/63/6 from the original die.

Application 2: a flagged batch

Out of 100 items, 20 are faulty. A test flags 8 faulty items and 2 sound items. If an item chosen at random is flagged, what is the chance it is faulty?

  1. The known condition is “flagged,” which occurs for 8+2=108+2=10 items.
  2. The overlap “faulty and flagged” contains 88 items.
  3. P(faulty∣flagged)=8/10=0.8P(\text{faulty}\mid\text{flagged})=8/10=0.8.

By contrast, P(flagged∣faulty)=8/20=0.4P(\text{flagged}\mid\text{faulty})=8/20=0.4. Reversing the condition changes the denominator.

Resources

SourceTitleWhy read it
OpenStaxProbability terminologySee conditional probability as a reduced sample space.

Finished this module? Mark it done.

Comments

Stuck on something, spotted a mistake, or found a resource that helped you? Tell us below.

Loading comments