Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Topic: Simulating iid Poisson variates
Replies: 1   Last Post: Jun 19, 1996 3:56 PM

 Search Thread: Advanced Search

 William H. Jefferys Posts: 20 Registered: 12/12/04
Re: Simulating iid Poisson variates
Posted: Jun 19, 1996 3:56 PM
 Plain Text Reply

In article <m0uWReL-000Iv0C@one.reed.edu>, jones@one.reed.edu wrote:
[I wrote]:
> >I need to simulate iid Poisson variates for a Monte Carlo
> >calculation. I can do it by brute force; are there any
> >more elegant or convenient ways?

>
I'm not sure what you mean by "brute force" here, perhaps you
are already aware of the so-called inverse-transform method, ie.

generate u ~ U(0,1), let p_i = Pr(X = i), then let the poisson rv X be

0 if u < p_0
1 if p_0 <= u < p_0 + p_1
2 if p_0 + p_1 <= u < p_0 + p_1 + p_2
etc.

if E(X) is small, this won't require too many comparisons. if E(X) is
large then it would be quicker to start the search near the mean.

depending on the context, it might be useful to use a table of the
values of the CDF, or to make use of the fact that

p_k = (lambda/k)*p_{k-1}

to compute the probabilites on the fly.

Albyn, good to hear from you!

Yes, obvious schemes like inverting the cumulative distribution, and
acceptance-rejection methods, were what I had in mind as "brute force." I
was, rather, looking to see if there were more elegant or faster schemes
available.

Thanks to all who have replied either on the net or by E-mail. Further
ideas will be gratefully received.

Bill

© The Math Forum at NCTM 1994-2017. All Rights Reserved.