Problem $42$ , chapter 4 from Introduction to Probability
An urn contains red, green, and blue balls. Balls are chosen randomly with replace- ment (each time, the color is noted and then the ball is put back). Let $r$, $g$, $b$ be the probabilities of drawing a red, green, blue ball, respectively ($r + g + b = 1$).
Find the expected number of different colors of balls obtained before getting the first red ball.
Attempt at a solution
Letting $E$ represent the expected value,
$E=2P(2)+P(1)+0P(0)$
where $P(x)$ is the probability of obtaining exactly x different colours before drawing the first red ball.
$P(0)=r$
$P(1)=r(b+b^2+b^3...)+r(g+g^2+g^3...)= \frac {rb}{1-b}+ \frac {rg}{1-g}$ since any number of balls of either of the other colors could be drawn in this case before the first red ball
$P(2)=1-P(1)-P(0) =(1-r-rb/(1-b)-rg/(1-g))$
So, $E= 2(1-r)-br/(r+g)-gr/(r+b)$
Is my approach correct?