- Function Poisson(lambda)
Poisson
The function Poisson
draws a random value from a Poisson
distribution.
Poisson(
AverageNumberOfSuccesses ! (input) numerical expression
)
Arguments
- lambda
A scalar numerical expression \(> 0\).
Return Value
The function
Poisson
returns a random value drawn from a Poisson distribution with average number of occurrences AverageNumberOfSuccesses.
Graph
![../../_images/poisson.png](../../_images/poisson.png)
A graph with:
a histogram for 1000 experiments of drawing from distribution
Poisson(4)
, andthe
DistributionDensity
forPoisson(4)
Example
The code:
option seed := 1234 ;
_p_draw := Poisson( 10 );
_p_pointDensity := DistributionDensity( Poisson( 10 ), 5 );
block where listing_number_precision := 6 ;
display _p_draw, _p_pointDensity ;
endblock ;
will produce
_p_draw := 12 ;
_p_pointDensity := 0.037833 ;
in the listing file.
References
The
Poisson
distribution is discussed in full detail in Discrete Distributions of the Language Reference.