On Bayes’ Rule
Question 1: Which Card Box Was Selected?
Question: One of two card boxes is selected.
Box \(B_1\) is selected with probability \(\frac{2}{5}\) and contains 4 red cards and 1 black card.
Box \(B_2\) is selected with probability \(\frac{3}{5}\) and contains 1 red card and 4 black cards.
One card is drawn from the selected box.
Let \(R\) be the event that the card is red.
Find:
\(P(R\mid B_1)\) and \(P(R\mid B_2)\);
the overall probability \(P(R)\);
\(P(B_1\mid R)\); and
compare \(P(B_1)\) with \(P(B_1\mid R)\) and explain what the observed red card tells us.
Solution:
Part (a): Probability of red within each box
If Box \(B_1\) is known to have been selected, 4 of its 5 cards are red.
Therefore,
If Box \(B_2\) is known to have been selected, only 1 of its 5 cards is red.
Therefore,
Thus,
These are conditional probabilities. They answer:
If I know which box was selected, how likely is a red card?
Part (b): Find the overall probability of red
A red card can occur through two possible paths:
or
For the first path,
For the second path,
The two boxes form a partition, so the two paths do not overlap.
Using total probability,
Therefore,
Thus,
Part (c): Find \(P(B_1\mid R)\)
Now the condition is reversed.
We observed a red card and want to know which box was likely selected.
Bayes’ rule gives
The numerator is the desired path:
The denominator is the probability of all paths leading to red:
Therefore,
Thus,
Part (d): Compare the prior and posterior probabilities
Before observing the card,
After observing a red card,
Therefore, the probability of Box \(B_1\) increases:
Why?
A red card is much more likely from Box \(B_1\):
compared with
So observing red gives evidence in favor of Box \(B_1\).
Note
Bayes’ rule reverses the direction of the condition.
We begin with probabilities such as
and use the observed event \(R\) to find
Question 2: Which Die Was Used?
Question: One of three dice is selected.
Die \(D_1\) is selected with probability \(\frac{1}{2}\), and \(P(6\mid D_1)=\frac{1}{6}\).
Die \(D_2\) is selected with probability \(\frac{3}{10}\), and \(P(6\mid D_2)=\frac{1}{3}\).
Die \(D_3\) is selected with probability \(\frac{1}{5}\), and \(P(6\mid D_3)=\frac{1}{2}\).
The selected die is rolled once and a 6 is observed.
Find:
the probability of each path leading to a 6;
the overall probability of rolling a 6;
\(P(D_1\mid 6)\), \(P(D_2\mid 6)\), and \(P(D_3\mid 6)\); and
identify the most likely die after observing the 6 and explain why the answer is not determined only by the largest value of \(P(6\mid D_i)\).
Solution:
Part (a): Calculate each path to a 6
For Die \(D_1\),
For Die \(D_2\),
For Die \(D_3\),
Thus, the three path probabilities are
Notice that Die \(D_3\) has the largest probability of producing a 6 once it has been selected, but it also has the smallest starting probability of being selected.
Part (b): Find the overall probability of rolling a 6
A 6 can occur through any of the three dice.
Using total probability,
Therefore,
Using a common denominator of 60,
Thus,
Part (c): Find the posterior probability of each die
For Die \(D_1\),
Therefore,
For Die \(D_2\),
For Die \(D_3\),
Thus,
As a check,
This must happen because exactly one of the three dice was selected.
Part (d): Which die is most likely?
After observing the 6,
So Dice \(D_2\) and \(D_3\) are tied as the most likely sources.
This may seem surprising because
is larger than
However, Die \(D_2\) had a larger starting probability:
compared with
Bayes’ rule uses both pieces of information:
how likely the case was before the observation; and
how likely the observation is within that case.
Note
Do not choose a case only because it has the largest conditional probability \(P(A\mid B_i)\).
Bayes’ rule uses the path probability
Question 3: Standard Deck or Special Deck?
Question: Before drawing a card, one of two decks is selected.
A standard 52-card deck is selected with probability \(\frac{9}{10}\).
A special 20-card deck is selected with probability \(\frac{1}{10}\).
The standard deck contains 4 aces. The special deck contains 5 aces.
One card is drawn from the selected deck and is found to be an ace.
Let
\(S\) = the standard deck was selected;
\(T\) = the special deck was selected;
\(A\) = an ace was drawn.
Find:
\(P(A\mid S)\) and \(P(A\mid T)\);
the overall probability \(P(A)\);
\(P(T\mid A)\); and
compare \(P(T)\) with \(P(T\mid A)\) and explain why the posterior probability is not simply \(P(A\mid T)\).
Solution:
Part (a): Probability of an ace from each deck
For the standard deck,
For the special deck,
Therefore,
An ace is more likely if the special deck is used.
Part (b): Find the overall probability of an ace
An ace can be obtained through either deck.
Using total probability,
Substitute the values:
Therefore,
Using a common denominator of 520,
Thus,
Part (c): Find \(P(T\mid A)\)
We observed an ace and want the probability that the special deck was used.
Bayes’ rule gives
The desired path is
Therefore,
Thus,
Part (d): Explain the effect of the starting probability
Before seeing the card,
After observing an ace,
The probability of the special deck increases because an ace is more likely under the special deck.
However,
In fact,
while
More importantly, Bayes’ rule does not use only \(P(A\mid T)\).
It also uses the starting probability
The standard deck was much more likely to be selected initially:
Therefore, many aces can still come from the standard-deck path even though an ace is less likely within that deck.
Note
The observed event updates the starting probability.
It does not erase the starting probability.
Question 4: One Head Versus Two Heads
Question: One of two coins is selected.
Coin \(C_1\) is selected with probability \(0.70\) and is fair, so \(P(H\mid C_1)=0.50\).
Coin \(C_2\) is selected with probability \(0.30\) and has \(P(H\mid C_2)=0.80\).
The selected coin is tossed twice. Assume that the tosses are independent once the coin has been selected.
Find:
\(P(HH\mid C_1)\) and \(P(HH\mid C_2)\);
the overall probability \(P(HH)\);
\(P(C_2\mid HH)\); and
first find \(P(C_2\mid H)\) after observing only one head, then compare the three probabilities \(P(C_2)\), \(P(C_2\mid H)\), and \(P(C_2\mid HH)\).
Solution:
Part (a): Probability of two heads under each coin
For Coin \(C_1\), each toss has probability \(0.50\) of heads.
Because the tosses are independent once the coin is known,
For Coin \(C_2\),
Thus,
Two heads are much more likely under Coin \(C_2\).
Part (b): Find the overall probability of two heads
The event \(HH\) can occur through either coin.
Using total probability,
Therefore,
Calculate the two paths:
and
Thus,
Therefore,
Part (c): Find \(P(C_2\mid HH)\)
Bayes’ rule gives
Substitute the values:
Therefore,
Before any tosses, Coin \(C_2\) had only a 0.30 probability of being selected.
After observing two heads, it becomes slightly more likely than Coin \(C_1\).
Part (d): Compare the effect of one head and two heads
First find the overall probability of one head on the first toss:
Therefore,
Now apply Bayes’ rule:
Thus,
We now have
and
Therefore,
One head increases the probability that Coin \(C_2\) was selected.
A second head provides more evidence in the same direction because heads are more likely under Coin \(C_2\).
Note
Repeated observations can strengthen the update when the observations are more consistent with one possible case than another.
Question 5: An Odd Result from One of Two Dice
Question: One of two dice is selected.
Die \(D_1\) is selected with probability \(\frac{2}{5}\) and is fair.
Die \(D_2\) is selected with probability \(\frac{3}{5}\) and is loaded so that the probability of an even result is \(\frac{5}{6}\).
The selected die is rolled once and an odd number is observed.
Let \(O\) be the event that the result is odd.
Find:
\(P(O\mid D_1)\) and \(P(O\mid D_2)\);
the overall probability \(P(O)\);
\(P(D_1\mid O)\); and
\(P(D_2\mid O)\) and explain how observing an odd result changes the relative likelihood of the two dice.
Solution:
Part (a): Probability of an odd result under each die
Die \(D_1\) is fair.
Three of the six possible results are odd:
Therefore,
For Die \(D_2\), we are given
Odd and even are complementary events.
Therefore,
Thus,
An odd result is three times as likely under Die \(D_1\) as under Die \(D_2\).
Part (b): Find the overall probability of an odd result
An odd result can occur through either die.
Using total probability,
Substitute the values:
The two path probabilities are
and
Therefore,
Thus,
Part (c): Find \(P(D_1\mid O)\)
Bayes’ rule gives
Therefore,
Thus,
Part (d): Find \(P(D_2\mid O)\) and interpret the update
Using Bayes’ rule,
Therefore,
Thus,
Before the roll,
and
So Die \(D_2\) was initially more likely to have been selected.
After observing an odd number,
and
The observation reverses which die is more likely.
Why?
An odd result is much more compatible with Die \(D_1\):
compared with
The observation therefore provides evidence in favor of Die \(D_1\).
As a check,
Note
A Bayes’ rule problem combines three ideas:
multiply within each possible path;
add all paths leading to the observed event;
divide the desired path by the total probability of the observed event.