powered by
Compute hypergeometric (point) probabilities via Molenaar's binomial approximation, hyper2binomP().
hyper2binomP()
dhyperBinMolenaar(x, m, n, k, log = FALSE)
a numeric vector, with the length the maximum of the lengths of x, m, n, k.
numeric
x, m, n, k
(vector of) the number of white balls drawn without replacement from an urn which contains both black and white balls.
the number of white balls in the urn.
the number of black balls in the urn.
the number of balls drawn from the urn, hence in \(0,1,\dots, m+n\).
logical indication if the logarithm log(P) should be returned (instead of \(P\)).
logical
log(P)
Martin Maechler
See those in phyperBinMolenaar.
phyperBinMolenaar
hyper2binomP(); R's own dhyper() which uses more sophisticated computations.
dhyper()
## The function is simply defined as function (x, m, n, k, log = FALSE) dbinom(x, size = k, prob = hyper2binomP(x, m, n, k), log = log)
Run the code above in your browser using DataLab