rHypergeometric¶
- rHypergeometric(*args)¶
Realization 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.
- sizeint
The number of realizations to generate.
- Returns:
- realizationsint or
Indices
The realizations of the distribution.
- realizationsint or
Notes
This method is based on the alias method.
Examples
>>> import openturns as ot >>> ot.RandomGenerator.SetSeed(0) >>> r = ot.DistFunc.rHypergeometric(10, 4, 7) >>> r = ot.DistFunc.rHypergeometric(10, 4, 7, 10)