The Hypergeometric Distribution

An explanation of the geometric distribution
A hypergeometric distribution tells us the probability of getting successes in attempts without replacement from a population of size N with successes in the population.

The probability of getting exactly successes is given by:

P(k successes) =( KCk * N-KCn-k  ) /  NCn

where KCk represents the number of combinations of objects taken 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 σ2 = n * (K / N) * ((N-K) / N) * ((N-n) / (N-1))
  • 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) =( KCk * N-KCn-k  ) /  NCn

P(k successes) =( 15C3 * 20-15C7-3  ) /  20C7 = (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:

Hypergeometric probability example
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:

Hypergeometric distribution example
Hypergeometric distribution output
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) =( KCk * N-KCn-k  ) /  NCn

P(k successes) =( 25C8 * 40-25C10-8  ) /  40C10 = (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:

Hypergeometric distribution probability example
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?

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 = 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:

Hypergeometric probability example with a deck of cards
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.

Leave a Reply

Your email address will not be published. Required fields are marked *