The Gamma Distribution
The waiting-time distribution for "the k-th event" — a flexible, always-positive shape that generalizes the exponential distribution and underlies option-pricing tools like the chi-squared and the CIR interest-rate model.
Prerequisites: Expectation, Variance & Moments
Trade fills on a thin order book don't arrive on a fixed schedule — they arrive at random, one at a time. The exponential distribution models the wait for a single fill. But what if you care about the wait for the fifth fill, or you want a flexible, always-positive shape for a quantity like realized variance that can't be normal (since variance can't go negative)? Both needs point to the same distribution: the gamma.
The analogy: waiting for the k-th bus
If buses arrive at random, independent intervals (a Poisson process) with an average wait of between each, the exponential distribution tells you how long until the next bus. The gamma distribution tells you how long until the -th bus arrives — the sum of independent exponential waits stacked end to end. As grows, that sum smooths out (by a CLT-like effect) from a sharply skewed shape into something closer to a bell curve, but for small it stays distinctly right-skewed — exactly the shape you'd expect for "total time until several things have happened."
Writing it down
The gamma distribution with shape (or ) and rate (or scale ) has density
where is the gamma function, a continuous generalization of factorial ( for integer ). In words: the density rises like (governed by shape) and decays like (governed by rate), with just a normalizing constant so the total probability integrates to 1. Mean is , variance is . Two special cases matter: recovers the exponential distribution exactly, and setting , recovers the chi-squared distribution with degrees of freedom.
The rising-then-falling shape here mirrors gamma's density for small shape : a fast rise from zero (no mass exactly at zero once ), a peak, then an exponential-style decay — try different exponents mentally as different values of and watch the peak shift right and the tail thin as grows.
Worked example 1: waiting for the fifth trade
A stock's trades on a thin book arrive as a Poisson process averaging per minute. The time until the 5th trade is , with mean minutes and variance minutes², so a standard deviation of about minutes. A trader waiting for enough liquidity to accumulate (5 trades' worth) should plan around 2.5 minutes, but be prepared for real waits ranging roughly 1.4 to 3.6 minutes (mean ± 1 sd) fairly often, since the distribution is still visibly right-skewed at .
Worked example 2: modeling realized variance
Daily realized variance estimates from intraday returns are strictly positive and right-skewed — never normal. Suppose historical data fits a to daily variance (in return² units), giving mean (matching an average daily vol near , unrealistically high here for illustration — treat as stylized). What's the probability realized variance exceeds double its mean, i.e. ? Using the gamma CDF (from tables or software) for at : — about a 9% chance on any given day, a number a normal-based model applied to variance (which would nonsensically allow negative variance) simply cannot produce honestly.
This is the discrete cousin of the story: a Poisson count with rate counts how many events land in a fixed window, while the gamma distribution with the same rate measures the waiting time until a fixed number of events land — two sides of the same arrival process, one counting, one timing.
What this means in practice
- Modeling any strictly-positive, skewed quantity. Trade durations, time-to-fill, drawdown recovery times, realized variance — anywhere a normal distribution's negative tail is nonsensical, gamma is a natural default.
- Bayesian priors. The gamma distribution is the conjugate prior for the rate of a Poisson process (like arrival rate of trades or defaults), making posterior updates closed-form and fast.
- Interest rate models. The Cox-Ingersoll-Ross (CIR) short-rate model's stationary distribution is a gamma distribution, which is exactly why CIR rates stay positive while mean-reverting.
The gamma distribution is the waiting time for the -th event in a Poisson process — a sum of independent exponentials — giving a flexible, always-positive, right-skewed shape controlled by a shape parameter and a rate , with the exponential and chi-squared distributions as special cases.
Shape and rate parameterizations are easy to mix up across software packages — some parameterize by rate (mean ), others by scale (mean ). Silently plugging a rate into a function expecting a scale (or vice versa) changes the mean by a factor that can be enormous, and the resulting fit will look plausible enough not to raise obvious alarms — always check your library's convention before trusting a fitted gamma parameter.
Related concepts
Practice in interviews
Further reading
- Casella, Berger, Statistical Inference (ch. 3)
- Ross, Introduction to Probability Models (ch. 5)