Picking and replacing balls from a bag until you are relatively certain you have picked each one at least once Suppose I have an unknown number of balls ($N$), each of a different color, hidden in a bag.
How many times must I draw a single ball, make a note the color and return it to the bag in order to be sure (within a given tolerance of $t\%$) that I have seen all the colors?
For example there might be four colors and in order to be $99\%$ sure that there are indeed four I might have to sample, say ten times. Can this be generalised and expressed in terms of $N$ and $t$?

If there are a reasonable number of balls you can model this as a Poisson process for each ball.  Each time you draw the ball has $\frac 1N$ chance to be picked, so the mean after $k$ tries is $\frac kN$ and the chance the ball has not been seen is $e^{-k/N}$.  The chance that all the balls have been seen is then $(1-e^{-k/N})^N$. We are assuming independence here, which is not strictly true because having seen one ball increases the chance we will not see another, but it should not be far off.  If you have seen the average ball $3$ times, each ball has a $95\%$ chance of having been seen.  If you have seen the average ball $5$ times, each ball has a $99.4\%$ chance of having been seen.
