Suppose that red and blue trains arrive on time according to schedule, with the red schedule beginning Δ minutes after the blue schedule, for some 0≤Δ<10. For definiteness suppose the first blue train arrives at time t=0.
Assume for now that Δ lies between 0 and 5 minutes. Between t=0 and t=30 minutes we'll see the following trains and interarrival times: blue train, Δ, red train, 10, red train, 5−Δ, blue train, Δ+5, red train, 10−Δ, blue train. Then the schedule repeats, starting with that last blue train.
If WΔ(t) denotes the waiting time for a passenger arriving at the station at time t, then the plot of WΔ(t) versus t is piecewise linear, with each line segment decaying to zero with slope −1. So the average wait time is the area from 0 to 30 of an array of triangles, divided by 30. This gives
W¯Δ:=130(12[Δ2+102+(5−Δ)2+(Δ+5)2+(10−Δ)2])=130(2Δ2−10Δ+125).
Notice that in the above development there is a red train arriving
Δ+5 minutes after a blue train. Since the schedule repeats every 30 minutes, conclude
W¯Δ=W¯Δ+5, and it suffices to consider
0≤Δ<5.
If Δ is not constant, but instead a uniformly distributed random variable, we obtain an average average waiting time of
15∫5Δ=0130(2Δ2−10Δ+125)dΔ=359.