hypergeometric distribution calculator

Calculator

Compute exact and cumulative hypergeometric probabilities for sampling without replacement.

Valid support: max(0, n - (N - K)) ≤ X ≤ min(n, K)

What is the hypergeometric distribution?

The hypergeometric distribution models the probability of getting a specific number of successes when you draw a sample from a finite population without replacement. That “without replacement” part is the key difference from a binomial model.

In plain terms: if you take items out and do not put them back, the odds change from draw to draw. Hypergeometric probability captures that changing-odds process exactly.

When should you use this calculator?

  • Quality control: probability of defective parts in a random inspection sample.
  • Card games: chance of drawing a certain number of hearts, aces, or other target cards.
  • Audit sampling: probability of selecting a number of problematic records.
  • Biology and genetics: overlap/enrichment style calculations from finite sets.
  • Lot acceptance decisions in manufacturing and procurement.

Parameter meanings

N: Population size

Total number of items in the full population.

K: Number of successes in the population

How many of those N items are classified as “success” (or “target”).

n: Sample size (draws)

How many items you draw from the population without replacement.

k: Number of observed successes in the sample

The count of target items found in your sample. Depending on calculator mode, this may be exact, a threshold, or a range endpoint.

Formula used

For exact probability of observing exactly k successes:

P(X = k) = [C(K, k) × C(N − K, n − k)] / C(N, n)

where C(a, b) is the combination function (“a choose b”). The calculator also computes cumulative probabilities by summing valid exact probabilities over the requested range.

How to use the calculator

  1. Select the probability type: exact, at most, at least, or between.
  2. Enter N, K, and n as integers.
  3. Enter k (and k2 if using “between”).
  4. Click Calculate.

The result panel shows:

  • The probability expression evaluated.
  • Probability in decimal and percent form.
  • Distribution support bounds.
  • Expected value and variance for quick interpretation.

Hypergeometric vs. binomial: quick comparison

Hypergeometric

  • Sampling without replacement.
  • Finite population with changing draw probabilities.
  • Exact for finite-lot scenarios.

Binomial

  • Sampling with replacement (or effectively infinite population).
  • Constant success probability each trial.
  • Often used as approximation when population is very large relative to sample.

Worked mini example

Suppose a deck has 52 cards, with 4 aces. You draw 5 cards. What is the probability of getting exactly 1 ace?

  • N = 52
  • K = 4
  • n = 5
  • k = 1

Enter those values with mode P(X = k) and calculate. This is a classic hypergeometric setup because cards are not replaced during the hand draw.

Common input mistakes to avoid

  • Using decimals instead of integers.
  • Setting K greater than N.
  • Setting n greater than N.
  • For range mode, entering k1 greater than k2.
  • Using binomial assumptions for without-replacement scenarios.

Final thoughts

A hypergeometric distribution calculator is essential whenever you care about realistic finite-population sampling. If your process draws from a fixed pool and each draw changes what remains, this model gives the right probability framework.

🔗 Related Calculators

🔗 Related Calculators