Common Probability Distributions

Formal

A probability distribution specifies the probability (mass or density) over all possible values of a random variable. The distributions below are the standard library of ML.

Discrete Distributions

(Bernoulli(pp)) — A single binary trial.

P(X=1)=p,P(X=0)=1p.E[X]=p,Var(X)=p(1p).(1)P(X=1) = p, \quad P(X=0) = 1-p. \quad \mathbb{E}[X]=p,\quad \text{Var}(X)=p(1-p). \tag{1}

(Binomial(n,pn, p)) — Number of successes in nn independent Bernoulli trials.

P(X=k)=(nk)pk(1p)nk.E[X]=np,Var(X)=np(1p).(2)P(X=k) = \binom{n}{k}p^k(1-p)^{n-k}. \quad \mathbb{E}[X]=np,\quad \text{Var}(X)=np(1-p). \tag{2}

(Categorical(p\mathbf{p})) — Generalises Bernoulli to KK mutually exclusive outcomes. pRK\mathbf{p} \in \mathbb{R}^K, kpk=1\sum_k p_k = 1. The distribution over class labels in classification.

(Poisson(λ\lambda)) — Number of events in a fixed interval given constant mean rate λ\lambda.

P(X=k)=λkeλk!.E[X]=Var(X)=λ.(3)P(X=k) = \frac{\lambda^k e^{-\lambda}}{k!}. \quad \mathbb{E}[X] = \text{Var}(X) = \lambda. \tag{3}
Continuous Distributions

(Uniform(a,ba, b)) — Constant density over [a,b][a,b]: f(x)=1baf(x) = \frac{1}{b-a}. Used for uninformative priors and parameter initialisation.

(Gaussian N(μ,σ2)\mathcal{N}(\mu, \sigma^2)) — The bell curve. Defined entirely by its mean and variance:

f(x)=1σ2πexp ⁣((xμ)22σ2).(4)f(x) = \frac{1}{\sigma\sqrt{2\pi}}\exp\!\left(-\frac{(x-\mu)^2}{2\sigma^2}\right). \tag{4}

Closed under linear transformations: if XN(μ,σ2)X \sim \mathcal{N}(\mu, \sigma^2) then aX+bN(aμ+b,a2σ2)aX+b \sim \mathcal{N}(a\mu+b, a^2\sigma^2). The Central Limit Theorem explains its ubiquity.

(Multivariate Gaussian N(μ,Σ)\mathcal{N}(\boldsymbol{\mu}, \boldsymbol{\Sigma})) — Generalises to nn dimensions. Parameterised by a mean vector μRn\boldsymbol{\mu} \in \mathbb{R}^n and a covariance matrix ΣRn×n\boldsymbol{\Sigma} \in \mathbb{R}^{n \times n} (symmetric positive semi-definite):

f(x)=1(2π)n/2Σ1/2exp ⁣(12(xμ)Σ1(xμ)).(5)f(\mathbf{x}) = \frac{1}{(2\pi)^{n/2}|\boldsymbol{\Sigma}|^{1/2}}\exp\!\left(-\frac{1}{2}(\mathbf{x}-\boldsymbol{\mu})^\top\boldsymbol{\Sigma}^{-1}(\mathbf{x}-\boldsymbol{\mu})\right). \tag{5}

Its level sets are ellipsoids shaped by Σ\boldsymbol{\Sigma}. Marginals and conditionals of a multivariate Gaussian are also Gaussian.

(Beta(α,β\alpha, \beta)) — A distribution over probabilities, i.e., X[0,1]X \in [0,1]. Conjugate prior for the Bernoulli. Controlled by shape parameters α\alpha (successes) and β\beta (failures).

(Exponential(λ\lambda)) — Time between events in a Poisson process: f(x)=λeλxf(x) = \lambda e^{-\lambda x} for x0x \geq 0.

Intuition

Distributions are the standard library of ML — each is a pre-built model for a specific generative process:

Generative processDistribution
Binary outcome (coin flip, spam/not-spam)Bernoulli
nn independent binary trialsBinomial
Multi-class labelCategorical
Count of events per unit timePoisson
Sum of many independent small effectsGaussian (CLT)
Unknown probability pp with prior beliefsBeta

The Gaussian is the default noise model because the Central Limit Theorem guarantees it appears whenever you sum many independent contributions — measurement error, financial noise, sensor readings.

ML Applications
  • Binary classification — outputs modelled as Bernoulli; cross-entropy loss is negative log-likelihood of Bernoulli.
  • Multi-class classification — outputs are Categorical; softmax parameterises p\mathbf{p}.
  • Regression — targets modelled as Gaussian; MSE loss is equivalent to MLE under this assumption.
  • Multivariate Gaussian — the foundation of PCA (data projected onto Gaussian-shaped ellipsoids), Gaussian Processes, and Linear Discriminant Analysis.
  • Conjugate priors — Beta is conjugate to Bernoulli; Dirichlet is conjugate to Categorical. Using conjugate priors makes Bayesian updating analytically tractable.
Connections
  • #type/reference
  • #probability
  • #distributions