BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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.
4 REPLIES 4
darrylovia
Quartz | Level 8
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
deleted_user
Not applicable
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.
darrylovia
Quartz | Level 8
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
deleted_user
Not applicable
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.

sas-innovate-2024.png

 

Time is running out to save with the early bird rate. Register by Friday, March 1 for just $695 - $100 off the standard rate.

 

Check out the agenda and get ready for a jam-packed event featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events. 

 

Register now!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 947 views
  • 0 likes
  • 2 in conversation