# Probabilistic puzzle

There are $n+1$ boxes and every box contains $n$ balls. For every $k\in\left\{ 0,1,\ldots,n\right\}$ there is exactly $1$ box containing $k$ white balls and $n-k$ black balls. A box is picked out and $m$ balls are taken out. Here $m<n$ so the box is not empty yet. All balls that are taken out appear to be white balls. Now another ball is taken out of that same box. What is the probability that it is a white one?

I allready have an answer of myself, so am not in the need of one. I just like this 'puzzle', and maybe so do you. Next to that I am interested in answers that are 'nicer' than mine. It is beyond doubt that they exist.

• What do you think? How do you approach the problem? What answer do you get? – Gerry Myerson Oct 13 '13 at 11:51
• @GerryMyerson presumably the [puzzle] tag implies that the OP already has the solution, but figures the problem would interest others. – Jonathan Y. Oct 13 '13 at 11:54
• @Jonathan, maybe so, but, if so, OP ought to say so. – Gerry Myerson Oct 13 '13 at 11:54
• It is hard for me to tell whether my answer is nicer than yours, when you keep your answer to yourself. – Gerry Myerson Oct 13 '13 at 22:16
• I'm not here to play games. – Gerry Myerson Oct 14 '13 at 12:09

I liked the puzzle, and your elegant solution of it. One possibly more direct, or at least somewhat informative, approach is to look at the puzzle's continuous counterpart. Thus, corresponding to the set of $n+1$ urns let ${\bf P}$ be a uniform $[0,1]$ random variable one realization ${\bf P}=p$ of which is used to perform $m$ independent Bernoulli trials, each with success probability $p$. Let ${\bf S}_m$ be the number of successes in these $m$ trials. Then ${\sf P}({\bf S}_m=m) \; = \; \int_{0}^{1}\, p^m \, dp \, = \, \frac{1}{1+m}$, exactly as in the discrete urn case. Also, using Bayes' Theorem the posterior density of ${\bf P}$ given that ${\bf S}_m=m$ is then directly seen to be ${\sf P}({\bf P} = p | {\bf S}_m=m) \, = \, f_{P}(p) \, = \, (1+m) \, p^m$. This in turn implies that given ${\bf S}_m=m$ the $(m+1)-$th Bernoulli trial results in a further success with probability $\int_{0}^{1}\, p \, f_{P}(p) dp \, = \, \frac{m+1}{m+2}$, again exactly corresponding to the discrete urn case. Of course, one may still search for an even more direct'' approach.

• Very nice approach(+1)! It really confirms my presumption that some other route was possible here. – drhab Dec 13 '13 at 18:21

I have decided to publish here my own answer. This also because of the comments that were given to my 'question'. Also I have decided not to do this anymore. I do not want to do things here that other people rather see not happen.

Denote the event that the box picked out contains exactly $k$ white balls by $D_{k}$.

Denote the event that the $m$ balls taken out are all white by $W_{m}$.

Then:

$$P\left(W_{m}\right)=\sum_{k=m}^{n}P\left(W_{m}|D_{k}\right)P\left(D_{k}\right)=\frac{1}{n+1}\sum_{k=m}^{n}P\left(W_{m}|D_{k}\right)=$$$$\frac{1}{n+1}\sum_{k=m}^{n}\left({k\atop m}\right)\left({n-k\atop 0}\right)\left({n\atop m}\right)^{-1}=\frac{1}{n+1}\left({n\atop m}\right)^{-1}\sum_{k=m}^{n}\left({k\atop m}\right)$$

With induction we find easily that: $$\sum_{k=m}^{n}\left({k\atop m}\right)=\left({n+1\atop m+1}\right)$$ So:

$$P\left(W_{m}\right)=\frac{1}{n+1}\left({n\atop m}\right)^{-1}\left({n+1\atop m+1}\right)=\frac{1}{m+1}$$

Then: $$P\left(W_{m+1}|W_{m}\right)=P\left(W_{m+1}\cap W_{m}\right)/P\left(W_{m}\right)=P\left(W_{m+1}\right)/P\left(W_{m}\right)=\frac{m+1}{m+2}$$

$$P\left(W_{m+1}|W_{m}\right)=\frac{m+1}{m+2}$$
Especially the 'nice' equality $P\left(W_{m}\right)=\frac{1}{m+1}$ makes me think that a more direct route to that result exists. If there is one then please let me know, and thanks for that in advance.