DistFunc_rBinomial¶
-
DistFunc_rBinomial
(*args)¶ Realization of a binomial distribution.
- Parameters
- nint,
The number of trials
- pfloat,
The success probability of each trial
- sizeint
The number of realizations to generate.
- Returns
- realizationsint or
Indices
The realizations of the discrete disctribution.
- realizationsint or
Notes
This method implements the rejection algorithm described in [hormann1993].
Examples
>>> import openturns as ot >>> ot.RandomGenerator.SetSeed(0) >>> r = ot.DistFunc.rBinomial(5, 0.3) >>> r = ot.DistFunc.rBinomial(5, 0.3, 10)