rPoisson

rPoisson(*args)

Realization of a Poisson distribution.

Parameters:
lambdafloat, \lambda \geq 0

The intensity of the Poisson distribution.

sizeint

The number of realizations to generate.

Returns:
realizationsint or Indices

The realizations of the distribution.

Notes

For the small values of \lambda, we use the method of inversion by sequential search described in [devroye1986] and with the important errata in [devroye1986b]. For the large values of \lambda, we use the ratio of uniform method described in [stadlober1990].

Examples

>>> import openturns as ot
>>> ot.RandomGenerator.SetSeed(0)
>>> r = ot.DistFunc.rPoisson(5.0)
>>> r = ot.DistFunc.rPoisson(5.0, 10)