---
tag: 06395GBNWD
kind: definition
name: Gamma distribution
msc: ["60E05"]
defines: 0B80PAQD3C
uses: [04YG690N5V, 028Z8WC5Y9]
sources:
  - url: https://en.wikipedia.org/wiki/Gamma_distribution
    locator: Definitions
---

## Definition

Let $\alpha > 0$ and $\beta > 0$.
The gamma distribution with shape $\alpha$ and rate $\beta$ is the distribution on $\mathbb{R}$ with the [[probability density function|04YG690N5V]]
$$f(x) = \begin{cases} \dfrac{\beta^\alpha}{\Gamma(\alpha)} x^{\alpha - 1} e^{-\beta x} & \text{if } x > 0, \\ 0 & \text{if } x \le 0, \end{cases}$$
with the gamma function $\Gamma(\alpha) = \int_0^\infty t^{\alpha - 1} e^{-t} \, dt$. One writes $X \sim \operatorname{Gamma}(\alpha, \beta)$.

## Remarks

The mean is $\alpha / \beta$ and the variance is $\alpha / \beta^2$. Another common form uses the scale $\theta = 1/\beta$.
$\operatorname{Gamma}(1, \beta)$ is the [[exponential distribution|028Z8WC5Y9]] with rate $\beta$. For an integer $n \ge 1$, $\operatorname{Gamma}(n, \beta)$ is the law of a sum of $n$ independent $\operatorname{Exp}(\beta)$ random variables. It is the Erlang distribution.
If $X \sim \operatorname{Gamma}(\alpha_1, \beta)$ and $Y \sim \operatorname{Gamma}(\alpha_2, \beta)$ are independent, then $X + Y \sim \operatorname{Gamma}(\alpha_1 + \alpha_2, \beta)$.
The chi-squared distribution with $k$ degrees of freedom is $\operatorname{Gamma}(k/2, 1/2)$.

## Explanations

### L1 human

The gamma distribution with an integer shape $n$ is the waiting time for the $n$-th event of a Poisson process.
For example, it can model the time until the third customer arrives.
