Exponential Family

A beginner-friendly introduction to exponential family distributions, with examples like Bernoulli, Poisson, and Normal. Learn how to rewrite distributions in exponential form and understand their components visually.

Exponential FamilyProbability Distributions

Many of the probability distributions you encounter—like the normal, Poisson, and Bernoulli—belong to a powerful, unified class known as the exponential family. This article introduces the concept, explains its structure, and rewrites familiar distributions in exponential form with step-by-step math.

What is the exponential family?

A distribution belongs to the exponential family if its probability density or mass function can be written as:

p(xθ)=h(x)exp(η(θ)T(x)A(θ))p(x | \theta) = h(x) \exp\left( \eta(\theta)^\top T(x) - A(\theta) \right)

Each part plays a specific role:

  • h(x)h(x): base measure
  • η(θ)\eta(\theta): natural parameter
  • T(x)T(x): sufficient statistic
  • A(θ)A(\theta): log-partition function (normalizes the distribution)

Why is this form useful?

  • Sufficient statistics are made explicit
  • Maximum likelihood estimation (MLE) becomes easier
  • Conjugate priors exist for Bayesian analysis
  • It enables unified analysis and transformation across distributions

Example 1: Bernoulli Distribution

The Bernoulli distribution is:

p(xθ)=θx(1θ)1x,x{0,1}p(x | \theta) = \theta^x (1 - \theta)^{1 - x}, \quad x \in \{0,1\}

Step 1: Convert to exponential form

p(xθ)=exp(xlogθ+(1x)log(1θ))=exp(xlog(θ1θ)+log(1θ))\begin{aligned} p(x|\theta) &= \exp\left( x \log \theta + (1 - x) \log(1 - \theta) \right) \\\\ &= \exp\left( x \log\left( \frac{\theta}{1 - \theta} \right) + \log(1 - \theta) \right) \end{aligned}

Step 2: Identify exponential family parts

  • η(θ)=log(θ1θ)\eta(\theta) = \log\left( \frac{\theta}{1 - \theta} \right)
  • T(x)=xT(x) = x
  • A(θ)=log(1θ)A(\theta) = -\log(1 - \theta)
  • h(x)=1h(x) = 1

✅ Bernoulli is in the exponential family.


Example 2: Poisson Distribution

The Poisson distribution is:

p(xλ)=λxeλx!,xNp(x | \lambda) = \frac{\lambda^x e^{-\lambda}}{x!}, \quad x \in \mathbb{N}

Step 1: Exponential form

p(xλ)=exp(xlogλλlogx!)p(x | \lambda) = \exp\left( x \log \lambda - \lambda - \log x! \right)

Step 2: Map to the exponential form

  • η(λ)=logλ\eta(\lambda) = \log \lambda
  • T(x)=xT(x) = x
  • A(λ)=λA(\lambda) = \lambda
  • h(x)=1x!h(x) = \frac{1}{x!}

✅ Poisson is in the exponential family.


Example 3: Normal Distribution (with known variance)

Consider the normal distribution with known variance σ2\sigma^2:

p(xμ)=12πσ2exp((xμ)22σ2)p(x | \mu) = \frac{1}{\sqrt{2\pi \sigma^2}} \exp\left( -\frac{(x - \mu)^2}{2\sigma^2} \right)

Step 1: Expand and rearrange

p(xμ)=12πσ2exp(x22xμ+μ22σ2)=exp(μxσ2μ22σ2x22σ2log2πσ2)\begin{aligned} p(x | \mu) &= \frac{1}{\sqrt{2\pi \sigma^2}} \exp\left( -\frac{x^2 - 2x\mu + \mu^2}{2\sigma^2} \right) \\\\ &= \exp\left( \frac{\mu x}{\sigma^2} - \frac{\mu^2}{2\sigma^2} - \frac{x^2}{2\sigma^2} - \log\sqrt{2\pi \sigma^2} \right) \end{aligned}

Step 2: Identify components

  • η(μ)=μσ2\eta(\mu) = \frac{\mu}{\sigma^2}
  • T(x)=xT(x) = x
  • A(μ)=μ22σ2A(\mu) = \frac{\mu^2}{2\sigma^2}
  • h(x)=exp(x22σ2)/2πσ2h(x) = \exp\left( -\frac{x^2}{2\sigma^2} \right) / \sqrt{2\pi \sigma^2}

✅ Normal (with fixed variance) is also in the exponential family.


The log-partition function A(θ)A(\theta)

This function ensures that the probability integrates (or sums) to 1. Formally:

A(θ)=logh(x)exp(η(θ)T(x))dxA(\theta) = \log \int h(x) \exp\left( \eta(\theta)^\top T(x) \right) dx

It also plays a key role in computing expectations and variances in exponential families.


Visual Interactive Demo

Use the demo below to explore how the shape of distributions in the exponential family changes with the natural parameter η\eta. You can also experiment with different sufficient statistics and see how the log-partition function affects normalization.

Exponential Family Builder

Explore exponential family distributions interactively

Distribution

-33

Distribution Visualization

Exponential Family Form

Standard Form

p(x) = pˣ(1-p)¹⁻ˣ

Maximum Probability

0

Distribution Type

Discrete

Components

h(x) - Base Measure

1

Constant (same for all x)

T(x) - Sufficient Statistic

x

Identity function (x itself)

η - Natural Parameter

0.500

Controls the distribution shape

A(θ) - Log-partition

A(θ)

Ensures normalization

Parameter Relationship

η = log(p/(1-p)), where p = 1/(1+e⁻η)

Understanding Exponential Families

General Form

All exponential family distributions can be written as:

p(x) = h(x) × exp(η×T(x) - A(θ))

Component Roles

h(x): Determines the support and basic shape of the distribution
T(x): Captures sufficient information about the data
η: Natural parameter that controls the distribution's characteristics
A(θ): Log-partition function ensuring proper normalization

Summary

The exponential family provides a unified framework for many common distributions. Understanding how different distributions fit this structure helps in both frequentist and Bayesian inference.

← Back to Encyclopedia