## Hypergeometric Experiment

In this tutorial, we will provide you step by step solution to some numerical examples on hypergeometric distribution to make sure you understand the hypergeometric distribution clearly and correctly.

## Definition of Hypergeometric Distribution

Suppose we have an hypergeometric experiment. That is, suppose there are $N$ units in the population and $M$ out of $N$ are defective, so $N-M$ units are non-defective.

Let $X$ denote the number of defective in a completely random sample of size $n$ drawn from a population consisting of total $N$ units.

The total number of ways of finding $n$ units out of $N$ is $\binom{N}{n}$.

Out of $M$ defective units $x$ defective units can be selected in $\binom{M}{x}$ ways and out of $N-M$ non-defective units remaining $(n-x)$ units can be selected in $\binom{N-M}{n-x}$ ways.

Hence, probability of selecting $x$ defective units in a random sample of $n$ units out of $N$ is $$\begin{equation*} P(X=x) =\frac{\text{Favourable Cases}}{\text{Total Cases}} \end{equation*}$$

$$\begin{equation*} \therefore P(X=x)=\frac{\binom{M}{x}\binom{N-M}{n-x}}{\binom{N}{n}},\;\; x=0,1,2,\cdots, n. \end{equation*}$$

## Mean of Hypergeometric Distribution

The expected value of hypergeometric randome variable is $E(X) =\dfrac{Mn}{N}$.

## Variance of Hypergeometric Distribution

The variance of an hypergeometric random variable is $V(X) = \dfrac{Mn(N-M)(N-n)}{N^2(N-1)}$.

## Example 1

Of the 20 cars in the parking lot, 7 are using diesel fuel and 13 gasoline. We randomly choose 6.

a. What is the probability that 3 are using diesel?

b. What is the probability that at least 2 are using diesel?

c. What is the probability that at most 2 are using diesel?

### Solution

Here $N=20$ total number of cars in the parking lot, out of that $m=7$ are using diesel fuel and $N-M =13$ are using gasoline.

$n=6$ cars are selected at random. Let $X$ denote the number of cars using diesel fuel out of selcted $6$ cars.

Then the probability distribution of $X$ is hypergeometric with probability mass function

\begin{aligned} P(X=x)&=\frac{\binom{M}{x}\binom{N-M}{n-x}}{\binom{N}{n}},\;\; x=0,1,2,\cdots, \min(n,M)\\ &= \frac{\binom{7}{x}\binom{13}{n-x}}{\binom{20}{6}},\; \; x=0,1,2,\cdots, 6\\ \end{aligned}

a. The probability that 3 cars are using diesel is

\begin{aligned} P(X=3) &= \frac{\binom{7}{3}\binom{13}{3}}{\binom{20}{6}}\\ &= \frac{35\times 286}{38760}\\ &= 0.2583 \end{aligned}

b. The probability that at least 2 cars are using diesel is \begin{aligned} P(X\geq 2) &= 1-P(X\leq 1)\\ &=1- \sum_{x=0}^{1}P(X=x)\\ &= 1-\big(P(X=0)+P(X=1)\big)\\ &=1-\bigg(\frac{\binom{7}{0}\binom{13}{6}}{\binom{20}{6}}+\frac{\binom{7}{1}\binom{13}{5}}{\binom{20}{6}}\bigg)\\ &=1-\bigg(\frac{1\times 1716}{38760}+\frac{7\times 1287}{38760}\bigg)\\ &= 1-\big(0.0443+0.2324\big)\\ &=1-0.2767\\ &= 0.7233\\ \end{aligned}

c. The probability that at most 2 cars are using diesel is

\begin{aligned} P(X\leq 2) &= \sum_{x=0}^{2}P(X=x)\\ &= P(X=0)+P(X=1)+P(X=2)\\ &=\frac{\binom{7}{0}\binom{13}{6}}{\binom{20}{6}}+\frac{\binom{7}{1}\binom{13}{5}}{\binom{20}{6}}+\frac{\binom{7}{2}\binom{13}{4}}{\binom{20}{6}}\\ &=\frac{1\times 1716}{38760}+\frac{7\times 1287}{38760}+\frac{21\times 715}{38760}\\ &= 0.0443+0.2324+0.3874\\ &=0.6641 \end{aligned}

