Namespace:
Imsl.Stat
Assembly:
ImslCS (in ImslCS.dll) Version: 6.5.0.0
Syntax
C# |
---|
public virtual int NextPoisson( double theta ) |
Visual Basic (Declaration) |
---|
Public Overridable Function NextPoisson ( _ theta As Double _ ) As Integer |
Visual C++ |
---|
public: virtual int NextPoisson( double theta ) |
Parameters
- theta
- Type: System..::.Double
A double which specifies the mean of the Poisson distribution,.
Return Value
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 )
is

for
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.