Hypergeometric Distribution Calculator

Data Visualization

Hypergeometric Distribution Calculator

What is Hypergeometric Distribution?

The hypergeometric distribution is a discrete probability distribution that describes the probability of \(k\) successes in \(n\) draws, without replacement, from a finite population of size \(N\) that contains exactly \(K\) successes.

Formula and Its Meaning

The probability mass function of the hypergeometric distribution is given by:

\[P(X = k) = \frac{\binom{K}{k} \binom{N-K}{n-k}}{\binom{N}{n}}\]

Where:

  • \(N\) is the population size
  • \(K\) is the number of success states in the population
  • \(n\) is the number of draws (sample size)
  • \(k\) is the number of observed successes
  • \(\binom{a}{b}\) represents the binomial coefficient ("a choose b")

Calculation Steps

  1. Calculate \(\binom{K}{k}\): This represents the number of ways to choose \(k\) successes from \(K\) total successes.
  2. Calculate \(\binom{N-K}{n-k}\): This represents the number of ways to choose the remaining non-successes.
  3. Calculate \(\binom{N}{n}\): This represents the total number of ways to choose \(n\) items from \(N\).
  4. Divide the product of steps 1 and 2 by the result of step 3.

Example Calculation

Let's calculate the probability of drawing 3 red marbles out of 5 draws from a bag containing 20 marbles, of which 8 are red.

Here, \(N = 20\), \(K = 8\), \(n = 5\), and \(k = 3\)

\[P(X = 3) = \frac{\binom{8}{3} \binom{12}{2}}{\binom{20}{5}} = \frac{56 \cdot 66}{15504} \approx 0.2378\]

Visual Representation

Population Success Sample Success

This diagram represents our example. The large circle represents the total population of 20 marbles, with the blue section showing the 8 red marbles. The smaller circle represents our sample of 5 draws, with the green section showing the 3 successful draws of red marbles.