### Hypergeometric Distribution$X \sim HG(n, N, M)$

 P(X = x)  = P(X ≤ x)  = P(X ≥ x)  = $n=$ $N=$ $M=$ $x=$

This applet computes probabilities for the hypergeometric distribution $$X \sim HG(n, N, M)$$ where

• $n =$ sample size
• $N =$ total number of objects
• $M =$ number of successes (note: number of failures is $N-M$)

The random variable $X$ equals the number of successes in the sample. The support of $X$ takes the usual restrictions:

• $0 \leq x \leq n$
• $x \leq M$
• $n-x \leq N-M$

#### Directions

• Enter the sample size in the $n$ box.
• Enter the total number of objects the $N$ box.
• Enter the number of successes in the $M$ box.
• Hitting "Tab" or "Enter" on your keyboard will plot the probability mass function (pmf).

To compute a probability, select $P(X=x)$ from the drop-down box, enter a numeric $x$ value, and press "Tab" or "Enter" on your keyboard. The probability $P(X=x)$ will appear in the pink box. Select $P(X \leq x)$ from the drop-down box for a left-tail probability (this is the cdf).

#### Details

• $f(x)=P(X=x)=\frac{{M \choose x}{N-M \choose n-x}}{N \choose n}$
for $x=0,1,\ldots,n$ where $x \le M$ and $n-x \le N-M$
• $\mu=E(X)=n\frac{M}{N}$
• $\sigma^2=Var(X)=n\frac{M}{N}\left(1-\frac{M}{N}\right)\left(\frac{N-n}{N-1}\right)$
• $\sigma=SD(X)=\sqrt{n\frac{M}{N}\left(1-\frac{M}{N}\right)\left(\frac{N-n}{N-1}\right)}$