rHypergeometric¶
- rHypergeometric(*args)¶
Realization 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
- sizeint
The number of realizations to generate.
- Returns:
- realizationsint or
Indices
The realizations of the discrete disctribution.
- 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)