In: Statistics and Probability
16.
Number of red candies in Jar A = 4
Number of black candies in Jar A = 5
Total number of candies in Jar A =4+5 =9
Number of red candies in Jar B = 6
Number of black candies in Jar B = 2
Total number of candies in Jar B =6+2 =8
A : Event of selecting Jar A
B : Event of selecting Jar B
Jar A is selected if a number divisible by 3 come up when a die is rolled:
Numbers (in 1 to 6) divisible by 3 are : 3 and 6;
P(A) = Probability of selecting Jar A = Probability of a number divisible by 3 comes up = 2/6 =1/3
P(B) = 1-P(A) = 1-2/6 = 4/6 =2/3
a)
R : Event of getting a red candy
Probability you selected Jar A and got a red candy = P(A and R)
By multiplication theorem of probability
P(A and R)= P(A)P(R|A)
P(R|A) = Probability of getting a red candy given that Jar A is selected = Number of red candies in Jar A/Total number of candies in Jar A = 4/9
P(A) = 1/3
P(A and R)= P(A)P(R|A) = (1/3) x (4/9) = 4/27
Probability you selected Jar A and got a red candy = 4/27
b)
Probability you selected Jar B and got a red candy = P(B and R)
By multiplication theorem of probability
P(B and R)= P(B)P(R|B)
P(R|B) = Probability of getting a red candy given that Jar B is selected = Number of red candies in Jar B/Total number of candies in Jar B = 6/8 = 3/4
P(B) = 2/3
P(B and R)= P(B)P(R|B) = (2/3) x (3/4) = 1/2
Probability you selected Jar B and got a red candy = 1/2
c)
Probability you got a red candy = Probability (that you selected Jar A and got red candy OR that you selected Jar Band got red candy) = Probability you selected Jar A and got a red candy + Probability you selected Jar B and got a red candy = (4/27)+(1/2) = (8+27)54 = 35/54
Probability you got a red candy = 35/54
d)
Suppose red candy is drawn, Probability that it came from Jar A = P(A|R)
By Bayes theorem,
From (a): P(A)P(R|A) = 4/27
From (b): P(B)P(R|B) = 1/2
P(A)P(R|A)+P(B)P(R|B) = (4/27)+(1/2) = (8+27)54 = 35/54 (which was obtained in (c))
Suppose red candy is drawn, Probability that it came from Jar A = P(A|R) = 8/35
e)
Event of black candy is drawn= X
Probability Jar B was selected if Black candy is drawn = P(B|X)
By Bayes theorem
P(B) = 2/3
P(X|B) = Probability of getting a black candy given that Jar B is selected = Number of black candies in Jar B/ total number candies in Jar B = 2/8
P(B)P(X|B) = (2/3)(2/8) = 4/24 =1/6
P(A) = 1/3
P(X|A) = Probability of getting a black candy given that Jar A is selected = Number of black candies in Jar A/ total number candies in Jar A = 5/9
P(A)P(X|A) = (1/3)(5/9) = 5/27
P(A)P(X|A)+P(B)P(X|B) =(5/27) + (1/6) = 19/54
Probability Jar B was selected if Black candy is drawn = P(B|X) = 9/19
Probability Jar B was selected if Black candy is drawn = 9/19