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:

  1. \(P(R\mid B_1)\) and \(P(R\mid B_2)\);

  2. the overall probability \(P(R)\);

  3. \(P(B_1\mid R)\); and

  4. 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,

\[P(R\mid B_1) = \frac{4}{5}.\]

If Box \(B_2\) is known to have been selected, only 1 of its 5 cards is red.

Therefore,

\[P(R\mid B_2) = \frac{1}{5}.\]

Thus,

\[\boxed{ P(R\mid B_1)=\frac{4}{5}, \qquad P(R\mid B_2)=\frac{1}{5} }.\]

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:

\[B_1\rightarrow R\]

or

\[B_2\rightarrow R.\]

For the first path,

\[P(B_1\cap R) = P(B_1)P(R\mid B_1) = \frac{2}{5}\times\frac{4}{5} = \frac{8}{25}.\]

For the second path,

\[P(B_2\cap R) = P(B_2)P(R\mid B_2) = \frac{3}{5}\times\frac{1}{5} = \frac{3}{25}.\]

The two boxes form a partition, so the two paths do not overlap.

Using total probability,

\[P(R) = P(B_1)P(R\mid B_1) + P(B_2)P(R\mid B_2).\]

Therefore,

\[P(R) = \frac{8}{25} + \frac{3}{25} = \frac{11}{25}.\]

Thus,

\[\boxed{P(R)=\frac{11}{25}}.\]

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

\[P(B_1\mid R) = \frac{ P(B_1)P(R\mid B_1) }{ P(R) }.\]

The numerator is the desired path:

\[P(B_1)P(R\mid B_1) = \frac{8}{25}.\]

The denominator is the probability of all paths leading to red:

\[P(R)=\frac{11}{25}.\]

Therefore,

\[P(B_1\mid R) = \frac{8/25}{11/25} = \frac{8}{11}.\]

Thus,

\[\boxed{P(B_1\mid R)=\frac{8}{11}\approx0.727}.\]

Part (d): Compare the prior and posterior probabilities

Before observing the card,

\[P(B_1)=\frac{2}{5}=0.40.\]

After observing a red card,

\[P(B_1\mid R) = \frac{8}{11} \approx0.727.\]

Therefore, the probability of Box \(B_1\) increases:

\[0.40 \quad\longrightarrow\quad 0.727.\]

Why?

A red card is much more likely from Box \(B_1\):

\[P(R\mid B_1)=\frac{4}{5}\]

compared with

\[P(R\mid B_2)=\frac{1}{5}.\]

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

\[P(R\mid B_1)\]

and use the observed event \(R\) to find

\[P(B_1\mid R).\]

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:

  1. the probability of each path leading to a 6;

  2. the overall probability of rolling a 6;

  3. \(P(D_1\mid 6)\), \(P(D_2\mid 6)\), and \(P(D_3\mid 6)\); and

  4. 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\),

\[P(D_1\cap 6) = P(D_1)P(6\mid D_1) = \frac{1}{2}\times\frac{1}{6} = \frac{1}{12}.\]

For Die \(D_2\),

\[P(D_2\cap 6) = \frac{3}{10}\times\frac{1}{3} = \frac{1}{10}.\]

For Die \(D_3\),

\[P(D_3\cap 6) = \frac{1}{5}\times\frac{1}{2} = \frac{1}{10}.\]

Thus, the three path probabilities are

\[\boxed{ \frac{1}{12}, \qquad \frac{1}{10}, \qquad \frac{1}{10} }.\]

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,

\[P(6) = P(D_1)P(6\mid D_1) + P(D_2)P(6\mid D_2) + P(D_3)P(6\mid D_3).\]

Therefore,

\[P(6) = \frac{1}{12} + \frac{1}{10} + \frac{1}{10}.\]

Using a common denominator of 60,

\[P(6) = \frac{5}{60} + \frac{6}{60} + \frac{6}{60} = \frac{17}{60}.\]

Thus,

\[\boxed{P(6)=\frac{17}{60}}.\]

Part (c): Find the posterior probability of each die

For Die \(D_1\),

\[P(D_1\mid 6) = \frac{P(D_1)P(6\mid D_1)}{P(6)} = \frac{1/12}{17/60}.\]

Therefore,

\[P(D_1\mid 6) = \frac{5}{17}.\]

For Die \(D_2\),

\[P(D_2\mid 6) = \frac{1/10}{17/60} = \frac{6}{17}.\]

For Die \(D_3\),

