

   TThhee HHyyppeerrggeeoommeettrriicc DDiissttrriibbuuttiioonn

        dhyper(x, m, n, k)
        phyper(q, m, n, k)
        qhyper(p, m, n, k)
        rhyper(nn, m, n, k)

   AArrgguummeennttss::

        x,q: vector of quantiles representing the number of
             white balls drawn without replacement from an urn
             which contains both black and white balls.

          m: the number of white balls in the urn.

          n: the number of black balls in the urn.

          k: the number of balls drawn from the urn.

          p: probability, it must be between 0 and 1.

         nn: the number of observations to be generated.

   DDeettaaiillss::

        For large values of `k',

   VVaalluuee::

        These functions provide information about the hypergeo-
        metric distribution with parameters `m', `n' and `k'
        (named Np, N-Np, and n, respectively in the reference
        below).  `dhyper' gives the density, `phyper' gives the
        distribution function `qhyper' gives the quantile func-
        tion and `rhyper' generates random deviates.

        The hypergeometric distribution is used for sampling
        without replacement.  It has density

          p(x) = choose(m, x) choose(n, k-x) / choose(m+n, k)

        for x = 0, ..., k.

   RReeffeerreenncceess::

        Johnson, N.L., Kotz, S. and Kemp, A.W. (1992).  Uni-
        variate Discrete Distributions, 2nd Ed., Wiley.

   EExxaammpplleess::

        m <- 10; n <- 7; k <- 8
        x <- 0:m
        rbind(phyper(x, m, n, k), dhyper(x, m, n, k))
        all(phyper(x, m, n, k) == cumsum(dhyper(x, m, n, k)))# FALSE
        ## Error :
        signif(phyper(x, m, n, k) - cumsum(dhyper(x, m, n, k)), dig=3)

