The gamma distribution
The gamma distribution models positive, right-skewed quantities: waiting times until several events occur, rainfall amounts, insurance claims, service times and the life of systems with spare parts. It has two parameters:
- the shape k (also written α);
- the scale θ, or equivalently the rate β = 1 ÷ θ.
Key formulas
Density: f(x) = x^(k−1) e^(−x/θ) ÷ (Γ(k) θ^k)
Mean = kθ, variance = kθ², mode = (k − 1)θ for k ≥ 1
The cumulative probability P(X ≤ x) is the regularized lower incomplete gamma function, which the calculator evaluates precisely.
Example
Shape 2 and scale 3, for x = 5:
- P(X ≤ 5) ≈ 0.496;
- P(X > 5) ≈ 0.504;
- mean 6, variance 18, mode 3.
Interpretation for waiting times
If events arrive at random at a rate of 1 every θ minutes (a Poisson process), the waiting time until the k-th event follows a gamma distribution with shape k and scale θ. With k = 2 and θ = 3 minutes, the second customer arrives within 5 minutes about half of the time.
Special cases
| Case | Distribution |
|---|---|
| k = 1 | Exponential with mean θ |
| k whole number | Erlang, used in queuing and call centers |
| k = ν/2, θ = 2 | Chi-square with ν degrees of freedom |
| large k | Close to normal with mean kθ |
Shape and skewness
The skewness of the gamma distribution is 2 ÷ √k. With small k, the distribution is strongly skewed with a long right tail; as k grows, it becomes more symmetric.
Rate or scale?
Textbooks and software use both conventions. In the rate form, the density is β^k x^(k−1) e^(−βx) ÷ Γ(k) and the mean is k ÷ β. To use the calculator with a rate β, enter θ = 1 ÷ β.
Uses
- Hydrology: monthly or annual rainfall totals.
- Insurance: claim sizes.
- Reliability: time to failure of a system with k − 1 spares.
- Bayesian statistics: the conjugate prior for a Poisson rate.
For a single waiting time with a constant rate, use the exponential distribution calculator.