Click or drag to resize
RandomNextPoisson Method
Generate a pseudorandom number from a Poisson distribution.

Namespace: Imsl.Stat
Assembly: ImslCS (in ImslCS.dll) Version: 6.5.2.0
Syntax
public virtual int NextPoisson(
	double theta
)

Parameters

theta
Type: SystemDouble
A double which specifies the mean of the Poisson distribution, theta \gt 0.

Return Value

Type: Int32
A int which specifies a pseudorandom number from a Poisson distribution.
Remarks

Method NextPoisson generates pseudorandom numbers from a Poisson distribution with parameter theta. theta, which is the mean of the Poisson random variable, must be positive. The probability function (with \rm \theta  = theta) is

f(x) = e^{ - {\rm{\theta}}} \, 
            {\rm{\theta}}^{x} /x !

for x = 0, 1, 2, \ldots

If theta is less than 15, NextPoisson uses an inverse CDF method; otherwise the PTPE method of Schmeiser and Kachitvichyanukul (1981) (see also Schmeiser 1983) is used.

The PTPE method uses a composition of four regions, a triangle, a parallelogram, and two negative exponentials. In each region except the triangle, acceptance/rejection is used. The execution time of the method is essentially insensitive to the mean of the Poisson.

See Also