Exponential distribution
The waiting time between events that arrive at a steady average rate λ. Short waits are common, long ones are rare, and the chance of waiting longer than t falls off exponentially.
01The formula
- the waiting time until the next event
- the rate: average number of events per unit of time
- a waiting time you ask about
- the density of the waiting time
02See it move
03Where it is used
- Market makerModels the time until their quote is hit, which drives how long they hold inventory.
- Execution traderEstimates the chance a passive order is still unfilled after a given wait.
- Quant researcherSimulates order arrivals by drawing exponential gaps between them.
04Why traders use it
It is the time side of the Poisson: if counts per minute are Poisson with rate λ, the gaps between events are exponential with the same λ. It gives the odds that you are still waiting.
05Worked example
Fills arrive at 1.00 per minute. The chance of still waiting after 2.0 minutes is 13.5%. The average wait is 1.00 minutes, but half of all waits are shorter than 0.69.
06How it is built
- Waiting longer than means no events in .
- With Poisson arrivals that has probability .
- So the CDF is , and its derivative is the density .
- The mean is ; the median solves , so .
07The common mistake
Expecting a long wait to end soon. The exponential is memoryless: having waited two minutes, the chance of waiting another minute is the same as it was at the start.
08In Python and LaTeX
from scipy.stats import expon lam, t = 1.0, 2.0 X = expon(scale=1/lam) print(round(X.sf(t), 4), X.mean(), round(X.median(), 4))
f(x) = \lambda e^{-\lambda x}, \qquad P(X > t) = e^{-\lambda t}, \qquad E[X] = \frac{1}{\lambda}09Where it fits
Rather not code the maths yourself? Describe your trading idea and let AI build the bot.
Build a bot with AgenKitThe worked example and the model run the same code, so every number matches. Models simplify markets on purpose. This is education, not financial advice.