turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- SAS Procedures
- /
- Poisson Random Number Generator

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

04-08-2013 05:38 PM

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

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to InfoAlisaA

04-08-2013 08:28 PM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to InfoAlisaA

04-08-2013 08:28 PM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to PGStats

04-08-2013 10:23 PM

Thanks for your help! I appreciate it!

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to InfoAlisaA

04-10-2013 08:20 PM

And you can interpret it as the number of events that occur during a given time period if you know that the AVERAGE rate of the event is m events per time period (m does not need to be an integer). So, for example, if you receive an average of 6.3 emails per hour, and you start keeping count, you might observe 5 emails during the first hour, 8 during the next hour, 5 during the next hour, and so forth. For a data-oriented tale of how the Poisson dstribution is used, see Fitting a Poisson distribution to data in SAS - The DO Loop