Week 08 · Poisson arrivals and interarrival times

Test whether a single constant arrival rate hides a peak.

← Week 7 · Subject contents · Week 9 →

Test whether a single constant arrival rate hides a peak.

Work through the problem

For a homogeneous Poisson process with rate λ arrivals per hour, counts in disjoint hours are independent Poisson(λ). Waiting time until the next arrival is exponential because P(T>t) = P(N(t)=0) = e⁻λᵗ.

At λ = 4, the mean interarrival time is 0.25 hours. If morning and evening rates are 2 and 8 respectively, pooling equal exposure gives an overall rate of 5. The combined count distribution has additional variation from the differences in rates. At a particular time, use the appropriate conditional rate.

Run the Python lab

import numpy as np
rng = np.random.default_rng(29)
waits = rng.exponential(1/4, 10000)
a, b = rng.poisson(2,10000), rng.poisson(8,10000)
counts = np.r_[a,b]
print("Mean gap:", round(waits.mean(), 3))
print("Pooled mean and variance:", round(counts.mean(),2), round(counts.var(),2))
assert abs(waits.mean()-.25) < .01 and counts.var()>10

Output from the lab

Mean gap: 0.245
Pooled mean and variance: 4.98 13.86

Practice

  1. What theoretical pooled variance do these equally likely hours produce?

Check your reasoning

  1. E[λ] + Var(λ) = 5 + 9 = 14 by the law of total variance.

← Week 7 · Subject contents · Week 9 →

Further reading · MIT 6.262 · Discrete Stochastic Processes