Choose random inputsLesson 10 of 76 · 7 min

Wait for the next event

Translate an event rate into the exponential waiting-time scale.

An exponential waiting time is nonnegative and right-skewed. For a homogeneous Poisson process of rate lambda, the waiting time to the next event has mean one divided by lambda.

NumPy’s exponential generator takes that mean scale. Passing the rate directly would invert the intended behaviour: increasing a rate should shorten waits. Use compatible time units when taking the reciprocal.

The model is memoryless: conditional on having already waited, the remaining wait has the same distribution. This can be useful for simple arrival or failure models, but is unsuitable when ageing or scheduling changes the event hazard. The empirical conditional comparison below illustrates, rather than proves, that property. Hazard means the event rate conditional on still waiting; it stays constant in this exponential model.

T is waiting time, λ\lambda is the event rate per time unit and E[T] is the model's mean wait.

Rate and waiting scale are reciprocals
00.511.5200.290.570.861.1P(wait > time)Wait (hours)
00.511.5200.290.570.861.1P(wait > time)Wait (hours)
E[T]=1/λE[T]=1/\lambda
Reference illustration. Exact survival curve for the authored exponential rate of 3 per hour. Its mean wait is 1/3 hour; the curve is an interval-tail probability, not probability at one exact time.

Should increasing the arrival rate make the average wait longer or shorter?

Write a prediction (optional)

Seeded teaching simulation

Select Run Python below with the code unchanged.

Tools
About Python ↗

The code is editable. Press Ctrl+Enter or ⌘+Enter to run Python from the editor.

Published example output

This result comes from the original Python. Your runs appear above. Build environment ↗

Mean wait (hours): 0.3351
Mean remaining wait after 0.5 hours: 0.3297
Model mean wait: 0.3333333333333333

Read the first result

The two empirical means need not be identical. The conditional subset is smaller and has more sampling error.

Try an edit

Predict the model mean wait at twice the rate. Replace rate_per_hour = 3 with rate_per_hour = 6. Select Run Python again. Compare Model mean wait, Mean wait (hours) and Mean remaining wait after 0.5 hours. Why is the last simulated mean less stable when fewer waits survive the cutoff?

Back to the Python editor

Scope. The example assumes a constant rate and independent increments; ageing and schedules need other models.

Try a fresh case

A scheduled bus is known to arrive every ten minutes. Is an exponential model automatically appropriate?

Choose an answer
Need a hint?
Hint 1

Consider whether already waiting tells you anything about the remaining wait.

Hint 2

Compare scheduled events with a constant random hazard.

Your notes