Probability & Statistics

Negative Hypergeometric Distribution

Draw without replacement until a chosen marked item arrives and inspect the exact waiting-time distribution.

By Riano · Published · Updated · Report a correction

Negative Hypergeometric Distribution

Concept Overview

Choose a finite bag of N items with K marked, and define T as the total draw index of the rth marked item without replacement. The negative hypergeometric distribution describes the exact waiting-time distribution.

Worked Example

Consider a bag with N = 10 items, where K = 4 are marked. We want to find the expected waiting time to draw the r = 2nd marked item.

  • The support for the waiting time T is from r to N - K + r, which is 2 to 10 - 4 + 2 = 8.
  • The exact mean is E[T] = r(N + 1)/(K + 1) = 2(11)/5 = 22/5 = 4.4.
  • The exact variance is Var(T) = r(K - r + 1)(N + 1)(N - K)/((K + 1)2(K + 2)) = 2(3)(11)(6) / (25(6)) = 396/150 = 66/25 = 2.64.
  • To find the probability of drawing the 2nd marked item on the 5th draw (T = 5):
P(T = t) = C(t - 1, r - 1) * C(N - t, K - r) / C(N, K) P(T = 5) = C(4, 1) * C(5, 2) / C(10, 4) P(T = 5) = 4 * 10 / 210 = 40 / 210 = 4/21 ≈ 0.190476

We must first draw r - 1 marked items in the first t - 1 draws, and the t-th draw must be the r-th marked item. This differs from unmarked draws T - r.

Experiment

Using the Negative Hypergeometric Distribution module, we can explore how the parameters affect the waiting time.

  1. Select the bag preset "10 with4 marked".
  2. Set the marked target r to 2.
  3. Observe the exact mean is 4.4, variance is 2.64, and feasible support is 2 to 8.
  4. Probe the draw t = 5 to see the exact probability is 4/21.

Notice that if you set K < r (e.g., target 1 in "No marked"), the module reports the target is impossible.

Limitations

The negative hypergeometric distribution assumes a finite population with a known number of marked items, and draws are strictly without replacement. If draws are with replacement, the negative binomial distribution should be used instead. For cases where K < r, the waiting moments are undefined rather than zero, and the module reports "Target impossible". Queries outside the finite support have probability zero.

References

For further exploration, you can refer to the official SciPy documentation which discusses the negative hypergeometric distribution in detail.

Experience it interactively

Adjust parameters, observe in real time, and build deep intuition with Riano’s interactive Negative Hypergeometric Distribution module.

Try Negative Hypergeometric Distribution on Riano →

More in Probability & Statistics