DistFunc_logdHypergeometric

DistFunc_logdHypergeometric(n, k, m, x)

Logarithm of the probability function of an hypergeometric distribution.

Parameters
nint, n\geq 0

The population size

kint, 0\leq k\leq n

The number of candidates in the population

mint, 0\leq m\leq n

The number of individuals in a draw

xint, x\geq 0

The number of candidates in a draw

Returns
logpfloat

The natural logarithm of the probability to get x candidates in a draw.

Notes

This method is based on an algorithm similar to Loader’s algorithm, the fast and accurate method described in [loader2000], with the further improvements mentioned in [dimitriadis2016].

Examples

>>> import openturns as ot
>>> p = ot.DistFunc.logdHypergeometric(10, 4, 7, 2)