\[P(D_3\mid 6) = \frac{1/10}{17/60} = \frac{6}{17}.\]

Thus,

\[\boxed{ P(D_1\mid 6)=\frac{5}{17}, \qquad P(D_2\mid 6)=\frac{6}{17}, \qquad P(D_3\mid 6)=\frac{6}{17} }.\]

As a check,

\[\frac{5}{17} + \frac{6}{17} + \frac{6}{17} = 1.\]

This must happen because exactly one of the three dice was selected.

Part (d): Which die is most likely?

After observing the 6,

\[P(D_2\mid 6) = P(D_3\mid 6) = \frac{6}{17}.\]

So Dice \(D_2\) and \(D_3\) are tied as the most likely sources.

This may seem surprising because

\[P(6\mid D_3)=\frac{1}{2}\]

is larger than

\[P(6\mid D_2)=\frac{1}{3}.\]

However, Die \(D_2\) had a larger starting probability:

\[P(D_2)=\frac{3}{10}\]

compared with

\[P(D_3)=\frac{1}{5}.\]

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

\[P(B_i)P(A\mid B_i).\]

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:

  1. \(P(A\mid S)\) and \(P(A\mid T)\);

  2. the overall probability \(P(A)\);

  3. \(P(T\mid A)\); and

  4. 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,

\[P(A\mid S) = \frac{4}{52} = \frac{1}{13}.\]

For the special deck,

\[P(A\mid T) = \frac{5}{20} = \frac{1}{4}.\]

Therefore,

\[\boxed{ P(A\mid S)=\frac{1}{13}, \qquad P(A\mid T)=\frac{1}{4} }.\]

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,

\[P(A) = P(S)P(A\mid S) + P(T)P(A\mid T).\]

Substitute the values:

\[P(A) = \frac{9}{10}\times\frac{1}{13} + \frac{1}{10}\times\frac{1}{4}.\]

Therefore,

\[P(A) = \frac{9}{130} + \frac{1}{40}.\]

Using a common denominator of 520,

\[P(A) = \frac{36}{520} + \frac{13}{520} = \frac{49}{520}.\]

Thus,

\[\boxed{P(A)=\frac{49}{520}}.\]

Part (c): Find \(P(T\mid A)\)

We observed an ace and want the probability that the special deck was used.

Bayes’ rule gives

\[P(T\mid A) = \frac{ P(T)P(A\mid T) }{ P(A) }.\]

The desired path is

\[P(T)P(A\mid T) = \frac{1}{10}\times\frac{1}{4} = \frac{1}{40} = \frac{13}{520}.\]

Therefore,

\[P(T\mid A) = \frac{13/520}{49/520} = \frac{13}{49}.\]

Thus,

\[\boxed{P(T\mid A)=\frac{13}{49}\approx0.265}.\]

Part (d): Explain the effect of the starting probability

Before seeing the card,

\[P(T)=\frac{1}{10}=0.10.\]

After observing an ace,

\[P(T\mid A) = \frac{13}{49} \approx0.265.\]

The probability of the special deck increases because an ace is more likely under the special deck.

However,

\[P(T\mid A)\neq P(A\mid T).\]

In fact,

\[P(A\mid T)=\frac{1}{4}=0.25,\]

while

\[P(T\mid A)\approx0.265.\]

More importantly, Bayes’ rule does not use only \(P(A\mid T)\).

It also uses the starting probability

\[P(T)=0.10.\]

The standard deck was much more likely to be selected initially:

\[P(S)=0.90.\]

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:

  1. \(P(HH\mid C_1)\) and \(P(HH\mid C_2)\);

  2. the overall probability \(P(HH)\);

  3. \(P(C_2\mid HH)\); and

  4. 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,

\[P(HH\mid C_1) = (0.50)(0.50) = 0.25.\]

For Coin \(C_2\),

\[P(HH\mid C_2) = (0.80)(0.80) = 0.64.\]

Thus,

\[\boxed{ P(HH\mid C_1)=0.25, \qquad P(HH\mid C_2)=0.64 }.\]

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,

\[P(HH) = P(C_1)P(HH\mid C_1) + P(C_2)P(HH\mid C_2).\]

Therefore,

\[P(HH) = (0.70)(0.25) + (0.30)(0.64).\]

Calculate the two paths:

\[(0.70)(0.25)=0.175\]

and

\[(0.30)(0.64)=0.192.\]

Thus,

\[P(HH) = 0.175+0.192 = 0.367.\]

Therefore,

\[\boxed{P(HH)=0.367}.\]

