Connect via MCP →

Enter Calculation

Formula

Show calculation steps (2)
  1. Cumulative Probabilities

    Cumulative Probabilities: Hypergeometric Probability Calculator

    P(X <= k) and P(X >= k) summed over the support of the hypergeometric distribution

  2. Mean and Variance

    Mean and Variance: Hypergeometric Probability Calculator

    Expected value and variance of the hypergeometric distribution

Advertisement

Results

P(X = k)
0.20984
exact probability of k successes
P(X ≤ k) 0.95174
P(X ≥ k) 0.2581
Mean (expected successes) 1
Variance 0.7347

What is the hypergeometric distribution?

The hypergeometric distribution describes the probability of drawing exactly k successes in n draws made without replacement from a finite population of size N that contains K total successes. Unlike the binomial distribution (which assumes replacement and constant probability), the hypergeometric accounts for the fact that each draw changes the composition of the remaining population.

Urn with two colors of balls split into successes and failures, with a sample drawn without replacement
Sampling without replacement: drawing n items from a population of N with K successes.

How to use this calculator

Enter four whole numbers: the population size N, the number of successes in the population K, the sample size n, and the number of observed successes k. The calculator returns the exact probability \(P(X=k)\), the cumulative probabilities \(P(X \le k)\) and \(P(X \ge k)\), and the distribution mean and variance.

The formula explained

\(P(X=k)\) equals the number of ways to choose k successes from K, times the ways to choose the remaining n−k items from the N−K failures, divided by the total ways to choose n items from N.

$$P(X = k) = \dfrac{\dbinom{K}{k}\dbinom{N-K}{n-k}}{\dbinom{N}{n}}$$

The mean is \(\mu = n\cdot K/N\) and the variance is \(\sigma^{2} = n\cdot(K/N)\cdot((N-K)/N)\cdot((N-n)/(N-1))\), where the last factor is the finite population correction.

$$\begin{gathered} \mu = n\,\dfrac{K}{N} \\[1em] \sigma^{2} = n\,\dfrac{K}{N}\,\dfrac{N-K}{N}\,\dfrac{N-n}{N-1} \end{gathered}$$
Advertisement
Bar chart of a hypergeometric probability mass function shaped like a single peak
The hypergeometric PMF: probability of exactly k successes in the sample.

Worked example

A standard 52-card deck has K=4 aces. Draw n=5 cards. The probability of exactly k=2 aces is

$$\dfrac{\dbinom{4}{2}\dbinom{48}{3}}{\dbinom{52}{5}} = \dfrac{6\cdot 17296}{2598960} \approx 0.039929$$

The expected number of aces is

$$5\cdot\dfrac{4}{52} \approx 0.3846$$

FAQ

When should I use hypergeometric instead of binomial? Use hypergeometric when sampling without replacement from a small finite population; use binomial when draws are independent or the population is effectively infinite.

What does \(P(X \ge k)\) mean? It is the probability of getting at least k successes — useful for tail tests such as quality-control acceptance sampling.

Can k be larger than K or n? If k exceeds the smaller of K and n, the probability is 0 because such an outcome is impossible.

Last updated: