## Bayesian Modelling (Car Arrival Problem)

• 900

I was sent this question from a reader:

I have a road intersection with one entrance and two exits, A and B. My goal is to estimate the number of cars that pass through this intersection in a given day, which equals to the number of cars that pass through the entrance. I post two people, one at exit A and the other at exit B, to count the number of cars coming out of their exits. They are both not very good so they only capture C percent of the cars that actually pass through their respective exits. I do not know what C is. To make matters worse, the person at exit B lost his record so I only have the numbers from A.

From historical data, I know on average p% of ppl go through A and (1-p)% people go through B, but on this given day, I have no information. In this example I only have two exits, but in general I may have more (e.g. 3-5).

Is is possible to estimate the distribution for "# cars thru entrance" with the data I have? If so, what distributions would you assign to each random variable?

Let's solve it using a Bayesian model!

Learn:

• How to setup a Bayesian model from scratch.
• Building blocks of PyMC 2.2.
• How to interpret the output of Bayesian inference.

We Also Recommend