Programming Poisson Distribution :: C++

Started by
1 comment, last by kuphryn 21 years, 5 months ago
Hi. I would like to design a function that will return a random number based on Poisson Distribution. Here is an example of a problem I want to solve using this function. Given: One car passes through an intersection every 5 minutes. Question: Determine the time of arrival of each car based on the time of the last car in 30 days. For example: Start: t = 0 ... car1: t += 4 -> (t would then equal 4 : t = 4) car2: t += 4.8 -> (t = 8.8) car3: t += 3.2 car4: t += 4.6 car5: t += 5.3 car6: t += 4.9 ... Given a start time of 0, I want this function to calculate the arrival time of every car from there on relative to the previous car. This is based on Poisson Distribution. Please post if you have any idea on this problem. Thanks, Kuphryn
Advertisement
Boost might have a Poisson distribution in its random number generator library.

Cédric
Okay. Thanks.

Kuphryn

This topic is closed to new replies.

Advertisement