#### Archived

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

# Programming Poisson Distribution :: C++

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

## Recommended Posts

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

##### Share on other sites
Boost might have a Poisson distribution in its random number generator library.

Cédric

Okay. Thanks.

Kuphryn

1. 1
2. 2
Rutin
23
3. 3
4. 4
JoeJ
18
5. 5

• 14
• 23
• 11
• 11
• 9
• ### Forum Statistics

• Total Topics
631766
• Total Posts
3002233
×