# How to determine the average waiting time of an event when encountering the system at some time > 0?

In this textbook, page 82, problems 9-11, the author gives the following distribution for the time between a sequence of occurrences:

a) Exponentially distributed with $$\lambda = 1/10$$, so one occurrence every 10 minutes

b) Uniformly distributed in [5, 15] minutes

c) 3 minutes with a probability of 0.9 and 73 minutes with a probability of 0.1

The author asks that if someone encounters this system at time 100 minutes, what is the average waiting time before the next occurrence for each of these distributions.

I wrote a simulation (not sure if the result is correct) that gave me the following for the average time:

a) ~ 10min

b) ~ 5.5min

c) ~ 23min

Is the above correct? If so, what's the intuitive explanation for each result?

• “So one occurrence every 10 minutes”—this would be deterministic. The author correctly writes that it is one occurrence every 10 minutes on average. I know this doesn’t answer the question and is slightly pedantic but I think it’s important to be precise about these things in probability theory. Also for case a) this is known as the waiting time paradox. – Nap D. Lover Apr 4 at 19:00
• The paradox is (a) is that the answer to the following question is 20 rather than 10: If you arrive at a (uniformly distributed) random moment of time $t$, what is the expected length (between consecutive events) of the interval containing $t$? Whereas if you pick a (uniformly distributed) random interval between consecutive events, it's expected length is 10. – Ned Apr 4 at 20:02

For (a), the exponential distribution is memoryless. This means if $$X \sim \text{Exp}(\lambda)$$, then $$P(X > s+t \mid X>t) = P(X>s)$$. That is, given that I have waited for $$t$$ time and the event has not occurred yet, the remaining time I have to wait for the event to occur is the same (in distribution) as the time I had to wait from the start. At time $$t=100$$, an external observer has waited some amount of time since the last occurrence. Because of the memorylessness property, the time until the next occurrence after time $$t=100$$ is equal in distribution to an exponential random variable with $$\lambda = 1/10$$. Hence the expected waiting time is $$10$$ minutes.
For (c), imagine the randomness is actually deterministic, so $$9$$ out of every $$10$$ occurrences happen after $$3$$ minutes, and the tenth happens after $$73$$ minutes. Then in a $$100$$-minute interval, $$27$$ minutes are spent waiting for an event that occurs $$3$$ minutes after the previous one, and $$73$$ minutes are spent waiting for the event that occurs $$73$$ minutes after the previous one. If you arrive at a uniform random time in that $$100$$-minute interval, you have a $$27\%$$ chance to be waiting for a "$$3$$-minute event" and a $$73\%$$ chance to be waiting for a "$$73$$-minute event". You would expect the "$$3$$-minute events" to happen on average $$1.5$$ minutes after you arrive, and the "$$73$$-minute event" to happen on average $$36.5$$ minutes after you arrive. So your expected wait time is: $$27\% \cdot 1.5 + 73\%\cdot 36.5 \approx 27 \text{ minutes}.$$ Why does the simulation give something less than $$73$$? Well for one, arriving at time $$t=100$$ is pretty soon. In the extreme, if we ask for the expected waiting time for the first event after time $$t=0$$, we would just get the expected value $$0.9 \cdot 3 + 0.1\cdot 73 = 10$$. This brings down the expected wait time if we arrive some time close to $$t=0$$. If you run your simulation again arriving at time $$t=1000$$ or $$t=10000$$ you'll notice the expected wait time gets closer to $$27$$.
For (b), "discretize" the wait times (so have the wait time uniformly distributed on $$\{5,6,\dots,15\}$$) and use an argument similar to the above. Wait $$5$$ minutes for the first occurrence, $$6$$ for the next, and so on. Then for every $$110(=5+6+\cdots+15)$$ minute interval, you spend $$5/110$$ of the time waiting for the "$$5$$-minute event", $$6/110$$ of the time waiting for the "$$6$$-minute event", and so on. By the same heuristic, the expected wait time is: $$\frac{5}{110}\cdot \frac{5}{2}+\frac{6}{110}\cdot \frac{6}{2}+\cdots +\frac{15}{110}\cdot \frac{15}{2}=\frac{11}{2}=5.5 \text{ minutes}.$$ Note that we used a heuristic here, so this does not say that the waiting time is exactly $$5.5$$ minutes in expectation. The heuristic gives a better estimate here than in case (c) because $$100$$ minutes is relatively large compared to the maximum waiting time ($$15$$ minutes).