Hypergeometric Distribution |
---|
The hypergeometric distribution may be seen as a variation on the binomial distribution.
A random variable X has a hypergeometric distribution and it is referred to as a hypergeometric random variable if and only if its probability distribution is given by
R has four dedicated commands for density, distribution function, quantile
function, and random generation for the binomial distribution with parameters
\[
h(x,n; N, m ) = \frac{\binom{m}{x} \binom{N-m}{n-x}}{binom{N}{n}} \qquad
\mbox{ for } \ \max \left\{ 0, n+m-N \right\} \le x \le \min (n,m) .
\]
size
and prob
:
- dhyper(x, m, n, k, log = FALSE)
- phyper(q, m, n, k, lower.tail = TRUE, log.p = FALSE)
- qhyper(p, m, n, k, lower.tail = TRUE, log.p = FALSE)
- rhyper(nn, m, n, k)