Mathwords logoMathwords

Gamma Distribution — Definition, Formula & Examples

The gamma distribution is a continuous probability distribution that models the time you must wait for a certain number of events to occur in a Poisson process. It is defined by two parameters — shape (α\alpha) and rate (β\beta) — and produces only positive values, making it useful for modeling waiting times, lifespans, and other non-negative quantities.

A continuous random variable XX follows a gamma distribution with shape parameter α>0\alpha > 0 and rate parameter β>0\beta > 0, written XGamma(α,β)X \sim \text{Gamma}(\alpha, \beta), if its probability density function is f(x)=βαΓ(α)xα1eβxf(x) = \frac{\beta^\alpha}{\Gamma(\alpha)} x^{\alpha - 1} e^{-\beta x} for x>0x > 0, where Γ(α)\Gamma(\alpha) is the gamma function. Its mean is α/β\alpha / \beta and its variance is α/β2\alpha / \beta^2.

Key Formula

f(x)=βαΓ(α)xα1eβx,x>0f(x) = \frac{\beta^{\alpha}}{\Gamma(\alpha)}\, x^{\alpha - 1}\, e^{-\beta x}, \quad x > 0
Where:
  • α\alpha = Shape parameter (number of events), must be positive
  • β\beta = Rate parameter (events per unit time), must be positive
  • Γ(α)\Gamma(\alpha) = Gamma function; if α is a positive integer, Γ(α) = (α − 1)!
  • xx = Value of the random variable (must be positive)

How It Works

The shape parameter α\alpha controls the form of the distribution: when α=1\alpha = 1, the gamma reduces to an exponential distribution; as α\alpha increases, the distribution becomes more symmetric and bell-shaped. The rate parameter β\beta controls how quickly the density decays. To find probabilities, you integrate the PDF over the desired interval, which typically requires software or gamma distribution tables. The gamma distribution generalizes naturally from the exponential: if each event's waiting time is Exp(β)\text{Exp}(\beta), then the total wait for α\alpha events is Gamma(α,β)\text{Gamma}(\alpha, \beta).

Worked Example

Problem: A call center receives calls at a rate of 2 per minute (Poisson process). Find the mean and variance of the waiting time until the 5th call arrives.
Identify parameters: We are waiting for α = 5 events with a rate of β = 2 per minute, so the waiting time follows Gamma(5, 2).
XGamma(α=5,  β=2)X \sim \text{Gamma}(\alpha = 5,\; \beta = 2)
Compute the mean: The mean of a gamma distribution is α / β.
E[X]=52=2.5 minutesE[X] = \frac{5}{2} = 2.5 \text{ minutes}
Compute the variance: The variance is α / β².
Var(X)=522=54=1.25 minutes2\text{Var}(X) = \frac{5}{2^2} = \frac{5}{4} = 1.25 \text{ minutes}^2
Answer: The expected waiting time until the 5th call is 2.5 minutes, with a variance of 1.25 minutes².

Why It Matters

The gamma distribution appears throughout reliability engineering, queueing theory, and Bayesian statistics (where it serves as the conjugate prior for the Poisson rate parameter). If you take a course in mathematical statistics or stochastic processes, you will use it repeatedly to model waiting times and aggregate event counts.

Common Mistakes

Mistake: Confusing the rate parameterization (β as rate) with the scale parameterization (θ = 1/β as scale).
Correction: Always check which parameterization your textbook or software uses. With rate β, the mean is α/β; with scale θ, the mean is αθ. Mixing them up inverts your answers.