 Teaching

Site Tools

epgy:ai13:bayes_problem_solution

There is an urn containing three balls. Each ball is either red or blue, and two balls have the same color. So, there are two possibities: either two balls are red and one is blue (the “majority-red case”) or two balls are blue and one is red (the “majority-blue” case). The probability of both cases is the same, i.e., 50%. John is allowed to draw a random ball from the urn, look at it, and put it back. Then, he has to make a guess as to whether he thinks the urn is majority-blue or majority-red. Let’s say that John has drawn a red ball. It seems natural that John should guess that the urn is probably majority-red. We now ask you to confirm this is a good guess, using Bayes’ rule.

Let “MajRed” be the event that the urn is majority-red. So, “not MajRed” is the event that the urn is not majorityred, which means that the urn is majority-blue. Let “RedBall” be the event that John picked a red ball. We are interested in the probability P(MajRed|RedBall) that the urn is majority-red given that John has picked a red ball.

• (a) What is the prior probability P(MajRed) according to the above description?
• (b) What is the conditional probability P(RedBall | MajRed)?
• © What is the conditional probability P(RedBall | not MajRed)?
• (d) Finally, using Bayes’ rule and other rules, what is the conditional probability P(MajRed | RedBall)?

John decided to declare that he thinks the urn is majority-red. Next, it’s Mary’s turn to pick a random ball from the rn, look at it, and put it back. She picks a blue ball. Now, she is in the same situation as John: she has to make a guess about the urn based on what she has seen. But, she also knows that John has seen a red ball (because otherwise he would not have said that he thinks the urn is majority red).

Mary is not sure what to think. On the one hand, she saw a blue ball, and therefore the urn is most likely majorityblue. On the other hand, she knows that John has picked a red ball, which suggests that the urn is majority-red.

We can solve this problem again using Bayes’ rule. Let “RedThenBlue” be the event that John picked a red ball, and then Mary picked a blue ball (which is what happened).

• Unordered List Item(e) What is the conditional probability P(MajRed | RedThenBlue)?

Hint: this can be computed using the same techniques as in (a)-(d).

• (a) P(MajRed) = 0.5
• (b) P(RedBall | MajRed) = 2/3
• © P(RedBall | not MajRed) = 1/3
• (d) First we have to compute P(RedBall). P(RedBall) = P(RedBall and MajRed) + P(RedBall and not MajRed) = P(MajRed) * P(RedBall | MajRed) + P(not MajRed) * P(RedBall | not MajRed) = 0.5 * 2/3 + 0.5 * 1/3 = 0.5

Next, we can use Bayes’ rule: P(MajRed | RedBall) = P(RedBall | MajRed) * P(MajRed)/P(RedBall) = 2/3 * (0.5/0.5) = 2/3.

• (e) P(RedThenBlue | RedUrn) = 2/3*1/3 = 2/9.
• P(RedThenBlue | not RedUrn) = 1/3*2/3 = 2/9.
• P(RedThenBlue) = P(RedThenBlue and MajRed) + P(RedThenBlue and not MajRed)
• = P(MajRed) * P(RedThenBlue | MajRed) + P(not MajRed) * P(RedThenBlue | not MajRed)
• = 0.5 * 2/9 + 0.5 * 2/9 = 2/9
P(RedUrn | RedThenBlue) = P(RedThenBlue | RedUrn) * P(RedUrn)/P(RedThenBlue) =

(2/9) * ((1/2) / (2/9)) = 0.5 