My urn contains 3 red, 2 green and 1 white ball. I pick a ball with replacement until I pick the second color.
What is the average number of picks for picking the second color?
With the expected value formula I got the following.
$EX=\sum\limits_{k=2}^\infty k[\frac{1}{2}r^{k-1}+\frac{2}{3}g^{k-1}+\frac{5}{6}w^{k-1}]$
Where r, g and w are the probabilites of drawing a red, green, or white ball.
I don't know how to calculate this sum, and I am not sure this is the right way to solve this excercise.
We discuss the probability based on the color of ball you first picked up. Then you continue to pick up the same color for totally $k-1$ time until you pick up another color at $k$th.
$E(X)=\sum\limits_{k=2}^\infty k[(\frac{1}{2})^{k-1}\frac{1}{2}+(\frac{2}{6})^{k-1}\frac{4}{6}+(\frac{1}{6})^{k-1}\frac{5}{6}]$
To calculate the sum, the easiest way is to make use of the fact: for $|r|<1$, $\sum\limits_{k=0}^\infty r^k=\frac{1}{1-r}$. Differentiate both sides, $\sum\limits_{k=1}^\infty kr^{k-1}=\frac{1}{(1-r)^2}$. Then $\sum\limits_{k=2}^\infty kr^{k-1}=\frac{1}{(1-r)^2}-1$