SAS Optimization, and SAS Simulation Studio

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

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-25-2008 11:57 AM

I just got confused.

I thought a Poisson distribution was an exponential distribution that began at 0, rose sharply to a peak, and then had a very long tail .

I wanted to see the numbers produced by the RANPOI function, so I did a simple bit of code in EG

[pre]

data poisson;

do i=1 to 10000;

metric = ranpoi(0,50);

output;

end;

run;

quit;

[/pre]

and then simply plotted a bar chart of metric.

What I got looks a lot more like a normal distribution than what I thought I would get.

People, please set me straight on what is going on here, please.

I thought a Poisson distribution was an exponential distribution that began at 0, rose sharply to a peak, and then had a very long tail .

I wanted to see the numbers produced by the RANPOI function, so I did a simple bit of code in EG

[pre]

data poisson;

do i=1 to 10000;

metric = ranpoi(0,50);

output;

end;

run;

quit;

[/pre]

and then simply plotted a bar chart of metric.

What I got looks a lot more like a normal distribution than what I thought I would get.

People, please set me straight on what is going on here, please.

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

04-28-2008 12:44 PM

Chuck

The shape of the Poisson distribution changes with the value of the mean. With a relatively small value for the mean like a 1, the distribution has an exponential shape that you mentioned. But when the mean gets large it starts to approximate the binomial distribution. I forgot the details, my stats classes were many years ago, so this example below should shed some light on the matter.

data poisson;

do i=1 to 10000;

metric1 = ranpoi(0,1);

metric5 = ranpoi(0,5);

metric10 = ranpoi(0,10);

metric50 = ranpoi(0,50);

metric100=ranpoi(0,100);

output;

end;

run;

quit;

-Darryl

The shape of the Poisson distribution changes with the value of the mean. With a relatively small value for the mean like a 1, the distribution has an exponential shape that you mentioned. But when the mean gets large it starts to approximate the binomial distribution. I forgot the details, my stats classes were many years ago, so this example below should shed some light on the matter.

data poisson;

do i=1 to 10000;

metric1 = ranpoi(0,1);

metric5 = ranpoi(0,5);

metric10 = ranpoi(0,10);

metric50 = ranpoi(0,50);

metric100=ranpoi(0,100);

output;

end;

run;

quit;

-Darryl

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

05-05-2008 10:38 AM

I did some refresher research.

I see where I was making a mistake in my interpretation.

Now what I find to be aggrevating with the SAS's implementation of Poisson, is that it has no provision for lambda.

So, here is where I need help.

I want to model some aspects of human behavior. The variable is inter-arrival times. Most intervals between events is about 10ish seconds (9 to 12). Some intervals can be as long at 5 minutes (long right tail). This is for a single even/impulse stream. I want the intervals between impulses/events to be randomly generated per an appropriate distribution. I then want to vary the number of concurrent impulse streams.

How do I do this?

Shouldn't I be able to use a Poisson distribution? Or am I mis-interpreting something?

In the past, I just used real data and "replayed" it to do whatever analysis I needed to do. This time, I don't have that ability/luxury, and I need to actually synthetically and arbitrarily create the impulse/event streams.

I see where I was making a mistake in my interpretation.

Now what I find to be aggrevating with the SAS's implementation of Poisson, is that it has no provision for lambda.

So, here is where I need help.

I want to model some aspects of human behavior. The variable is inter-arrival times. Most intervals between events is about 10ish seconds (9 to 12). Some intervals can be as long at 5 minutes (long right tail). This is for a single even/impulse stream. I want the intervals between impulses/events to be randomly generated per an appropriate distribution. I then want to vary the number of concurrent impulse streams.

How do I do this?

Shouldn't I be able to use a Poisson distribution? Or am I mis-interpreting something?

In the past, I just used real data and "replayed" it to do whatever analysis I needed to do. This time, I don't have that ability/luxury, and I need to actually synthetically and arbitrarily create the impulse/event streams.

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

05-05-2008 01:18 PM

I think you are mis-interpreting the use of a Poisson distribution, but I'm no expert and I haven't done any time-domain analysis in while. So take what I say with a grain of salt.

The SAS ranpoi function has two paramters ranpoi(seed, m) where seed is some arbitray seed value and m is the mean # of events. With the Possion distribution, lambda is the mean # of events, so m=lambda for the SAS function.

Notice that the results of using ranpoi is an integer, i.e. # of events. This is a crucial distinction when interpreting the Poission distribtion. It measures the # of events within a fix time period, not the time between events. So I don't think the Possion distribution will not work for you. Unless of course you reframe your question to the # of events/impulses per second or minute.

Now for the rub, what you discribe is a Possion process but you should be using an exponential distribution for your analysis/simulation. Not all Possion processes can be modeled with a Possion distribution.

Check out either of these links on wikipedia

http://en.wikipedia.org/wiki/Exponential_distribution

The Erland distribution may work for you too. The Erlang can approximate gamma and SAS has a rangam function. http://en.wikipedia.org/wiki/Erlang_distribution

http://en.wikipedia.org/wiki/Poisson_process

I hope this will point you in the right directions.

Regards

-Darryl

The SAS ranpoi function has two paramters ranpoi(seed, m) where seed is some arbitray seed value and m is the mean # of events. With the Possion distribution, lambda is the mean # of events, so m=lambda for the SAS function.

Notice that the results of using ranpoi is an integer, i.e. # of events. This is a crucial distinction when interpreting the Poission distribtion. It measures the # of events within a fix time period, not the time between events. So I don't think the Possion distribution will not work for you. Unless of course you reframe your question to the # of events/impulses per second or minute.

Now for the rub, what you discribe is a Possion process but you should be using an exponential distribution for your analysis/simulation. Not all Possion processes can be modeled with a Possion distribution.

Check out either of these links on wikipedia

http://en.wikipedia.org/wiki/Exponential_distribution

The Erland distribution may work for you too. The Erlang can approximate gamma and SAS has a rangam function. http://en.wikipedia.org/wiki/Erlang_distribution

http://en.wikipedia.org/wiki/Poisson_process

I hope this will point you in the right directions.

Regards

-Darryl

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

05-05-2008 01:30 PM

Thanks,

Yes, I guess I am confusing a Poisson process with a Poisson distribution. Silly me too human sometimes, we have a propensity for making generalizations, don't ya know.

On google right now.

Ahhh ! bingo! Erlang, that's what I was wanting.

Thanks again.

Wish I could remember everything I ever learned, but then, at nearly 50 and ... that would be too much anyway.

Yes, I guess I am confusing a Poisson process with a Poisson distribution. Silly me too human sometimes, we have a propensity for making generalizations, don't ya know.

On google right now.

Ahhh ! bingo! Erlang, that's what I was wanting.

Thanks again.

Wish I could remember everything I ever learned, but then, at nearly 50 and ... that would be too much anyway.