A **hypergeometric distribution** tells us the probability of getting *k *successes in *n *attempts without replacement from a population of size *N *with *K *successes in the population.

The probability of getting exactly *k *successes is given by:

P(*k* successes) =( _{K}C_{k} * _{N-K}C_{n-k} ) / _{N}C_{n}

where _{K}C_{k} represents the number of combinations of *K *objects taken *k *at a time.

The hypergeometric distribution has the following properties:

- The mean of the distribution is
**μ**= (n*K) / N - The variance of the distribution is
**σ**= n * (K / N) * ((N-K) / N) * ((N-n) / (N-1))^{2} - The standard deviation of the distribution is
**σ**= √σ^{2}

Let’s walk through some examples to get a better understanding of the hypergeometric distribution.

**Examples Using the Hypergeometric Distribution**

**Example 1**

*There are 15 blue marbles and 5 red marbles in a bag. You close your eyes and draw 7 marbles without replacement. What is the probability that exactly 3 of the marbles you draw are red?*

**Step 1: Identify the four numbers needed to calculate a hypergeometric probability: sample size (n), number of successes in sample (k), population size (N), and number of successes in the population (K).**

**n** = 7 (you draw this many marbles, i.e. your sample size is this large)

**k** = 3 (you are interested in the probability of getting exactly this many “successes,” i.e. red marbles)

**N** = 20 (this is how many marbles are in the entire bag, i.e. the population size)

**K** = 15 (this is how many “successes,” i.e. red marbles, are in the entire bag)

**Step 2: Plug these numbers into the hypergeometric formula or a hypergeometric calculator.**

**Using the formula:**

P(*k* successes) =( _{K}C_{k} * _{N-K}C_{n-k} ) / _{N}C_{n}

P(*k* successes) =( _{15}C_{3} * _{20-15}C_{7-3} ) / _{20}C_{7} = (455* 5) / 77,520 = 2,275 / 77,520 = **0.02935**

*Note: I used the Combinations Calculator to find the combinations in the above calculation.*

Thus, the probability of drawing exactly 3 red marbles is **0.02935.**

**Using the calculator:**

Plug the following numbers into the Hypergeometric Distribution Calculator:

This result matches the result we got in the calculation above. The probability that we draw exactly 3 red marbles is **0.02935**.

**Example 2**

*There are 12 green balls and 9 yellow balls in a bag. You close your eyes and draw 4 balls without replacement. What is the probability that less than 2 of the balls you draw are green?*

**Step 1: Identify the four numbers needed to calculate a hypergeometric probability: sample size (n), number of successes in sample (k), population size (N), and number of successes in the population (K).**

**n** = 4 (you draw this many balls, i.e. your sample size is this large)

**k** = 0 or 1 (you are interested in the probability of getting this many “successes,” i.e. green balls)

**N** = 21 (this is how many balls are in the entire bag, i.e. the population size)

**K** = 12 (this is how many “successes,” i.e. green balls, are in the entire bag)

**Step 2: Plug these numbers into the hypergeometric calculator.**

Plug the following numbers into the Hypergeometric Distribution Calculator:

Since we are interested in the probability of choosing *less than *2 green balls, the answer is **0.18947**.

**Example 3**

*The names of 40 students are in a bag, 15 of whom belong to classroom A and 25 of whom belong to classroom B. You close your eyes and draw 10 names without replacement. What is the probability that exactly 8 of the names are from classroom B?*

**Step 1: Identify the four numbers needed to calculate a hypergeometric probability: sample size (n), number of successes in sample (k), population size (N), and number of successes in the population (K).**

**n** = 10 (you draw this many names, i.e. your sample size is this large)

**k** = 8 (you are interested in the probability of getting this many “successes,” i.e. names from classroom B)

**N** =40 (this is how many names are in the entire bag, i.e. the population size)

**K** = 25 (this is how many “successes,” i.e. names from classroom B, are in the entire bag)

**Step 2: Plug these numbers into the hypergeometric formula or a hypergeometric calculator.**

**Using the formula:**

P(*k* successes) =( _{K}C_{k} * _{N-K}C_{n-k} ) / _{N}C_{n}

P(*k* successes) =( _{25}C_{8} * _{40-25}C_{10-8} ) / _{40}C_{10} = (1,081,575* 105) / 847,660,528 = **0.13398**

*Note: I used the Combinations Calculator to find the combinations in the above calculation.*

Thus, the probability of drawing exactly 8 names from classroom B is **0.13398**.

**Using the calculator:**

Plug the following numbers into the Hypergeometric Distribution Calculator:

This result matches the result we got in the calculation above. The probability that we draw exactly 8 names from classroom B is **0.13398**.

**Example 4**

*There are 52 cards in a deck, 13 of which are clubs. You close your eyes and randomly draw 2 cards without replacement. What is the probability that both cards are clubs?*

**n** = 2 (you draw this many cards, i.e. your sample size is this large)

**k** = 2 (you are interested in the probability of getting this many “successes,” i.e. clubs)

**N** = 52 (this is how many cards are in the entire deck, i.e. the population size)

**K** = 12 (this is how many “successes,” i.e. clubs, are in the entire bag)

**Step 2: Plug these numbers into the hypergeometric calculator.**

Plug the following numbers into the Hypergeometric Distribution Calculator:

The probability that both cards are clubs is **0.05882**.

Note that we could have found this answer without the help of a calculator by using some simple logic:

The first time you draw a card from the deck, the probability that it’s a club is 13/52.

The second time you draw a card, there are only 51 cards left in the deck. Since you picked a club the first time, there are only 12 clubs left in the deck. Thus, the probability of picking a club the second time is 12/51.

To find the probability that you draw a club both times, we can simply multiply these two probabilities together: (13/52) * (12/51) = **0.05882**.