2

You have two bags, bag 1 has m balls, and bag 2 has n balls. You draw a ball from a bag with 50% probability until one bag is empty. What is the probability that bag 1 is empty?

I tried to draw some probability trees but I cannot find a general formula. I see that there is something like $\frac{1}{2}^m +(m-1)\frac{1}{2}^{m+1}+...$

  • 1
    @ElieLouis I think the sum should run up to $n-1$, since $k$ is the number of balls removed from nag $2$ (there must be at least one ball left). Apart from that, I agree with your formula. However, I don't have a closed form yet. For $n=m$, you can check that $p=1/2$, as expected. – Jean-Claude Arbaut Dec 25 '17 at 19:47
  • Yes, I forgot to update that $n-1$(I had updated it but deleted my answer). I assumed my answer was incorrect since I didn't get a closed form, so I had no confidence in my formula. Thanks :). – Higurashi Dec 25 '17 at 19:51
  • @Arthurim If you are ok, you can accept the answer and set as solved. Thanks! – user Dec 28 '17 at 14:39

2 Answers2

2

So let's think about this problem step by step. Denote $A$ the event of drawing from bag $1$, and $B$ the event from drawing from bag $2$. We must get either $m$ times in a row $A$, or $m$ times $A$ and $1$ time $B$, $\cdots$, or $m$ times $A$ and $n-1$ times $B$, but the important thing is that the sequence should always end in $A$. Now, if we assumed there was no order, the probability of getting $m$ times $A$ and $k$ times $B$ would be $\frac{1}{2^k} \times \frac{1}{2^m}$. But there is an order. Say $n=2$, $m=3$. We can get something like $AAA$, or $BAAA$, or $ABAA$, or $AABA$. To find the number of possible combinations with $k$ events $B$,just think about it as choosing $k$ positions for $A$ between $m+k-1$ choices. So $\binom {m+k-1}{k}$

The probability is then $$p = \sum_{k=0}^{n-1} \binom {m+k-1}{k}\frac{1}{2^{k+m}}$$

Higurashi
  • 1,408
1

A way is to solve by the recurrence equation:

$$p(m,n)=\frac12\cdot p(m-1,n)+\frac12 \cdot p(m,n-1)$$

by the table

$$\begin{array}{c|cc} m\backslash n&0&1&2&3&4&...\\ \hline 0&-&1&1&1&1\\ 1&0&\frac12&\frac34&\frac78&\frac{15}{16}&...\\ 2&0&\frac14&\frac12&\frac{11}{16}&\frac{13}{16}&...\\ 3&0&\frac18&\frac5{16}&\frac12&\frac{21}{32}&...\\ ...&...&...&...&...&...&...\\ \end{array}$$

note that every element is the combination of the $\frac12$above element plus $\frac12$ leftelement.

user
  • 162,563