What does the exponential distribution model?
The exponential distribution models the waiting time until the next event when events arrive randomly at a constant rate. It is memoryless: the time already waited does not change the remaining wait.
Explain it simply
If calls arrive at random, the gap between two calls follows an exponential distribution. Short gaps are common, long gaps are rare, so the curve starts high and decays.
Memoryless means that if you have already waited 10 minutes for an auto-rickshaw, the chance it shows up in the next 5 minutes is the same as when you started waiting. The process has no memory of how long it has been.
For a mean wait of m, the chance of waiting less than t is 1 - e^(-t/m).
Example
A cab arrives on average every 10 minutes. The probability you wait less than 5 minutes:
P = 1 - e^(-5/10) = 1 - 0.6065 = 0.3935
from scipy.stats import expon
print(round(expon.cdf(5, scale=10), 4)) # 0.3935Here scale is the mean wait (10 minutes). The rate is 1/10 per minute.
What to say in the interview
"Exponential models time between independent events at a constant rate, such as the gap between requests to a server or the lifetime of a component with no wear-out. It is the continuous partner of Poisson: counts per window are Poisson, waiting times between events are exponential. It is memoryless, which is unrealistic for things that age, like machines."
Common mistakes
- Mixing up scale (mean) and rate in code. SciPy's
scaleis 1 divided by the rate.