# Hypergeometric Distribution

### From MM*Stat International

English |

Português |

Français |

Español |

Italiano |

Nederlands |

The Hypergeometric distribution is based on a random event with the following characteristics:

- total number of elements is N
- from the N elements, M elements have the property N-M elements do not have this property, i.e. only two events, and are possible
- we randomly choose n elements out of the N

This means the probability P(A) is not constant and the draws (events) are not independent in this sort of experiment. The random variable X, which contains number of successes A after n repetitions of the experiment has a Hypergeometric distribution with parameters N,M, and n, with probability density function: Shorthand notation is: . The expected value and the variance of the Hypergeometric distribution H(N,M,n): A Hypergeometric distribution depends on parameters N, M, and n. These parameters influence its shape, location, and variance. This interactive examples allows you to change the values of these parameters and to obtain plots of a hypogeometric distribution function. We suggest that you only change the value of one parameter, holding the others constant, which will better illustrate the effects of the parameters on the shape of the Hypergeometric distribution. You can also compute probabilities for different values of x.

An insurance agent arrives in a town and sells 100 life insurances: 40 are term life policies and the remaining 60 are permanent life policies. He chooses (randomly and without returning) five life insurance policies. What is the probability that he chooses exactly two term life policies. There are policies. The outcomes of this experiment (type of the insurance policy) can take one of two values: the term life type (property A) with M = 40 and the permanent life type (complementary event), with N - M = 60. The random variable X is defined as ”number of the term life policies in five randomly chosen insurance policies”. The random variable X is based on random sampling experiment without replacement and so has a Hypergeometric distribution H(N;M;n) = H(100;40;5).The smallest value of X is 0 = (max[0, n - (N - M)]), i.e. none of the five 5 randomly chosen contracts is term a life policy. The largest possible value of X is , i.e. 5. The set of possible values of X is such that:0 x 5 We need to compute the value of the probability function for x = 2, i.e..P(X = 2) = (2;100;40;5): Suppose we increase the number of draws (randomly chosen contracts) to n=10. The only thing that would change in the example is the range of the random variable X, which becomes 0 x 10. The random variable X know has the following Hypergeometric distribution H(100;40;10). If we compute the probability that there are exactly 4 term life policies in the 10 randomly policies, i.e. P(X = 4):

An insurance agent knows from experience that 70% of his 20 clients, renew their contracts. Suppose this agent has 20 clients. What is the probability that at least one half of four randomly chosen clients will renew their contract? We have total of N = 20 clients. Of these clients, M=14 clients renew their policies (property A) and N-M clients do not. The experiment has only two possible outcomes. We choose n=4 clients randomly. Clearly, it does not make sense to model this random variable with replacement. The random variable X is defined as ”number of clients who renew their contract”. X has Hypergeometric distribution:H(N;M;n) = H(20;14;4). The smallest possible value of X is 0 = (max[0,n - (N - M)]), i.e. non of the 4 clients renew their contracts. is the largest possible value of X, 4 in this example. X can take the following values:0 x 4. We need to find the probability P(X 2), which can be computed as P(X = 2) + P(X = 3 ) + P(X = 4 ). This implies that: P(X 2) = 0.2817 + 0.4508 + 0.2066 = 0.9391. The probability that at least one half of four clients (out of the 20 clients) decides to renew their policy, is 0.9391. A student has to complete a test with ten question. The student must answer 3 randomly chosen questions from these questions. The student knows that 6 of the 10 questions are so difficult that no one has a chance to answer them. N = 10 questionsM = 4 questions have property A, they can be answeredn = 3 randomly chosen questions the student must answer X = ”number of questions with property A between n randomly chosen questions” Possible values of X are: max[0, n - (N - M)] x min(n, M) , i.e. 0 X 3 Motivation of the use of Hypergeometric distribution:

- finite number of questions,
- returning (repeating) of the questions does not make in this situation any sense,
- hence, the draws are not independent,
- this implies that P(A) depends on the previously drawn questions.

What is the probability that the student draws 3 ”good” questions? What is the probability that the student chooses at least one question that he can answer? P(X 1) = 1 - P(X = 0) It follows that: Like the Binomial distribution, the Hypergeometric distribution is based on an experiment with only two possible outcomes. The Hypergeometric distribution differs from the Binomial distribution in that we draw without replacement, which means the draws from the Hypergeometric distribution are not independent. This also implies that the number of occurrences is decreasing with each draw. This implies that . In addition, the number of outcomes with property also changes and this, in turn, changes the probability of drawing an object with property .

Each draw is conducted only once and without replacement, i.e. each object can be drawn only once in the draws (no repetition)

Assuming draws, we are interested in the total number of outcomes with the property , i.e. random variable = {number of outcomes with the property drawn in the draws }

The order of the drawn objects does not play a role in the number of objects drawn with the property . Using combinatorics, we can calculate the number of possible outcomes in which we draw out of objects without replacements:

How many different ways are there to obtain ?We have , i.e., we cannot draw more objects with the property than we have in total and, analogously, . Since we draw without replacement, one object with the property cannot be drawn more than the total number of objects in the set (no repetition). The order that these outcomes are drawn does not impact the outcomes we observe. The total number of combinations of observing outcomes with the property out of outcomes is :

Conversely, the outcomes without the property drawn out of objects is:

Each possible element with the property out of outcomes, with any possibility of choosing without the property out of objects (this gives altogether drawn objects) leads the event . The number of possibilities of obtaining the event is therefore The desired probability can be obtained using the classical (Laplace) definition of the probability as the ratio

The largest possible value of is for , and for . This implies that: The smallest possible value of is: (always). If is greater than the number of elements without the property , then we have that . This implies that: Let , we have the following: The distribution will have the same expected value as the corresponding Binomial distribution . However, its variance will be smaller because it is multiplied by the ratio because drawing without replacement implies that we cannot use anymore the information we start with initially. The constant is called a continuity correction. The probability function of the Hypergeometric distribution is illustrated in the following diagram. We choose the following parameters for this example: and .