I have a question about the waiting time paradox for poisson processes(in this case in terms of bus arrivals).
Suppose I know that buses arrive with poisson distribution(lambda). I arrive at fixed time t.
I want to figure out three things -
- The mean length of time I will wait until the next bus.
- The mean length of time since the last bus.
- Mean length of time between bus arrivals.
I think 1 should be 1/lambda - the poisson process is memoryless, so it shouldn't matter when I arrrive.
I think 3 should also be 1/lambda, because that is the mean of the exponential distribution, which determines the distribution of times between buses.
I'm not sure about 2.
Can anyone help/tell me if my reasoning is wrong/right?
This type of problem is always tricky, as the discussion here has already shown.
As an alternative to clever thinking we can solve the problem of items 1. and 2. by just observing what happens to the passenger and the busses. Instead of doing this in the real world (thus possibly catching a cold or standing in the pouring rain) we make a simulation. The result is, of course, $1/\lambda$ for items 1. and 2. For item 3. the same result follows simply from the definition of the Possion process.
We assume the passenger to arrive at some fixes instant of time $t_p = 20$. For each trial we generate an array of a sufficiently large number of bus arrival times ($n = 50$) based on a Poisson process with $\lambda = 1$. Then we pick the bus arrival times $t_1$ and $t_2$ just before and just after $t_p$ respectively, calculate the time differences $dt_1 = t_p - t_1$ and $dt_2 = t_2 - t_p$ and study their statistics.
The time difference $\tau$ of two neighbouring events of a Poisson process is distributed according to an exponential law
$$f(\tau,\lambda) = \lambda \;exp (-\lambda \tau)$$
A random variable $r$ following this distribution is generated from a basic random number $R$ equally distributed between $0$ and $1$ is defined by
$$r=\log \left(\frac{1}{R}\right)$$
The array of bus arrival times $t_k$ is then generated by cumulating the differences $r_i$, i.e.
$$t_k=\sum _{i=1}^k r_i$$
We have done 1000 trials. The results are presented here as histograms of the $dt_1$ and $dt_2$ compared to the exponential law.
The agreement with the exponential law is reasonable. The central moments are for $dt_1$ and $dt_2$ resp.
means = {1.04494,0.966218}
standard deviations = {1.06179,0.949569}
We can also have a look on the results of all 1000 trials
Appendix: the Mathematica code
Scenario $t_1$ < $t_p$ < $t_2$
$t_1$ arrival time of bus just missed
$t_p$ arrival time of passenger
$t_2$ arrival time of bus to be taken by passenger
$dt_1 = t_p - t_1$ length of time by which the previous bus was missed
$dt_2 = t_2 - t_p$ length of time the passenger has to wait for the bus to be taken
The code
The values are close to unity as it should be for $\lambda = 1$