Archived

This topic is now archived and is closed to further replies.

Poisson Distribution and Instance :: Math

This topic is 5513 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi. How do you determine an instance of a Poisson Distribution? Given: A car passes through a deserted intersection on average every five minutes. average = 5 minutes Question: What is an estimate (instance) of the number of cars that passed through this intersection in a period of four week? I understand how to do the time conversion, but I do not understand how to get the Poisson instance when given the condition such as the one above. Thanks, Kuphryn

Share this post


Link to post
Share on other sites
Okay. Thanks.

Can you explain your solution?

What function is instance_of_uniform_distribution()? Is that from C/C++ library? How about poisson_probability()?

Lastly, what does function poisson() return? If possible, please give an example with input data.

Kuphryn

Share this post


Link to post
Share on other sites
instance_of_uniform_distribution() and poisson_probability() are placeholders. You should provide those functions. Something like

  
double instance_of_uniform_distribution(){
return (double)rand()/RAND_MAX;
}

double poisson_probability(double lambda, int value){
double v = exp(-lambda)*pow(lambda,value);
for(;value>1;--value)
v/=value;
return v;
}
[source]

Share this post


Link to post
Share on other sites
Nice!!!

Given: average = 5 minutes.
Time: t = 0

I assume poisson will return the time based on previous time.

t0 = 0
t1 = poisson(t0)
t2 = t1 + poisson(t1)
...

Correct? In other words, lamba is based on t-1.

Kuphryn

Share this post


Link to post
Share on other sites
Err... No.

The Poisson distribution gives you the number of cars in a given period of time. For instance, if a car passes on average every five minutes and you want to generate an instance of how many cars passed in four weeks, you should call poisson(4weeks/5minutes).

If you want to generate an instance of how long you have to wait for the next car to pass, you should use the exponential distribution.

Share this post


Link to post
Share on other sites