2
$\begingroup$

If you have a roulette table that has 7,000,000 places and you have 10 balls (and only one ball can fit onto each number at every roll), how many rolls would it likely take for a ball to land on every number?

$\endgroup$
1
  • $\begingroup$ This is the same question as the duplicate: only the numbers are different. Much more detailed information (such as the entire distribution) can be obtained by linking through the coupon-collector-problem tag. $\endgroup$
    – whuber
    Commented Oct 10, 2023 at 14:42

1 Answer 1

2
$\begingroup$

If you want the expected number, then you can use a recursion for an exact calculation (up to precision errors).

For example in R ($7$ million loops takes some time):

totalballs <- 7000000
atatime <- 10
expected <- numeric(totalballs + atatime) # note offset
for (b in 1:totalballs){
    expected[b + atatime] <- (1 + sum(
             dhyper(1:atatime, b, totalballs - b, atatime) * 
             expected[b + atatime - (1:atatime)])) /
             (1 - dhyper(0, b, totalballs - b, atatime))
    }   

expected[b + atatime]
# 11437039

A faster approximation might be a tenth of the number expected to be needed if you draw one ball at a time. This will clearly be too high, but not by much (in fact about $7$ too high, not much here for a number over $11$ million)

totalballs * sum(1/(1:totalballs)) / atatime  # quick approximation
# 11437046
$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.