## Example 2

Suppose that 20 people apply for a job. If 10 people are hired for the job at random,

a. what is the probability that the 10 selected will include the 5 most qualified applicants?

b. what is the probability that 3 of the 5 most qualified applicants are among the 10 selected?

### Solution

Here $N=20$ number of people applied for job, out of that $M=5$ are most qualified applicants and $N-M =15$ are not most qualified.

$n=10$ people are hired for the job at random. Let $X$ denote the number of people cars using diesel fuel out of selcted $10$ cars.

Then the probability distribution of $X$ is hypergeometric with probability mass function

\begin{aligned} P(X=x)&=\frac{\binom{M}{x}\binom{N-M}{n-x}}{\binom{N}{n}},\;\; x=0,1,2,\cdots, \min(n,M)\\ &= \frac{\binom{5}{x}\binom{15}{n-x}}{\binom{20}{10}},\; \; x=0,1,2,\cdots, 5\\ \end{aligned}

a. The the probability that the 10 selected will include the 5 most qualified applicants is

\begin{aligned} P(X=5) &= \frac{\binom{5}{5}\binom{15}{5}}{\binom{20}{10}}\\ &= \frac{1\times 3003}{184756}\\ &= 0.0163 \end{aligned}

b. The the probability that the 10 selected will include the 3 most qualified applicants is

\begin{aligned} P(X=3) &= \frac{\binom{5}{3}\binom{15}{7}}{\binom{20}{10}}\\ &= \frac{10\times 6435}{184756}\\ &= 0.3483 \end{aligned}

## Example 3

From a lot of 10 missiles, 4 are selected at random and fired.If the lot contains 3 defective missiles that will not fire, what is the probability that

a. all 4 will fire ?

b. at most 2 will not fire ?

### Solution

Here $N=10$ number of missiles, out of that $M=3$ are defective missiles and $N-M =7$ are not defective missiles. $n=4$ missiles are selected at random. Let $X$ denote the number of defective missiles that will not fire among the selected $4$ missiles.

Then the probability distribution of $X$ is hypergeometric with probability mass function

\begin{aligned} P(X=x)&=\frac{\binom{M}{x}\binom{N-M}{n-x}}{\binom{N}{n}},\;\; x=0,1,2,\cdots, \min(n,M)\\ &= \frac{\binom{3}{x}\binom{7}{4-x}}{\binom{10}{4}},\; \; x=0,1,2,\cdots,3\\ \end{aligned}

a. The probability that all randomly selected missiles will fire means $x=0$ missile will misfire.

\begin{aligned} P(X=0) &= \frac{\binom{3}{0}\binom{7}{4}}{\binom{10}{4}}\\ &= \frac{1\times 35}{210}\\ &= 0.1667 \end{aligned} Thus, there are $16.67$ % chance that all randomly selected 4 missiles will fire.

b. The probability that at most 2 will not fire is \begin{aligned} P(X\leq 2) &= \sum_{x=0}^{2}P(X=x)\\ &= \big(P(X=0)+P(X=1)+P(X=2)\big)\\ &=\bigg(\frac{\binom{3}{0}\binom{7}{4}}{\binom{10}{4}}+\frac{\binom{3}{1}\binom{7}{3}}{\binom{10}{4}}+\frac{\binom{3}{2}\binom{7}{2}}{\binom{10}{4}}\bigg)\\ &=\bigg(\frac{1\times 35}{210}+\frac{3\times 35}{210}+\frac{3\times 21}{210}\bigg)\\ &= \big(0.1667+0.5+0.3\big)\\ &= 0.9667 \end{aligned}

Thus, there are $96.67$ % chance that at most 2 missiles will fire.

Hope this tutorial helps you understand how to solve numerical problems on Hypergeometric distribution.