DistFunc_pHypergeometric¶
-
DistFunc_pHypergeometric
(n, k, m, x, tail=False)¶ The cumulative probability function of an hypergeometric distribution.
- Parameters
- nint,
The population size
- kint,
The number of candidates in the population
- mint,
The number of individuals in a draw
- xint,
The number of candidates in a draw
- tailbool
Flag to tell if it is the CDF or its complement which is evaluated
- Returns
- pfloat
The probability to get at most candidates in a draw.
Notes
This method is based on a summation of the probability function toward the upper bound or the lower bound of the range depending on the position of wrt the mode of the distribution, then take the complement if needed.
Examples
>>> import openturns as ot >>> p = ot.DistFunc.pHypergeometric(10, 4, 7, 2) >>> p = ot.DistFunc.pHypergeometric(10, 4, 7, 2, True)