Statistics & probability

Coupon collector calculator with unequal probabilities

Calculate the expected number of independent draws needed to see every category, allowing unequal probabilities and unreachable-category detection.

Your numbers

Enter 1–16 exhaustive category probabilities summing to one. Zero is allowed and makes completion impossible; positive values must be at least 10⁻¹².

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

The coupon-collector problem asks how many draws are needed to observe every required category at least once. Draws are independent, with replacement, and keep the same category probabilities. Unequal probabilities make rare categories important near completion. This calculator solves an expectation recurrence over collected subsets, using nonnegative contributions instead of a cancellation-prone alternating sum. It also reports the equal-probability benchmark for the same number of categories.

THE FORMULAE(S)=[1+Σ_(i not in S) p_iE(S∪{i})]/Σ_(i not in S)p_i, with E(all)=0.

A worked example

With probabilities 1/2,3/10,1/5, inclusion–exclusion gives E[T] = 2 + 10/3 + 5 − 5/4 − 10/7 − 2 + 1 = 559/84 ≈ 6.65476190 draws. Three equally likely categories instead require 3(1+1/2+1/3)=5.5 draws on average. The rare 1/5 category increases the unequal-probability completion mean, but its individual first-arrival mean of five is not the mean time to complete the entire collection.

Good to know

Supports at most sixteen categories because the subset state count grows exponentially. Probabilities must describe mutually exclusive, exhaustive outcomes and sum to one. Positive supported probabilities are at least 10⁻¹². A required zero-probability category makes completion impossible and the mean infinite. The result is an expectation, not a percentile, guarantee or a model of changing probabilities or sampling without replacement.

Repeated categories consume draws without advancing the collected set

A collection state records which categories have already appeared, not their chronological order or multiplicities. Drawing an already collected category leaves that state unchanged. The recurrence moves that self-loop probability to the denominator, leaving the total probability of discovering a missing category. The completed state has no remaining wait, so the calculation can work backward through successively smaller collected sets.

Expected first-arrival times for individual categories overlap in calendar draws. They cannot be added as if each category were collected in a separate phase. The final missing category also need not be the rarest one in every realization, even though rare outcomes strongly influence the mean. The table’s first-arrival column is a useful separate diagnostic, not a decomposition of the collection expectation.

After A and B have arrived the remaining wait for category C has mean fiveCollected A,B; still missing CRepeat A or B: probability 0.8New C: probability 0.2 → completeMean remaining wait = 1/0.2 = 5
For probabilities A=0.5, B=0.3, C=0.2, collected set {A,B} advances only on C. Repeats of A or B consume draws without progress; the remaining mean is 1/0.2 = 5. Starting from empty has mean 559/84.

The geometric distribution calculator describes waiting for one specified independent-trial success. Completing a collection requires tracking all missing categories.

A mean collection time is not a deadline

An average of about 6.65 draws does not mean completion will occur by draw seven. The completion-time distribution can have a substantial right tail, especially with a very rare category. Budgeting or service guarantees need a percentile or tail probability under an appropriate model, neither of which is inferred from this mean alone. Repeating the experiment many times would average the realized completion times toward the expectation.

A zero-probability category is qualitatively different from a rare one: it never appears. The calculator reports infinite expectation rather than replacing zero with an arbitrary small number. If some outcomes are irrelevant to the collection but still consume draws, include their effect in a properly defined model; simply dropping their probability and renormalizing would change the rate at which useful categories arrive.

A few questions, answered

Why is there a limit of sixteen categories?

The algorithm considers up to 2^16 collected subsets. This bounded exact-state recurrence keeps browser work predictable; it is not an asymptotic large-catalogue approximation.

Does the equal-probability benchmark use my rare-category probability?

No. It uses n equally likely categories, each with probability 1/n, and reports n times the nth harmonic number for comparison.

Find your calculator

Start typing to explore the library.