CalcWorldHub
Free online calculator · no signup

Exact occupied bins probability calculator

Find the exact probability that independent uniform draws occupy exactly k distinct bins, along with the complete occupancy distribution.

4,000 tools
Exact occupied bins probability calculator — Equal-probability bins, Independent draws, Requested occupied bins and calculation method
Exact occupied bins probability calculator: inputs and calculation method.

How to use this calculator

Find the exact probability that independent uniform draws occupy exactly k distinct bins, along with the complete occupancy distribution.

  1. Enter Equal-probability bins, Independent draws, Requested occupied bins. Match the units shown beside each field and review the result together with the assumptions below.
  2. Read the worked example below to check the expected input format and result.
  3. Compare another scenario by changing one input at a time. Use Reset to return to the starting values.
Calculation guide

Exact occupied bins probability explained

This recurrence tracks the distribution of occupied bins after each independent draw. It gives the exact finite-model probability of ending with the requested number of distinct bins, without enumerating every draw sequence.

Probability exactly k bins are occupied0.2661
Probability exactly k bins are occupied: 0.2661421895 in the worked scenario.

Inputs, symbols, and units

m — Equal-probability bins
Number of bins or coupon types, each equally likely on every independent draw. Enter a whole number.
n — Independent draws
Whole draws with replacement. Zero is supported; bins multiplied by draws must not exceed five million. Enter a whole number.
k — Requested occupied bins
Distinct occupied bins requested. It may exceed the draw count, in which case its probability is zero. Enter a whole number.

Formula and method

Pt+1(j)=Pt(j)·j/m+Pt(j−1)·(m−j+1)/m; P0(0)=1.

Track the number of occupied bins after every draw. A new draw either lands in one of j occupied bins or fills a new bin from the j−1 state. Dynamic programming avoids huge Stirling numbers and factorials while preserving the exact finite-model recurrence.

A worked scenario

Equal-probability bins = 8; Independent draws = 10; Requested occupied bins = 5.

  • Probability exactly k bins are occupied: 0.2661421895
  • Expected occupied bins: 5.89539539 bins
  • All bins occupied probability: 0.0281631947
  • Occupancy probability vector: 0:0, 1:7.45058060e-9, 2:0.00002665, 3:0.00291958, 4:0.05336143, 5:0.26614219, 6:0.4285875, 7:0.22079945, 8:0.02816319

Ten draws into eight bins can occupy no more than eight bins. The requested five-bin event includes all sequences with exactly five distinct destinations, regardless of how often each is repeated.

Assumptions and edge cases

Independent draws with replacement into equally likely bins; up to 500 bins and 100,000 draws, with bins times draws at most five million. Floating-point arithmetic is used, so very small probabilities may underflow. This counts occupied bins, not the number of colliding pairs.

Reading the outputs

The probability vector lists every possible occupied-bin count. Expected occupancy is a separate average and can be fractional.

Frequently asked questions

Can bins have different probabilities?

Not in this uniform-bin recurrence; unequal probabilities require another model.

What if there are no draws?

Zero bins are occupied with probability one.

Is this the coupon-collector completion probability?

That is the special event k=m; this page calculates the entire occupancy distribution.

How do I use the Exact occupied bins probability calculator?

Enter Equal-probability bins, Independent draws, Requested occupied bins. Match the units shown beside each field and review the result together with the assumptions below.

What is a worked example of Exact occupied bins probability?

Equal-probability bins = 8; Independent draws = 10; Requested occupied bins = 5. Probability exactly k bins are occupied: 0.2661421895 Expected occupied bins: 5.89539539 bins All bins occupied probability: 0.0281631947 Occupancy probability vector: 0:0, 1:7.45058060e-9, 2:0.00002665, 3:0.00291958, 4:0.05336143, 5:0.26614219, 6:0.4285875, 7:0.22079945, 8:0.02816319 Ten draws into eight bins can occupy no more than eight bins. The requested five-bin event includes all sequences with exactly five distinct destinations, regardless of how often each is repeated.