# Thread: Conditional Probability and law of total probability.

1. ## Conditional Probability and law of total probability.

This is a fun question i found on the internet, a bit harder than my course and ive spent hours on it but cant find a solution, i was hoping someone could help me.
Here's the situation.
You are in jail and have been sentenced to death tomorrow, however there's a way out.
you're given 12 red balls and 12 blue balls with 2 urns, you have to fully distribute the balls between these two urns. the executioner will then select an urn and draw a ball
if it is blue you live and if it is red you die.
suppose you place k balls in to the first urn and 24-k in to the second
suppose you put i blue balls in to the first urn and 12-i in to the second
Let A be the event that you live.
By conditioning on the urn that the executioner chooses, and using the law of total probability show that:

P(A) = (12i - ki + 6k) / k(24-k)

please could you explain the steps used so i can try and understand the solution and method.
Thank you in advance
Luke

2. ## Re: Conditional Probability and law of total probability.

Originally Posted by luke95
This is a fun question i found on the internet, a bit harder than my course and ive spent hours on it but cant find a solution, i was hoping someone could help me.
Here's the situation.
You are in jail and have been sentenced to death tomorrow, however there's a way out.
you're given 12 red balls and 12 blue balls with 2 urns, you have to fully distribute the balls between these two urns. the executioner will then select an urn and draw a ball
if it is blue you live and if it is red you die.
suppose you place k balls in to the first urn and 24-k in to the second
suppose you put i blue balls in to the first urn and 12-i in to the second
Let A be the event that you live.
By conditioning on the urn that the executioner chooses, and using the law of total probability show that:

P(A) = (12i - ki + 6k) / k(24-k)

please could you explain the steps used so i can try and understand the solution and method.
Thank you in advance
Luke
Start by naming things

p = the probability that the executioner chooses urn 1, into which you have placed k balls, i of them blue.

(1 - p) = the probability that the executioner chooses urn 2, into which you have placed 24 - k balls, 12 - i of them blue.

q = the probability that executioner chooses blue ball given that executioner chooses urn 1 = $\dfrac{i}{k}.$

r = the probability that executioner chooses blue ball given that executioner chooses urn 2 = $\dfrac{12 - i}{24 - k}.$

Now, in terms of p, q, and r, what is the probability of

the executioner picking a blue ball from urn 1,

the executioner picking a blue ball from urn 2, and

the executioner picking a blue ball from one urn or the other.

So what is the hidden assumption to arrive at the answer given?

3. ## Re: Conditional Probability and law of total probability.

The probability of picking a blue ball from urn 1 is : i/k or q
from urn 2 : r
then from either one, P(r intersect q) so rq, which gives you (i/k)*(12-i/24-k)