I have two identical boxes. One of them has 10 balls labeled 1 to 10. The other has 100 balls labeled 1 to 100. Let's call the one with 10 balls A and the one with 100 balls B. I want you to pick one of the boxes, remove a ball and look at the number. Now tell me if the box you picked is A or B.

If the number is greater than 10 you should immediately tell me the box is B. If it is less than or equal to 10 it could be either box. Since all the balls in A have numbers ≤ 10 while only 10% of the balls in B do, it is more likely the ball came from A. Exactly how much more likely? That is the question.

Before drawing the ball, the probability that the box you picked is A is 0.5. Let L be the event that you draw a ball with number ≤ 10 then from Bayes' theorem we have

\[P(A|L)=\frac{P(L|A)P(A)}{P(L)}\]

\(P(L)=P(A,L)+P(B,L)\)

\(P(A,L)=P(L|A)P(A)\)

\(P(B,L)=P(L|B)P(B)\)

so the equation for \(P(A|L)\) is

\[P(A|L)=\frac{P(L|A)P(A)}{P(L|A)P(A)+P(L|B)P(B)}\]

where \(P(A)=P(B)=1/2\), \(P(L|A)=1\) and \(P(L|B)=10/100=1/10\). With these values we get \(P(A|L)=10/11=0.909\ldots\). The probability goes from 50% to over 90% after observing L so the box is almost certainly A.

But I see that you're the cautious type and a 90% probability isn't good enough for you. So let's put the ball back in the box, shake it up a bit, and choose another ball. Once again the result is L. Now what's the probability you chose box A?

The calculation is the same as above but now we have \(P(A)=10/11\), \(P(B)=1/11\). The new probability is then \(P(A|L)=100/101=0.990099\ldots\). That's as close to certain as you're going to get.

For fun look at the general case where A has n balls, B has m > n balls, and \(L_{k}\) is the event that you draw a ball k times from one of the boxes with replacement and each time the number is ≤ n. Show that the probabilities are

\[P(A|L_{k})=\frac{1}{1+x^{k}}\]

\[P(B|L_{k})=\frac{x^{k}}{1+x^{k}}\]

where \(x=n/m\).

© 2010-2020 Stefan Hollos and Richard Hollos

Tweet

blog comments powered by Disqus