Probability question with balls in box Change question title if you can come up with better one
In box we have $k$ white, $m$ blue and $n$ red balls. From the box one after another we fetch all balls and we write down color of that ball. What's the probability that in our list of colors, white color will appear before a blue.
So, as I understood we can have any amount of red balls in a row and then white must appear.
For example: W, RW, RRW, RRRW, R..........W
So I need to calculate something like that:
$$\frac{k}{k+m+n}+\frac{n}{k+m+n}\frac{k}{k+m+n-1}+\frac{n}{k+m+n}\frac{n-1}{k+m+n-1}\frac{k}{k+m+n-2}+...$$
until all red balls appeared and finally white
But I don't know what appears here and how to write it. Or maybe there's even more easier way to solve it?
 A: The number of reds is just as irrelevant as whether the sun is shining or not.  The probability is $\dfrac{k}{k+m}$.
Remark: Let $t$ be the total number of balls. So $t=k+m+n$. Then, somewhat as you wrote, but with a small correction, the probability that a white comes before a blue is 
$$\frac{k}{t}+\frac{n}{t}\frac{k}{t-1}+\frac{n}{t}\frac{n-1}{t-1}\frac{k}{t-2}+\cdots.$$
As was explained earlier, this sum is obviously $\frac{k}{k+m}$.  So by finding the probability in two different ways, we obtain a potentially useful combinatorial identity.
A: To elaborate on the previous post: Take any orderings of the balls and remove all the red balls from that ordering - note that this does not affect whether the white ball is before the blue ball or not. Now, in this ordering of the balls without the reds, there are only $k+m$ balls (namely the white and the blue balls), and the probability that a white ball precedes a blue ball (aka the white ball is the first one in that ordering of the $k+m$ balls) is $\dfrac{k}{k+m}.$
A: The other answers are better; but, for what it's worth:
Let $P_n$ be the probability that white appears before blue if the urn has $n$ red balls.
Let $W$ be the event that the first ball is white, $B$ the event that the first ball is blue, and $R$ the event that the first ball is red.
Conditioning on the  color of the first ball:
$$ \eqalign{
P_n&=P(W)\,P(P_n\mid W)+P(B)\,P(P_n\mid B)+P(R)\,P(P_n\mid R)\cr
&={k\over k+m+n} \cdot 1 +{m\over k+m+m}\cdot 0+{n\over k+m+n}\cdot P_{n-1}\cr

}$$
So,
$$\tag{1}
P_n={k\over k+m+n}  +{n\over k+m+n}\cdot P_{n-1}.

$$
It is easily seen that $P_0={k\over k+m}$.
Then using $(1)$
$$\eqalign{
P_1&={k\over k+m+1}  +{1\over k+m+1}\cdot {k\over k+m} \cr
&={k \over k+m+1  }\cdot{k+m\over k+m}  +{1\over k+m+1}\cdot {k\over k+m}\cr
&={k (k+m+1) \over (k+m+1 )(k+m) } \cr
&={k   \over k+m  }. \cr
}
$$
Also,
$$\eqalign{
P_2&={k\over k+m+2}  +{2\over k+m+2}\cdot {k\over k+m} \cr
&={k \over k+m+2  }\cdot{k+m\over k+m}  +{2\over k+m+2}\cdot {k\over k+m}\cr
&={k (k+m+2) \over (k+m+2 )(k+m) } \cr
&={k   \over k+m  }. \cr
}
$$
In general, one can establish by induction that $P_n={k\over k+m}$ for all $n$.
A: You are right about the expression for the probability of getting a white ball before a blue one (let us call this event $A$), except that you need $(n-1)$ instead of $n$ in the second fraction of the third term: $$Pr\{A\}=\frac{k}{k+m+n}+\frac{n}{k+m+n}\cdot\frac{k}{k+m+n-1}+\frac{n}{k+m+n}\cdot\frac{n-1}{k+m+n-1}\cdot\frac{k}{k+m+n-2}+\ldots$$
Now, write down a similar expression for the probability that you get a blue ball before a white one: $$Pr\{B\}=\frac{m}{k+m+n}+\frac{n}{k+m+n}\cdot\frac{m}{k+m+n-1}+\frac{n}{k+m+n}\cdot\frac{n-1}{k+m+n-1}\cdot\frac{m}{k+m+n-2}+\ldots$$
As, you can see: $Pr\{B\}=\frac{m}{k}Pr\{A\}$. Moreover, $Pr\{A\}+Pr\{B\}=1$ (btw, why?), therefore, $Pr\{A\}=\frac{k}{m+k}$.
