Probability · distribution theory

Beta Distribution

A distribution over probabilities: two numbers, α and β, bend it into almost any shape on [0, 1].

What does a beta look like?

$$f(\theta) = \frac{\theta^{\alpha-1}(1-\theta)^{\beta-1}}{B(\alpha,\beta)}, \quad 0 \le \theta \le 1$$

mean mode variance

The family at a glance

A 4 by 4 grid of Beta densities for alpha and beta in 0.5, 1, 2 and 4
Rows: β = 0.5, 1, 2, 4. Columns: α = 0.5, 1, 2, 4.

α = β

Symmetric about 0.5

α > β

Mass pushed towards 1

α, β < 1

U-shaped: piles up at both ends

Beta stats

Mean\( \dfrac{\alpha}{\alpha+\beta} \)
Median\( \approx \dfrac{\alpha - 1/3}{\alpha+\beta-2/3} \), for \( \alpha, \beta > 1 \)
Mode\( \dfrac{\alpha - 1}{\alpha+\beta-2} \), for \( \alpha, \beta > 1 \)
Variance\( \dfrac{\alpha\beta}{(\alpha+\beta)^2(\alpha+\beta+1)} \)
Skewness\( \dfrac{2(\beta-\alpha)\sqrt{\alpha+\beta+1}}{(\alpha+\beta+2)\sqrt{\alpha\beta}} \)
Excess kurtosis\( \dfrac{6\left[(\alpha-\beta)^2(\alpha+\beta+1) - \alpha\beta(\alpha+\beta+2)\right]}{\alpha\beta(\alpha+\beta+2)(\alpha+\beta+3)} \)

The mean and mode are the dashed lines on the shape explorer.

Demo

mathlets.org/mathlets/beta-distribution

Common beta priors

Uniform prior: \( \beta(1,1) \)
every probability equally likely
Laplacian prior: \( \beta(2,2) \)
a gentle lean towards 0.5

More beta priors

Bayes' prior Beta(1,1), Jeffreys' prior Beta(0.5,0.5), Haldane's prior Beta(0,0) and an empirical prior Beta(0.27,0.27)

Lambda continuum

\( f_\lambda(p) = \beta\!\left(\tfrac{\lambda}{2}, \tfrac{\lambda}{2}\right) \)

  • \( \lambda < 2 \): mass at the extremes
  • \( \lambda = 2 \): uniform
  • \( \lambda \to \infty \): concentrates on \( p = 0.5 \)

Lambda continuum, the original figure

Six panels of symmetric Beta densities for lambda = 0.5, 1, 2, 4, 8, 16