How to use (3 steps)
- Choose uniform (equal chances) or weighted (rarities).
- Enter n and optional t/target; paste weights or probabilities if needed.
- Check the results, then run the simulation for intuition or verification.
Assumptions: independent draws with fixed probabilities. Pity/guarantee systems are out of scope.
Inputs
Simulation results are not stored in the URL—only settings and the seed are shared.
Results
Completion curve (CDF)
Simulation (Monte Carlo)
Runs locally in your browser. Use a seed to reproduce the same run.
Examples
Uniform example (n=50)
With 50 equally likely types, the expected draws is 50·H_50 ≈ 224.96. The 90% completion point is much higher than the mean.
Rare item example (1%)
If one type has probability 0.01 and the others share the remaining 0.99, the rare item dominates the completion time. Use weighted mode to see how the expectation jumps.
Interpretation (why it takes so long)
Uniform case: the classic n·Hₙ
If all n types are equally likely, the expected number of draws is E[T] = n·Hₙ where Hₙ is the harmonic number. A useful approximation is:
E[T] ≈ n·(ln n + γ) where γ ≈ 0.57721 (Euler–Mascheroni constant).
For n = 50, this gives about 50·(ln 50 + 0.577) ≈ 224.5, close to the exact value.
Why the “last coupon” dominates
Near the end, most draws are duplicates. The remaining unseen probability becomes small, so the waiting time for the last missing type can be large. This is why high-percentile targets (t90, t99) are often much larger than the mean.
Weighted case: rarities matter
- If probabilities are uneven, the rarest types can dominate the completion time.
- For large n or very skewed weights, simulation is often the practical way to understand typical completion times and variability.
References
FAQ
Why does the last item take so long?
Once most types are collected, each new draw is likely a duplicate. The waiting time for the last unseen type grows like 1/p_min.
Is the uniform formula exact?
Yes. For equal probabilities the expectation is n·H_n and the DP curve gives exact completion probabilities up to the computed t range.
What if probabilities are not uniform?
Use weighted mode with probabilities or weights. For more than 20 types, the exact expectation is expensive, so simulation is recommended.
Can I share a run with my class?
Yes. Copy the URL to share parameters; a fixed seed reproduces the same simulation.
Does this include pity or guarantees?
No. This tool assumes independent draws with fixed probabilities. Other mechanics need a different model.