# Expected number of blue balls till end of process when sampling with replacement

An urn has balls of 3 colors: Red, Blue, Yellow. There are an equal number of balls of each color. You start drawing balls from the urn with replacement, stopping when you draw a red ball. What is the expected number of blue balls drawn when the process stops?

I know that the expected number of non-red balls drawn in this case will be 1/p where p is the probability of success i.e. probability of drawing a red ball which is 1/3 in this case, so the expected number of non-red balls is 3. But is it correct to say that the expected number of blue balls in this case is 1/2 of 3 i.e. 1.5 since the non-red balls are equally likely to be blue or yellow?

• Note: your informal argument actually gives the right answer, if you are careful. You expect to get the first $R$ on trial $\frac 1p=3$. That means you expect $2$ non-red balls before the first red one, and as you say that means you expect $1$ blue one. Two alternate arguments posted below. – lulu Dec 1 '16 at 20:44
• Makes sense, thanks! – Apurvaa Dec 2 '16 at 17:11

Let $E$ be the answer. We consider what happens when you draw one ball...of course you get $R,B,Y$ each with probability $\frac 13$ so: $$E=\frac 13\times \left(0+(E+1)+E\right)\implies 3E=2E+1\implies E=1$$
As an alternative way to see it: the yellow balls are irrelevant, so ignore them completely. The relevant strings are all of the form $B^nR$, which has probability $\frac 1{2^{n+1}}$so $$E=\sum_{n=0}^{\infty} \frac n{2^{n+1}}=1$$