# A problem of probability of ball drawing

Each of the five bags contains $a$ white balls and $b$ black balls.One ball is drawn from bag I and transferred to the second bag without noting the color of the ball,then a ball from second and transferred to the third bag without noting the color of the ball, and similar processis followed for bag III and IV.Finally a ball is drawn from fifth bag.Find the probability that the ball drawn is white.

totally stuck on it and I have no idea.

• "third bag without noting the color of the bag" $\longrightarrow$ "ball"? – Display Name Apr 4 '14 at 7:43
• Try for just two bags first. – Magdiragdag Apr 4 '14 at 7:56
• What Magdiragdag advised you, plus using some numbers instead of $a$ and $b$. When abstraction fails, concrete numbers can be the first step to move towards the abstract problem. – Kolmin Apr 4 '14 at 9:34

Let $W$ denote the event that the ball finally drawn from bag $5$ is white.
For $i=1,\dots,5$ let $E_{i}$ denote the event that bag $i$ contains this ball at the very beginning of the process.
The probability to end up as the ball finally drawn from bag $5$ is the same for all balls in bag $i$ so: $$P\left(W\mid E_{i}\right)=\frac{a}{a+b}\text{ for }i=1,\dots,5$$ leading to: $$P\left(W\right)=P\left(W\mid E_{1}\right)P\left(E_{1}\right)+\cdots+P\left(W\mid E_{5}\right)P\left(E_{5}\right)=\frac{a}{a+b}$$
A short verbal argument: Each ball in bag$_1$ is white with probaility ${a\over a+b}$ and black with probability ${b\over a+b}$. After one of these balls has been transferred to bag$_2$ there are $a+b+1$ balls in bag$_2$, but it is still the case that a random ball in this bag is white with probability ${a\over a+b}$. And so on, until bag$_5$. It follows that the last ball drawn is white with probability ${a\over a+b}$.
After the first step the game is restricted to the two positions $A:=(a+1,b)$ and $B:=(a,b+1)$, where $(x,y)$ is encoding $x$ white balls and $y$ black balls in the bag at hand. Denoting the probabilities of these two states after $n$ steps by $p_A(n)$ and $p_B(n)$ we have $$p_A(1)={a\over a+b},\quad p_B(1)={b\over a+b}$$ and $$\left[\matrix{p_A(n+1)\cr p_B(n+1)\cr}\right]=\left[\matrix{{a+1\over a+b+1}&{a\over a+b+1}\cr {b\over a+b+1}&{b+1\over a+b+1}\cr}\right]\cdot\left[\matrix{p_A(n)\cr p_B(n)\cr}\right]\ .$$ It is easily verified that $(a,b)$ is an eigenvector with eigenvalue $1$ of the $(2\times2)$-matrix displayed here. It follows that the probability $p$ to draw a white ball from bag number $5$ is given by $$p=p_A(5)=p_A(1)={a\over a+b}\ .$$