Skip to content

Gamma Distribution

Definition

For shape r>0r>0 and rate λ>0\lambda>0, X∼Gamma⁡(r,λ)X\sim\operatorname{Gamma}(r,\lambda) has density

fX(x)={λrΓ(r)xr−1e−λx,x>0,0,x≤0.f_X(x)=\begin{cases}\dfrac{\lambda^r}{\Gamma(r)}x^{r-1}\mathrm{e}^{-\lambda x},&x>0,\\0,&x\le0.\end{cases}

The Gamma Function in the denominator normalizes the density: substituting z=λxz=\lambda x makes the unnormalized integral equal to Γ(r)\Gamma(r), which cancels the denominator.


Interpretation

The gamma family extends exponential waiting times. For a positive integer shape rr, Gamma⁡(r,λ)\operatorname{Gamma}(r,\lambda) is the distribution of a sum of rr independent Exp⁡(λ)\operatorname{Exp}(\lambda) waits, for example the time until the rr-th arrival in a Poisson process with rate λ\lambda.

Gamma densities with rate 1 and shape r = 1, 2 and 3: the exponential density for r = 1, and humps that move right as r grows, with means 2 and 3.

The figure shows three densities with rate λ=1\lambda=1. For r=1r=1 the density on x>0x>0 is the exponential one, e−x\mathrm{e}^{-x}, with right-hand limit 11 as x↓0x\downarrow0. The displayed version sets fX(0)=0f_X(0)=0, so its supremum 11 is approached rather than attained; changing a density at a single point does not change the distribution. For r=2r=2 and r=3r=3 the factor xr−1x^{r-1} pushes the density down to 00 at the origin, giving a hump with its peak at x=r−1x=r-1. The means r/λ=2r/\lambda=2 and 33 move to the right, and the spread grows with the variance r/λ2r/\lambda^2.

The shape rr sets the form of the density through the power xr−1x^{r-1}, and the rate λ\lambda only sets the scale: if X∼Gamma⁡(r,1)X\sim\operatorname{Gamma}(r,1), then X/λ∼Gamma⁡(r,λ)X/\lambda\sim\operatorname{Gamma}(r,\lambda). Non-integer shapes are allowed because the gamma function normalizes the density for every r>0r>0; they no longer count exponential waits, but the formulas for mean, variance and MGF stay the same.

The MGF (λ/(λ−t))r(\lambda/(\lambda-t))^r is the rr-th power of the exponential MGF, so the MGF of an independent sum and MGF uniqueness prove the sum property. The same argument shows that independent Gamma⁡(r,λ)\operatorname{Gamma}(r,\lambda) and Gamma⁡(s,λ)\operatorname{Gamma}(s,\lambda) variables add to Gamma⁡(r+s,λ)\operatorname{Gamma}(r+s,\lambda), provided the rates agree. Some texts use a scale parameter θ=1/λ\theta=1/\lambda instead, with mean rθr\theta; check the convention before using a formula.


Key Results

  • In shape-rate notation, EX=r/λ\mathbb{E}X=r/\lambda and Var⁡(X)=r/λ2\operatorname{Var}(X)=r/\lambda^2.
  • MX(t)=(λ/(λ−t))rM_X(t)=(\lambda/(\lambda-t))^r for t<λt<\lambda; shape r=1r=1 gives the exponential law.

Examples

  • For shape r=2r=2 and rate λ=1\lambda=1, the density is xe−xx\mathrm{e}^{-x} on x>0x>0, the mean is 22, and the variance is 22.
  • The sum of three independent Exp⁡(2)\operatorname{Exp}(2) waits has Gamma⁡(3,2)\operatorname{Gamma}(3,2) distribution, with mean 3/23/2 and variance 3/43/4.

Prerequisites

Sources

Keywords: Erlang distribution Symbols: gamma, lambda, theta

Last updated: 27 October 2026 11:52