Suppose events occur in a Poisson process at rate λ and you want to know how long until the α-th event arrives. The waiting time for the first event is Exponential; the waiting time for the α-th event follows the Gamma distribution, a two-parameter family that generalises the Exponential to arbitrary numbers of events.
The gamma function
Before defining the distribution, recall the gamma functionΓ:(0,∞)→(0,∞):
Γ(α):=∫0∞tα−1e−tdt.
Two key properties make Γ the right normalising constant:
Recursion. Integration by parts gives Γ(α+1)=αΓ(α) for all α>0.
Integer values. Combined with Γ(1)=∫0∞e−tdt=1, the recursion yields
Γ(n)=(n−1)!for every positive integer n.
Half-integer. A celebrated result gives Γ(1/2)=π, so Γ extends the factorial to non-integer arguments.
Definition
Let α>0 be the shape parameter and λ>0 be the rate parameter. A random variable X follows a Gamma distribution, written X∼Gamma(α,λ), if its probability density function is
f(x):=Γ(α)λαxα−1e−λx,x>0.
When α=1 this reduces to f(x)=λe−λx, recovering Exp(λ). Large α shifts probability mass toward larger values, reflecting a longer wait for more events.
Verification that f is a valid PDF
Non-negativity is immediate. For the integral, substitute u:=λx (so x=u/λ, dx=du/λ):
The most concrete way to understand the Gamma distribution is through its relationship to the Exponential. For integerα=n:
Theorem. If X1,X2,…,Xn are independent with Xi∼Exp(λ), then
Sn:=X1+X2+⋯+Xn∼Gamma(n,λ).
Proof via moment generating functions. The MGF of Xi∼Exp(λ) is
MXi(t)=E[etXi]=λ−tλ,t<λ.
Since the Xi are independent, the MGF of their sum factors:
MSn(t)=i=1∏nMXi(t)=(λ−tλ)n.
One can verify that Gamma(n,λ) has the same MGF (by computing E[etX] via the substitution u=(λ−t)x), and since the MGF uniquely determines the distribution, Sn∼Gamma(n,λ). □
In the Poisson process interpretation: Sn is the time of the n-th arrival, and the theorem confirms it is Gamma(n,λ).
Mean
The mean of X∼Gamma(α,λ) can be read off from the recursion of Γ:
E[X]=∫0∞x⋅Γ(α)λαxα−1e−λxdx=Γ(α)λα∫0∞xαe−λxdx.
Substitute u=λx to obtain ∫0∞xαe−λxdx=Γ(α+1)/λα+1, so
For integer α=n this matches the intuition: the expected waiting time for n independent Exp(λ) events is n⋅(1/λ).
Variance
Similarly, compute E[X2] by the same substitution:
E[X2]=Γ(α)λα⋅λα+2Γ(α+2)=λ2α(α+1).
Therefore
Var(X)=E[X2]−(E[X])2=λ2α(α+1)−λ2α2=λ2α.
Additive property
A consequence of the MGF argument above is the additive property: if X1∼Gamma(α1,λ) and X2∼Gamma(α2,λ) are independent with the same rate, then
X1+X2∼Gamma(α1+α2,λ).
The shapes add while the rate is preserved. This is consistent with the sum-of-exponentials interpretation: pooling α1 and α2 i.i.d. Exp(λ) waiting times yields a Gamma(α1+α2,λ) waiting time. Note that the additive property fails if the two rates differ.
Summary
The gamma function Γ(α)=∫0∞tα−1e−tdt satisfies Γ(α+1)=αΓ(α) and Γ(n)=(n−1)! for positive integers n.
X∼Gamma(α,λ) has PDF f(x)=λαxα−1e−λx/Γ(α) for x>0, with shape α>0 and rate λ>0.
For integer α=n: a sum of n independent Exp(λ) variables is Gamma(n,λ).
Mean: E[X]=α/λ.
Variance: Var(X)=α/λ2.
Additive property: independent Gamma(α1,λ) and Gamma(α2,λ) sum to Gamma(α1+α2,λ).