TITLE: Expected number of balls to pick to select three balls of the same colour
QUESTION [6 upvotes]: A bag contains 64 balls of eight different colours, with eight of each colour. What is the expected number of balls you would have to pick (without looking) to select three balls of the same colour?

REPLY [2 votes]: Here is a different approach.
Denote by $(x,y)$ the state when there are $x$ colors not yet drawn, $y$ colors drawn once, hence $8-x-y\geq0$ colors drawn twice so far. In this state there are $48+2x+y$ balls left in the bag, among them $8x$ balls of never drawn colors and $7y$ balls of once drawn colors. Denote by $E(x,y)$ the expected number of additional drawings when we are in state $(x,y)$. Then $E(0,0)=1$, and we want to know $E(8,0)$. The latter value can be computed by means of following recursion:
$$E(x,y)=1+{8x\over 48+2x+y}E(x-1,y+1)+{7y\over 48+2x+y}E(x,y-1)\ .$$
This recursion is implemented in the following Mathematica program: