GenerateRandomSearch

Coupon Collector Simulator

Collecting a set of fifty stickers takes about 225 packets, not fifty — and the reason is that the last few are the expensive ones. The exact expectation is the set size times the harmonic number, which grows like n log n rather than n. Most of the wait is spent on the final one or two items: the last sticker alone takes as many draws on average as the entire first half of the collection.

What this generator does

Draws items uniformly at random until every distinct one has been seen, repeated across many runs. It reports the observed mean and the full range alongside the exact expectation of n times the nth harmonic number.

How to use this tool

  1. Choose how many distinct items make a full set.
  2. Guess how many draws it will take.
  3. Run it, and compare against the exact expectation.
  4. Look at the range — the spread is much wider than people expect.

Understanding the controls

How many coupons
From 2 to 50 distinct items. Fifty is a typical sticker album, and takes around 225 draws.
How many runs
From 100 upwards, capped at 3,000 for this experiment because each run draws many times.
Seed
Reproduces exactly the same sequence of draws.

Common use cases

  • Working out how many packets a collection really costs
  • Showing why the last few items dominate the wait
  • Teaching harmonic numbers through something concrete
  • Capacity questions where every distinct item must be seen
  • Repeating an identical set of draws from a seed

How this generator works

Each run draws uniformly until the set of seen items is complete. The check confirms no run finished in fewer draws than there are coupons — impossible by definition — and that the observed mean sits within four standard errors of the harmonic expectation.

Randomness and fairness

The draws are random; the expectation is computed exactly from the harmonic number. Seeded runs reproduce and are therefore explicitly not cryptographically secure, and unseeded ones use the browser's cryptographically secure generator.

For how randomness is produced across the whole site, see how Generate Random works.

Limitations and good to know

  • Every item is equally likely. Real collections have deliberately rare items, which makes the wait far longer.
  • Runs are capped at 3,000 because each one involves many draws.
  • No swapping or trading is modelled, which is how real collectors beat the maths.
  • The distribution is summarised by mean and range rather than plotted.
  • Nothing about a run survives the visit; seed it to draw the same sequence again.

Privacy and your data

Draws are simulated in your browser and discarded when you leave. Nothing is transmitted.