pHypergeometric¶
- pHypergeometric(n, k, m, x, tail=False)¶
Cumulative distribution function of an hypergeometric distribution.
- Parameters:
- nint,
The size of the sample.
- kint,
The number of candidates in the sample.
- mint,
The number of individuals in a draw.
- xint,
The number of candidates in a draw.
- tailbool, optional
Tail flag. If True, the complementary CDF is computed.
- Returns:
- pfloat
The probability to get at most candidates in a draw.
Notes
This method is based on a summation of the probability distribution function towards 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)