This question is about the Bayes' Theorem.
You are given two boxes. Box 1 contains 5 red, 5 green, and 3 blue balls, and Box 2 contains 4 red, 3 green, and 2 yellow balls. You are asked to randomly pick one of the two boxes. Holding that box, you grab one ball at random, and then set the box back down. You found out that it is a red ball. Let A be the event that you choose Box 1, and let B be the event that you choose a red ball. a. What’s p(A|B)? b. What’s p(B|A)?
A be the event that you choose Box 1
P[ A ] = 1/2 = 0.5
P[ not A ] = 1 - P[ A ] = 1 - 0.5 = 0.5
P[ Drawing red ball from box 1 ] = P[ B | A ] = 5/(5+5+3) = 5/13
P[ Drawing red ball from box 2 ] = P[ B | not A ] = 4 / ( 4 + 3 + 2 ) = 4/9
B be the event that you choose a red ball
P[ B ] = P[ B | A ]*P[ A ] + P[ B | not A ]*P[ not A ]
P[ B ] = (5/13)*(0.5) + (4/9)*0.5
P[ B ] = 5/26 + 2/9
P[ B ] = 97/234
P[ A | B ] = P[ B | A ]*P[ A ] / P[ B ]
P[ A | B ] = (5/13)*(0.5) / 97/234
P[ A | B ] = (5/26)/(97/234)
P[ A | B ] = 45/97
P[ A | B ] = 0.4639
Get Answers For Free
Most questions answered within 1 hours.