Part (c): Find \(P(C_2\mid HH)\)

Bayes’ rule gives

\[P(C_2\mid HH) = \frac{ P(C_2)P(HH\mid C_2) }{ P(HH) }.\]

Substitute the values:

\[P(C_2\mid HH) = \frac{(0.30)(0.64)}{0.367} = \frac{0.192}{0.367}.\]

Therefore,

\[\boxed{ P(C_2\mid HH) = \frac{192}{367} \approx0.523 }.\]

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:

\[P(H) = P(C_1)P(H\mid C_1) + P(C_2)P(H\mid C_2).\]

Therefore,

\[P(H) = (0.70)(0.50) + (0.30)(0.80) = 0.35+0.24 = 0.59.\]

Now apply Bayes’ rule:

\[P(C_2\mid H) = \frac{ (0.30)(0.80) }{ 0.59 }.\]

Thus,

\[P(C_2\mid H) = \frac{0.24}{0.59} = \frac{24}{59} \approx0.407.\]

We now have

\[P(C_2)=0.30,\]
\[P(C_2\mid H)\approx0.407,\]

and

\[P(C_2\mid HH)\approx0.523.\]

Therefore,

\[0.30 \quad\longrightarrow\quad 0.407 \quad\longrightarrow\quad 0.523.\]

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:

  1. \(P(O\mid D_1)\) and \(P(O\mid D_2)\);

  2. the overall probability \(P(O)\);

  3. \(P(D_1\mid O)\); and

  4. \(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:

\[1,3,5.\]

Therefore,

\[P(O\mid D_1) = \frac{3}{6} = \frac{1}{2}.\]

For Die \(D_2\), we are given

\[P(\text{even}\mid D_2)=\frac{5}{6}.\]

Odd and even are complementary events.

Therefore,

\[P(O\mid D_2) = 1-\frac{5}{6} = \frac{1}{6}.\]

Thus,

\[\boxed{ P(O\mid D_1)=\frac{1}{2}, \qquad P(O\mid D_2)=\frac{1}{6} }.\]

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,

\[P(O) = P(D_1)P(O\mid D_1) + P(D_2)P(O\mid D_2).\]

Substitute the values:

\[P(O) = \frac{2}{5}\times\frac{1}{2} + \frac{3}{5}\times\frac{1}{6}.\]

The two path probabilities are

\[\frac{2}{5}\times\frac{1}{2} = \frac{1}{5}\]

and

\[\frac{3}{5}\times\frac{1}{6} = \frac{1}{10}.\]

Therefore,

\[P(O) = \frac{1}{5} + \frac{1}{10} = \frac{3}{10}.\]

Thus,

\[\boxed{P(O)=\frac{3}{10}}.\]

Part (c): Find \(P(D_1\mid O)\)

Bayes’ rule gives

\[P(D_1\mid O) = \frac{ P(D_1)P(O\mid D_1) }{ P(O) }.\]

Therefore,

\[P(D_1\mid O) = \frac{1/5}{3/10} = \frac{2}{3}.\]

Thus,

\[\boxed{P(D_1\mid O)=\frac{2}{3}}.\]

Part (d): Find \(P(D_2\mid O)\) and interpret the update

Using Bayes’ rule,

\[P(D_2\mid O) = \frac{ P(D_2)P(O\mid D_2) }{ P(O) }.\]

Therefore,

\[P(D_2\mid O) = \frac{1/10}{3/10} = \frac{1}{3}.\]

Thus,

\[\boxed{P(D_2\mid O)=\frac{1}{3}}.\]

Before the roll,

\[P(D_1)=\frac{2}{5}=0.40\]

and

\[P(D_2)=\frac{3}{5}=0.60.\]

So Die \(D_2\) was initially more likely to have been selected.

After observing an odd number,

\[P(D_1\mid O)=\frac{2}{3}\]

and

\[P(D_2\mid O)=\frac{1}{3}.\]

The observation reverses which die is more likely.

Why?

An odd result is much more compatible with Die \(D_1\):

\[P(O\mid D_1)=\frac{1}{2}\]

compared with

\[P(O\mid D_2)=\frac{1}{6}.\]

The observation therefore provides evidence in favor of Die \(D_1\).

As a check,

\[P(D_1\mid O)+P(D_2\mid O) = \frac{2}{3}+\frac{1}{3} = 1.\]

Note

A Bayes’ rule problem combines three ideas:

  1. multiply within each possible path;

  2. add all paths leading to the observed event;

  3. divide the desired path by the total probability of the observed event.