g05tkc generates
integers
, each from a discrete Poisson distribution with mean
, where the probability of
is
where
The methods used by this function have low set up times and are designed for efficient use when the value of the parameter
changes during the simulation. For large samples from a distribution with fixed
using
g05tjc to set up and use a reference vector may be more efficient.
When
the product of uniforms method is used, see for example
Dagpunar (1988). For larger values of
an envelope rejection method is used with a target distribution:
This distribution is generated using a ratio of uniforms method. A similar approach has also been suggested by
Ahrens and Dieter (1989). The basic method is combined with quick acceptance and rejection tests given by
Maclaren (1990). For values of
Stirling's approximation is used in the computation of the Poisson distribution function, otherwise tables of factorials are used as suggested by
Maclaren (1990).
One of the initialization functions
g05kfc (for a repeatable sequence if computed sequentially) or
g05kgc (for a non-repeatable sequence) must be called prior to the first call to
g05tkc.
Ahrens J H and Dieter U (1989) A convenient sampling method with bounded computation times for Poisson distributions Amer. J. Math. Management Sci. 1–13
Not applicable.
Please consult the
X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this function. Please also consult the
Users' Note for your implementation for any additional implementation-specific information.
None.
This example prints ten pseudorandom integers from five Poisson distributions with means
,
,
,
and
. These are generated by ten calls to
g05tkc, after initialization by
g05kfc.
None.