Hypergeometric Distribution Calculator

Calculate exact hypergeometric probabilities for sampling without replacement, with PMF, CDF, distribution tables, and binomial approximation comparison.

About the Hypergeometric Distribution Calculator

The hypergeometric distribution calculator computes exact probabilities for sampling without replacement from a finite population. Unlike the binomial distribution, which assumes each draw is independent, the hypergeometric distribution accounts for the changing composition of the pool as items are removed.

This distribution appears in quality control (sampling inspection lots), card games (drawing specific hands), lottery analysis, ecological capture-recapture studies, and Fisher's exact test for independence in 2×2 tables.

Enter the population size N, number of success states K, draw size n, and desired number of successes k to get exact probabilities, cumulative values, a full distribution table with visual bars, and a comparison showing how closely the binomial approximation matches. Check the example with realistic values before reporting. Use the steps shown to verify rounding and units. Cross-check this output using a known reference case. Use the example pattern when troubleshooting unexpected results. Validate that outputs match your chosen standards. Run at least one manual sanity check before publishing.

Why Use This Hypergeometric Distribution Calculator?

This calculator handles exact combinatorial probabilities that are tedious to compute by hand. The distribution table and visual chart make it easy to see the full probability landscape, while the binomial comparison helps you judge when simpler approximations are adequate.

Essential for statistics coursework, quality assurance professionals designing sampling plans, card game strategists, and researchers using Fisher's exact test.

How to Use This Calculator

  1. Enter the total population size (N) — all items in the group.
  2. Enter the number of success states (K) — items with the desired property.
  3. Enter the draw size (n) — how many items you draw without replacement.
  4. Enter the observed successes (k) for point probability.
  5. Set range bounds x₁ and x₂ for interval probability calculations.
  6. Review the distribution chart, full table, and binomial comparison.
  7. Use presets for quick exploration of common scenarios.

Formula

P(X = k) = C(K,k) × C(N−K, n−k) / C(N,n), where C(a,b) = a! / (b!(a−b)!). Mean = nK/N. Variance = nK(N−K)(N−n) / (N²(N−1)).

Example Calculation

Result: P(X = 2) ≈ 0.2743 (27.43%)

Drawing 5 cards from a standard 52-card deck, the probability of getting exactly 2 hearts (13 in the deck) is C(13,2)×C(39,3) / C(52,5) ≈ 0.2743.

Tips & Best Practices

Sampling Without Replacement in Practice

In manufacturing, a lot of N = 1000 units might have K = 50 defectives. Drawing n = 20 for inspection, the hypergeometric distribution gives the exact probability of finding k defectives. Acceptance sampling plans (AQL/LTPD) rely on these calculations to balance producer and consumer risk.

Multivariate Hypergeometric Distribution

The basic hypergeometric handles two categories (success/failure). The multivariate extension handles multiple categories simultaneously — like drawing a poker hand and tracking all four suits. The same C(N,n) denominator applies, with the numerator being a product of binomial coefficients for each category.

Connection to Combinatorial Identities

The Vandermonde identity, ΣC(K,k)C(N−K,n−k) = C(N,n), is essentially stating that hypergeometric PMF values sum to 1. This distribution sits at the intersection of combinatorics, probability theory, and statistical testing.

Frequently Asked Questions

When should I use hypergeometric vs. binomial?

Use hypergeometric for sampling without replacement from a finite population (card draws, quality inspection). Use binomial when draws are independent (coin flips, each trial identical).

What does "without replacement" mean?

Each item drawn is not returned to the pool, so the composition changes. Drawing 2 hearts makes the remaining deck have 11 hearts in 50 cards, not 13 in 52.

Can the hypergeometric distribution have k > K or k > n?

No. The number of successes k must be between max(0, n+K−N) and min(n, K). Values outside this range have probability zero.

How is this related to Fisher's exact test?

Fisher's exact test calculates the probability of observing a 2×2 contingency table (or more extreme) using the hypergeometric distribution. It's the gold standard for small-sample tests of independence.

What is acceptance sampling?

In quality control, you draw a sample of n items from a lot of N. If more than c defectives are found, the lot is rejected. The hypergeometric distribution gives exact acceptance/rejection probabilities.

Why does the binomial approximation column show differences?

The binomial assumes constant probability p = K/N for each draw. Without replacement, the actual probability changes with each draw. The difference shrinks as N grows relative to n.

Related Pages