The exponential distribution
Waiting times, memorylessness and the link to the Poisson.
Waiting times
The Poisson counts events in an interval; the exponential distribution measures the time between them. When events arrive independently at a steady rate \(\lambda\), the wait \(T\) until the next one is exponential:
The density is highest at 0 and falls away: short waits are the most common, and a few waits are very long. The distribution is skewed to the right, so its median, \(\tfrac{\ln 2}{\lambda}\), is below its mean.
Time between arrivals
Customers arrive at a café at 12 an hour, which is \(\lambda = 0.2\) a minute, so the average gap is \(\tfrac{1}{0.2} = 5\) minutes. The chance that the next customer arrives within 2 minutes is \(1 - e^{-0.4} = 0.3297\). The chance that the barista waits more than 10 minutes is \(e^{-2} = 0.1353\). Half of all gaps are shorter than \(\tfrac{\ln 2}{0.2} = 3.4657\) minutes, well under the mean of 5, and one gap in ten is longer than \(F^{-1}(0.9) = 11.5129\) minutes.
The link to the Poisson
Waiting more than \(t\) for the next event is the same as seeing no event in an interval of length \(t\). The number of events in that interval is \(\text{Poisson}(\lambda t)\), whose chance of 0 is \(e^{-\lambda t}\):
For the café, no customer in 10 minutes is a Poisson count with \(\lambda t = 2\) equal to 0, with probability poisson.pmf(0, 2) = 0.1353, exactly the exponential's \(P(T > 10)\). The two distributions describe one process: the Poisson counts the arrivals and the exponential times the gaps.
Memorylessness
An electronic component fails at random, with no wear, at an average rate of once in 2,000 hours: its lifetime is exponential with \(\lambda = \tfrac{1}{2000}\). The chance that it lasts more than 1,000 hours is \(e^{-0.5} = 0.6065\). Now suppose it has already run for 3,000 hours. The chance that it lasts another 1,000 is
the same as for a new one. The exponential has no memory: \(P(T > s + t \mid T > s) = P(T > t)\). The time already waited tells you nothing about the time still to wait. It also means that more than half of the components fail before the average lifetime: \(P(T \le 2000) = 1 - e^{-1} = 0.6321\).
Checking it against data
A model is only as good as its fit. The lab's 2,000 bug-fix times average 2.9655 hours, and an exponential with that mean says a fix takes more than 5 hours with probability \(e^{-5/2.9655} = 0.1852\), and less than 1 hour with probability 0.2862. The data have neither: every fix took between 1 and 5 hours, because they are uniform. The histogram shows it at once.
When the exponential is the wrong tool
- Wear-out. Tyres, bearings and batteries are more likely to fail the older they get. A lifetime with memory needs another model, such as the Weibull.
- A rate that changes. Arrivals at a café in the lunch rush and in mid-afternoon have different rates, so their gaps are not one exponential.
- A minimum time. A bug fix never takes under an hour and a delivery never under ten minutes; the exponential's likeliest wait is 0.
- Scheduled events. A bus every 10 minutes gives gaps of 10 minutes, not exponential ones.
In code
| What it computes | Python (scipy.stats) | Excel |
|---|---|---|
| The next customer within 2 minutes | expon.cdf(2, scale=5) |
=EXPON.DIST(2, 0.2, TRUE) |
| A wait of more than 10 minutes | expon.sf(10, scale=5) |
=1-EXPON.DIST(10, 0.2, TRUE) |
| The median gap | expon.median(scale=5) |
=LN(2)/0.2 |
| No customer in 10 minutes | poisson.pmf(0, 2) |
=POISSON.DIST(0, 2, FALSE) |
| A component lasting 1,000 hours | expon.sf(1000, scale=2000) |
=EXP(-1000/2000) |
scipy's expon takes the mean, scale = 1/λ; Excel's EXPON.DIST takes the rate λ. Mixing them up is the commonest mistake with the exponential.
Quiz
Three questions on the chapter. Your best score is kept in this browser.