Optiver·Data Scientist·Technical Phone Screen
- Buses on a route are scheduled every x minutes. Each bus independently arrives on time with probability 1/2, or exactly x/2 minutes late with probability 1/2. You arrive at the stop at a uniformly random time. What is your expected waiting time in terms of x?
- How does your answer change if each bus's delay is uniform on [0, x/2] instead of the binary on-time or x/2-late setup?
- Generalize: if a bus is late by d minutes with probability p and on time otherwise (with d < x), what is the expected wait as a function of x, p, and d?
- Using your gap-based formula, explain intuitively why irregular headways always increase a random rider's expected wait, even when the mean headway stays the same.
- How would the expected wait change if buses arrived as a Poisson process with mean headway x instead of the scheduled setup?
“I went straight for the naive E[G]/2 and felt pretty good about it for a moment.”