# Find probability that last drawn ball is white.

Urn contains $$w$$ white and $$b$$ black balls. We draw balls with the following procedure:

1. We draw ball and put it aside.
2. We draw another ball. If its color is different than last drawn ball then we put it back to urn and go to state 1. Otherwise we put this ball aside and go to state 2.
• Have you tried setting up the equations to calculate $P(w, b)$ recursively? – Calvin Lin Apr 9 '20 at 14:15
• You can prevent text from being italicized in math mode by enclosing it in \text{...}. – joriki Apr 9 '20 at 14:51
• @CalvinLin thanks for hint. I edited the question I put my current attempt can you let me know if I'm on the right path? Joriki thanks for letting me know! – Mario Apr 9 '20 at 15:54
• Interestingly, it seems that the probability is 1/2 for any initial distribution with at least one ball of each color. This might be solvable using induction. – Daniel Mathias Apr 9 '20 at 19:16

Let denote by:

$$a_n$$ - from urn we thrown $$n$$ balls and last drawn ball was white.

$$b_n$$ - from urn we thrown $$n$$ balls and last drawn ball was black.

$$A$$ - white ball was drawn

$$B$$ - black ball was drawn

then

$$P(a_n) = P(A|a_{n-1})P(a_{n-1})+P(AA|b_{n-1})P(b_{n-1})+P(AB|a_{n-1})P(a_{n-1})$$ $$P(a_n) = P(a_n)P(a_{n-1})+P(a_n)P(a_{n-1})(1-P(a_{n-1}))+P(a_n)(1-P(a_n))P(a_{n-1})$$ $$P(a_n)(1-P(a_{n-1}))(2P(a_{n-1})-1) = 0$$

this give a solution

$$P(a_n) = 0 \text{ for } w=0$$ $$P(a_n) = 1 \text{ for } b=0$$ $$P(a_n) = \frac{1}{2} \text{ otherwise }$$

• Could you explain $P(A|a_{n−1})=P(a_n)$ and the other two similar equalities? I would assume that the conditional probability depends on the exact nature of the $a_{n−1}$ state, i. e. on the number of remaining white and black balls. – user Apr 10 '20 at 11:03

As was pointed out in a comment the probability in question is $$\frac12$$ if at least one ball of each color is present.

First of all we prove the following combinatorial lemma:

Let $$m$$ and $$n$$ be integer numbers such that $$n\ge0$$, $$m>0$$. Then: $$\sum_{k=0}^n \frac{n!}{k!}\frac{(m+k)!}{(m+n)!}\frac{m}{m+k}=1.\tag1$$

Obviously the lemma holds for $$n=0$$ and any $$m>0$$. We demonstrate now that if the lemma is valid for $$n$$ it holds for $$n+1$$ as well: \begin{align} \sum_{k=0}^{n+1} \frac{(n+1)!}{k!}\frac{(m+k)!}{(m+n+1)!}\frac{m}{m+k} &=\frac{m}{m+n+1}+\frac{n+1}{m+n+1}\sum_{k=0}^n\frac{n!}{k!}\frac{(m+k)!}{(m+n)!}\frac{m}{m+k}\\ &\stackrel{I.H}=\frac{m}{m+n+1}+\frac{n+1}{m+n+1}=1. \end{align}

Let $$P(w,b)$$ be the probability of the last drawn ball being white if we start from the state 1 with $$w$$ white and $$b$$ black balls. Observe that to return to state 1 (with a different number of balls) we need to draw first $$k$$ balls of the same color and then a ball of the other color. In the case of a series of black balls the probability of such event is: $$\frac{b}{w+b}\frac{b-1}{w+b-1}\cdots\frac{b-k+1}{w+b-k+1}\frac{w}{w+b-k}= \frac{b!}{(b-k)!}\frac{(w+b-k)!}{(w+b)!}\frac{w}{w+b-k}$$ and similar expression for the series of white balls. Thus, we have for $$w,b>0$$: \begin{align} P(w,b) &=\sum_{k=1}^b\frac{b!}{(b-k)!}\frac{(w+b-k)!}{(w+b)!}\frac{w}{w+b-k}P(w,b-k)\\ &+\sum_{k=1}^{w}\frac{w!}{(w-k)!}\frac{(w+b-k)!}{(w+b)!}\frac{b}{w+b-k}P(w-k,b), \end{align} with $$P(w,0)=1$$, $$P(0,b)=0$$. We claim: $$\forall w,b>0: P(w,b)=\frac12.\tag2$$

For $$P(1,1)$$ the claim is obviously valid. Assume it is valid for all $$P(w,b-k)$$ with $$0 and $$P(w-k,b)$$ with $$0.

We have: \begin{align} P(w,b) &\stackrel{I.H.}=\frac12\sum_{k=1}^b\frac{b!}{(b-k)!}\frac{(w+b-k)!}{(w+b)!}\frac{w}{w+b-k} +\frac{b!}2\frac{w!}{(w+b)!}\\ &+\frac12\sum_{k=1}^{w}\frac{w!}{(w-k)!}\frac{(w+b-k)!}{(w+b)!}\frac{b}{w+b-k} -\frac{w!}2\frac{b!}{(w+b)!}\\ &\stackrel{(1)}=\frac12\left(1-\frac{b}{w+b}\right)+\frac12\left(1-\frac{w}{w+b}\right)=\frac12. \end{align}

Thus, the claim (2) is proved.