How to Calculate: How many draws must I attempt, to get 90% of getting at least 1 of every 18 colour balls?

79 Views Asked by At

this is beyond my Mathematical skill, I apologise.... and I seek your help.

Say there are 18 differently-coloured balls in an urn.

You can draw one ball each time, with replacement.

The goal is to get at least one ball of every colour. (So getting more than once of the same colour is okay)

I wish to calculate, how many drawings must I attempt, to get a 90% chance of getting at least one of each colour.

Can anyone help me?

1

There are 1 best solutions below

1
On

An approximate approach: If you focus on one color, in $n$ draws you have $(\frac {17}{18})^n$ chance of not seeing it, so $1-(\frac {17}{18})^n$ chance of seeing it. Since you need to see all $18$ colors, the chance is $\left(1-(\frac {17}{18})^n\right)^{18}$ The approximate comes from the assumption that seeing one color is independent of seeing another. This is badly wrong for small $n$, but as $n$ increases it gets better, because the time you saw one color is a small fraction of $n$. We want to solve $\left(1-(\frac {17}{18})^n\right)^{18}=0.9$ You can unpack this with logs, or you can ask Alpha and find $n=90$ is sufficient.

An exact approach is to say there are $n^{18}$ ordered draws. There are $18n^{17}$ draws that are missing one color, so you might think the answer is $\frac {18n^{17}}{n^{18}} \lt 0.1$ but you have double counted the draws missing two colors. You need to use the inclusion-exclusion principle here, which will get tiresome.