Poisson Random Number Generator

Solved
Frequent Contributor
Posts: 90

Poisson Random Number Generator

Hello Everyone,

I am working on a Poisson Random Number Generator, and I had a question about it.

I know this may sound like a bit of a silly question, but I am wondering what does it output exactly?

Here is my code:

data test2;

array p p1c1-p1c50;

do i = 1 to 1000;

do j=1 to 50 ;

p=ranpoi(0,3);

end;

output;

end;

run;

proc print data=test2;

run;

So for my sanity, what this is outputting is the possible values that x can take with a lambda of 3.

Am I right in my thinking?

I just want to make sure because I had a bit of an embarrassing moment with my professor when he questioned me and asked me if I was sure about what this is outputting exactly.

Thanks!

Accepted Solutions
Solution
‎04-08-2013 08:28 PM
Posts: 5,535

Re: Poisson Random Number Generator

RanPoi(seed, m) returns pseudo random non-negative integers following a Poisson distribution with mean value = m. The Poisson distribution has the property that the variance is equal to the mean. The values that can be returned are thus 0, 1, 2, ...

PG

PG

All Replies
Solution
‎04-08-2013 08:28 PM
Posts: 5,535

Re: Poisson Random Number Generator

RanPoi(seed, m) returns pseudo random non-negative integers following a Poisson distribution with mean value = m. The Poisson distribution has the property that the variance is equal to the mean. The values that can be returned are thus 0, 1, 2, ...

PG

PG
Frequent Contributor
Posts: 90

Re: Poisson Random Number Generator

Thanks for your help! I appreciate it!

SAS Super FREQ
Posts: 4,242