# What's the probability that the last ball is a red? [closed]

There are $8$ red ball, $5$ blue ball in a bag.

1. randomly pick one ball, remember the color, throw it away.
2. randomly pick another ball. If the color is different, put it back, return to step 1; else, throw it away and repeat this step.

Question: what is the probability that the last ball is red?

## closed as off-topic by Carl Mummert, JonMark Perry, Xander Henderson, Parcly Taxel, NamasteMar 9 '18 at 4:31

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – Carl Mummert, JonMark Perry, Xander Henderson, Parcly Taxel, Namaste
If this question can be reworded to fit the rules in the help center, please edit the question.

• Pulling from this question which seems similar, a recursive approach might work, although ot looks like the recursion relations here will have more terms. – Arthur Dec 9 '16 at 10:26
• @Arthur yeah, I want an analytical solution. The recursive equation is not the hard part. – fizis Dec 9 '16 at 11:00

Let us consider $m$ red balls and $n$ blue balls. Let $u_{mn}(r)$ and $u_{mn}(b)$ be the probability that the sequence of balls being discarded should begin and end with a red ball and a blue ball respectively. We require $u_{mn} = u_{mn}(r) + u_{mn}(b)$.

Consider $u_{mn}(r)$. The probability of choosing a red ball first is $\frac{m}{m+n}$. The probability of then getting a sequence ending in red is made up of two parts. Firstly, that the first and the last ball should be red is $u_{m-1,n}(r)$. Secondly, that the first ball should be blue namely $\frac{n}{m+n-1}$, multiplied by the probability of a sequence ending in red chosen from $m-1$ red and $n$ blue balls, remembering that the blue ball was replaced namely $u_{m-1,n}$. Hence for $m\geq 2, n\geq 1$, $$u_{mn}(r) = \frac{m}{m+n}[u_{m-1,n}(r) +\frac{n}{m+n-1}u_{m-1,n}]...(1)$$ $(1)$ also holds if $m=1, n\geq 1$. Similarly for $m\geq 1, n\geq 2$, $$u_{mn}(b) = \frac{n}{m+n}[u_{m,n-1}(b) + \frac{m}{m+n-1}u_{m,n-1}]...(2)$$. Since $u_{m,1}(b) =\frac{1}{m+1}$,$u_{m,0}(b) =0, u_{m,0} = 1$ equation $(2)$ holds if $m\geq 1, n=1$.

The probability that the final ball should be blue is $1-u_{m,n}$. By interchanging the roles of the red and blue balls, it is easy to see that this is $u_{n,m}$. Hence, $$u_{m,n} + u_{n,m} = 1 (m\geq 1, n\geq 1)...(3)$$. Let $q_{m,n}(r) = \frac{(m+n-1)!}{m!n!} u_{m,n}(r) (m\geq 1, n\geq 1)$ with similar definitions for $q_{m,n}(b)$ and $q_{m,n}$. Writing $a$ in place of $m$ in $(1)$ and substituting for $u_{m,n}$, we have, $$(a+n)q_{a,n}(r)-(a+n-1)q_{a-1,n}(r) = nq_{a-1,n} (r\geq 1, n\geq 1)$$. Adding for $r=1,2...m$ and for $m\geq 1, n\geq 1$ we have $$(m+n)q_{m,n}(r)-nq_{0,n}(r) = n(q_{m-1,n}+q_{m-2,n}+...q_{0,n})...(4)$$ and for $m\geq 1, n\geq 1$, we have, $$(m+n)q_{m,n}(b)-mq_{m,0}(b) = m(q_{m,n-1}+q_{m,n-2}+...q_{m,0})...(5)$$. We also have $q_{0,n}(r)=0 (n\geq 1)$ and $q_{m,0}(b)=0 (m\geq 1)$. $(4)+(5)$ and $m\geq 1, n\geq 1$ gives $$(m+n)q_{m,n} =n(q_{m-1,n}+...q_{0,n}) +m(q_{m,n-1}+...q_{m,0})...(6)$$. If $n=1, m\geq 1$, we have $$(m+1)q_{m,1} = q_{m-1,1}+...q{0,1}+mq_{m,0} = q_{m-1,1}+...q_{1,1}+q_{0,1}+1$$. In terms of $u_{m,1} (m\geq 1)$, we have, $$(m+1)u_{m,1} = u_{m-1,1}+...u_{0,1}+1$$. Writing $m+1$ in place of $m$ and subtracting the two equations, we have, $$(m+2)u_{m+1,1}-(m+1)u_{m,1} = u_{m,1}$$ and so $u_{m+1,1} = u_{m,1} = u_{1,1} = \frac{1}{2}...(7)$.
Similarly by putting $m=1$ in $(6)$ we get $u_{1,n} (n\geq 1)$. Hence $u_{m,1} = u_{1,n} =\frac{1}{2}$ for $m\geq 1, n\geq 1$.

We write equations by putting $m+1$ in place of $m$, $n+1$ in place of $n$ and combining $(m+1,n+1)$ in place of $(m,n)$. Subtracting $(6)$ and the sum of these three equations we have, $$(m+n)q_{m,n}-(m+n+1)(q_{m+1,n} + q_{m,n+1})-(m+n+2)q_{m+1,n+1} = -nq_{m,n} +(n+1)q_{m,n+1} + (m+1)q_{m+1,n} -mq_{m,n}$$. Reverting to $u_{m,n}$ for $m\geq 1, n\geq 1$, we have $$2(m+1)(n+1)u_{m,n} + (m+n+2)(m+n+1)u_{m+1,n+1} = (m+1)(m+2n+2)u_{m,n+1} + (2m+n+2)(n+1)u_{m+1,n}$$ $$\Rightarrow (m+n+2)(m+n+1)((u_{m+1,n+1}-u_{m,n+1})-(u_{m+1,n}-u_{m,n})) + m(m+1)(u_{m+1,n}-u_{m,n}) + n(n+1)(u_{m,n+1}-u_{m,n}) = 0$$ This implies that $u_{m,n} = c$(a constant)$(m\geq 1, n\geq 1)$ is a solution of the problem. It satisfies the boundary conditions of $(7)$ if $c=\frac{1}{2}$ hence $u_{m,n}$ is a solution of the problem. Hope it helps.

• But you may later find out a counter example for that. It is always better to prove each step mathematically. – Rohan Dec 9 '16 at 13:08

Claim. The last ball is red with probability ${1\over2}\,$, irrespective of the initial numbers of balls.

Proof. The game consists of several rounds. A round begins in state $1$ with $m\geq1$ red balls and $n\geq1$ blue balls. According to the rules we randomly pick balls until one of the following has been composed: $$\underbrace{\mathstrut B\,B\,\ldots\, B}_k\,R\qquad{\rm resp.}\qquad \underbrace{\mathstrut R\,R\,\ldots\, R}_k\,B\ .$$ We then discard the initial group of $k\geq1$ blue, resp., red balls. With probability $$p={n\over m+n}\cdot{n-1\over m+n-1}\cdot{n-2\over m+n-2}\cdots{1\over m+1}={n!\>m!\over(m+n)!}$$ all $n$ blue balls have been picked and thereafter discarded in this process. With the same probability $p$ all $m$ red balls have been picked and discarded. In these two cases the game has come to an end.

With probability $1-2p$ balls of both colors remain, and we return to state $1$ for the next round.

Since in each played round both colors have the same chance of winning the claim follows.