Hypergeometric distribution (from http://www.math.wm.edu/˜ leemis/chart/UDR/UDR.html ) The shorthand X ∼ hypergeometric(n_{1}, n_{2}, n_{3}) is used to indicate that the random variable X has the hypergeometric distribution for some nonnegative integer parameters n_{1},n_{2}, and n_{3}, where n_{1},n_{2} ∈ {0,1,2, ..., n_{3}}. A hypergeometric random variable X for parameters n_{1}, n_{2}, and n_{3} has probability mass function

f(x) = \begin{matrix}\binom{n_{1}}{x} & \binom{n_{3}−n_{1}}{n_{2}−x} \\ ( & {n_{3} \atop n_{2}} & ) \end{matrix}.

for x = max{0, n_{1}+ n_{2}− n_{3}},...,min{n_{1}, n_{2}}. The hypergeometric distribution is used for sampling without replacement from a finite population of items. More specifically, a hypergeometric random variable X is the number of defective items in a sample of size n_{2} items drawn at random and without replacement from a lot of n_{3} items which contains n_{1} defective items. Applications include acceptance sampling from quality control and animal population size estimation using tagging with capture/recapture. The probability mass function for n_{1} = 15, n_{2} = 10, and n_{3} = 50 is illustrated below.

PSfrag replacements

x
f(x)

The cumulative distribution function on the support of X is

F (x) = P(X ≤ x) = ∑_{k=0}^{x} \begin{matrix}\binom{n_{1}}{k} & \binom{n_{3}−n_{1}}{n_{2}−k} \\ ( & {n_{3} \atop n_{2}} & ) \end{matrix} x = max\{0,n_{1}+ n_{2}− n_{3}\},...,min\{n_{1}, n_{2}\}.

The moment generating function (from Wikipedia) of X is

M_{X}(t) = \begin{matrix}( & {n_{3}−n_{1} \atop n_{2}} & ) \\ ( & {n_{3} \atop n_{2}} & ) \end{matrix} _{2}F_{1}(−n_{2}, −n_{1}, n_{3}− n_{1}− n_{2}+ 1, e^{t}) ,

where _{2}F_{1} is the hypergeometric function defined by

2F_{1}(a, b, c, z) = 1 + \frac{ab}{c}· \frac{z}{1!} + \frac{a(a + 1)b(b + 1)}{c(c + 1)} · \frac{z^{2}}{2!} + \frac{a(a + 1)(a + 2)b(b + 1)(b + 2)}{c(c + 1)(c + 2)} · \frac{z^{3}}{3!} + ··· .

The population mean, variance, and skewness of X are

E[X] = \frac{n_{1}n_{2}}{n_{3}} V [X] = \frac{n_{2}n_{1}(n_{3}− n_{1})(n_{3}− n_{2})}{n_{3}^{2}(n_{3}− 1)}

E [( \frac{X − μ}{σ} ) ^{3}] = \frac{(n_{3}− 2n_{1})(n_{3}− 1)^{1/2}(n_{3}− 2n_{2})}{[n_{2}n_{1}(n_{3}− n_{1})(n_{3}− n_{2})]^{1/2}(n_{3}− 2)} .

APPL verification: The APPL statements

X := HypergeometricRV(n3, n1, n2); Mean(X); Variance(X); Skewness(X);

return complicated expressions for the population mean, variance, and skewness.