---
title: Ensembles and the Postulate of Equal a Priori Probabilities
module: Microstates, Phase Space, and Statistical Entropy
moduleNumber: 2
lessonNumber: 3
order: 203
summary: >
  An ensemble is a probability distribution over the microstates of a system.
  This lesson states the single postulate on which equilibrium statistical
  mechanics rests — that an isolated system in equilibrium is equally likely to
  be in any of its accessible microstates — and works out its consequences: the
  accessible phase-space volume, the overwhelming dominance of the most probable
  macrostate as the particle number grows, and the ergodic hypothesis that lets
  a time average be replaced by an ensemble average.
topics: ["Microstates, Phase Space, and Statistical Entropy"]
sources:
  - book: Reif
    ref: "Ch. 2 §2.5; Ch. 3 Statistical Thermodynamics; §3.1–3.4"
  - book: Kardar
    ref: "Statistical Physics of Particles, Ch. 4 Classical Statistical Mechanics; §4.1–4.2"
  - book: Pathria & Beale
    ref: "Statistical Mechanics, Ch. 1 §1.1–1.3; Ch. 2 §2.3"
draft: false
---

Liouville's theorem left equilibrium underdetermined: any density that is a
function of the conserved quantities is stationary, but mechanics alone does not
say which one nature realizes. Statistical mechanics closes the gap with a single
assumption about probabilities, from which the entire equilibrium theory follows.
This lesson states that assumption, defines the ensembles it generates, and
establishes the property that makes the whole scheme predictive: for a system of
$10^{22}$ particles the probability distribution over macroscopic variables is so
sharply peaked that the average and the most probable value are, for every
practical purpose, the same number.[^reif-post]

## Ensembles

A macroscopic measurement does not resolve the microstate. It fixes a few
macroscopic constraints — the energy, volume, and particle number of an isolated
gas, say — and the system is free to be in any microstate consistent with them.
The **ensemble** formalizes this ignorance.

> **Definition (Statistical ensemble).** An **ensemble** is a probability
> distribution $\rho$ over the microstates of a system, representing a large
> collection of independent copies prepared under the same macroscopic
> constraints. The probability of finding the system in a phase-space element is
> $\rho(q,p)\,\d^{3N}q\,\d^{3N}p$, and the measured value of an observable
> $A(q,p)$ is the ensemble average
> $$
> \langle A \rangle = \int_\Gamma A(q,p)\,\rho(q,p)\,\d^{3N}q\,\d^{3N}p.
> $$

Gibbs introduced the device: rather than track one system in time, imagine a
cloud of identically constrained systems filling phase space with density $\rho$,
and compute averages over the cloud at one instant. Three ensembles, matched to
three ways of controlling a system, carry almost all of equilibrium statistical
mechanics. They differ in which macroscopic quantities are held rigidly fixed and
which are allowed to fluctuate through contact with a reservoir.

$$
% caption: The three principal ensembles differ by what the system exchanges
% with its surroundings: nothing (microcanonical), energy (canonical), or energy
% and particles (grand canonical). Each fixes the complementary variables.
\begin{tikzpicture}[scale=1.0, font=\footnotesize]
\definecolor{acc}{HTML}{4A6FA5}
% box 1 microcanonical
\draw[very thick] (0,0) rectangle (3.2,2.2);
\node[anchor=south, font=\small] at (1.6,2.3) {microcanonical};
\node[anchor=center] at (1.6,1.35) {isolated};
\node[anchor=center, font=\scriptsize] at (1.6,0.7) {held $E$, $V$, $N$};
\node[anchor=center, font=\scriptsize] at (1.6,0.25) {exchanges nothing};
% box 2 canonical
\begin{scope}[xshift=4.2cm]
\draw[thick] (0,0) rectangle (3.2,2.2);
\node[anchor=south, font=\small] at (1.6,2.3) {canonical};
\node[anchor=center] at (1.6,1.35) {heat bath};
\node[anchor=center, font=\scriptsize] at (1.6,0.7) {held $T$, $V$, $N$};
\node[anchor=center, font=\scriptsize] at (1.6,0.25) {exchanges energy};
\draw[->, black, thick] (-0.75,1.1) -- (-0.15,1.1);
\node[text=black, font=\scriptsize, anchor=south] at (-0.45,1.15) {$E$};
\end{scope}
% box 3 grand canonical
\begin{scope}[xshift=8.4cm]
\draw[thick] (0,0) rectangle (3.2,2.2);
\node[anchor=south, font=\small] at (1.6,2.3) {grand canonical};
\node[anchor=center] at (1.6,1.35) {heat + particle bath};
\node[anchor=center, font=\scriptsize] at (1.6,0.7) {held $T$, $V$, chem. pot.};
\node[anchor=center, font=\scriptsize] at (1.6,0.25) {exchanges $E$, $N$};
\draw[->, black, thick] (-0.75,1.35) -- (-0.15,1.35);
\draw[->, black, thick] (-0.75,0.85) -- (-0.15,0.85);
\node[text=black, font=\scriptsize, anchor=south] at (-0.45,1.4) {$E$};
\node[text=black, font=\scriptsize, anchor=north] at (-0.45,0.8) {$N$};
\end{scope}
\end{tikzpicture}
$$

The microcanonical ensemble is the starting point, because it applies to the
isolated system whose constraints are purely mechanical, and because the other
two are derived from it by putting a small system in contact with a large
microcanonical reservoir. Its construction requires only one physical postulate.

## The postulate of equal a priori probabilities

An isolated system has a definite energy (within a tolerance $\delta E$), and its
microstate lies somewhere on the energy shell built in the previous lesson. The
**accessible microstates** are those the system can occupy consistent with all its
constraints — the microstates in the shell. The fundamental postulate assigns
them equal probability.

> **Postulate (Equal a priori probabilities).** An isolated system in
> equilibrium is found with equal probability in each of its accessible
> microstates. In phase space the equilibrium density is uniform on the energy
> shell and zero off it:
> $$
> \rho(q,p) =
> \begin{cases}
> \dfrac{1}{\Omega(E)}, & E \le H(q,p) \le E + \delta E,\\[2mm]
> 0, & \text{otherwise,}
> \end{cases}
> $$
> where $\Omega(E)$ is the phase-space volume of the shell.[^reif-postulate]

Three observations fix its status.

- **It is consistent with the dynamics.** A uniform density on the energy shell
  is a function of $H$ alone, so by Liouville's theorem it is stationary. The
  postulate selects, among the infinitely many stationary densities, the one that
  is flat on the accessible region.
- **It is the least-biased assignment.** With no information beyond the
  constraints, assigning equal probability introduces no distinction between
  microstates that the constraints do not distinguish. This is the maximum-entropy
  reading, made precise in the next lesson.
- **It is a postulate, not a theorem.** Attempts to derive it from mechanics
  (via ergodicity, below) succeed only under assumptions no less strong. Its
  justification is ultimately that the thermodynamics it produces is correct.

Everything downstream — temperature, entropy, the Boltzmann and Gibbs
distributions, the whole machinery of the following modules — is a consequence of
this one statement applied to systems in contact.

$$
% caption: The equal-probability postulate spreads a uniform density over the
% accessible region of the energy shell; every microstate in the shell carries
% the same weight, and microstates off the shell carry none.
\begin{tikzpicture}[scale=1.0, font=\footnotesize]
\definecolor{acc}{HTML}{4A6FA5}
% energy shell annulus
\draw[acc, thick] plot [smooth cycle, tension=0.8] coordinates
  {(0,0) (2.4,0.4) (3.6,-0.1) (4.1,1.7) (3.0,2.9) (1.1,3.1) (-0.4,1.9) (-0.6,0.8)};
\draw[acc, thick, dashed] plot [smooth cycle, tension=0.8] coordinates
  {(0.35,0.4) (2.2,0.75) (3.15,0.3) (3.55,1.65) (2.7,2.55) (1.2,2.7) (0.05,1.8) (-0.05,0.9)};
% uniform stipple in the shell
\foreach \a in {10,35,60,90,120,150,180,210,240,270,300,330}
  \fill[acc] ({1.75+1.55*cos(\a)},{1.55+1.35*sin(\a)}) circle (1.1pt);
\node[text=acc, anchor=west] at (3.7,2.4) {accessible shell};
\node[anchor=center, font=\scriptsize] at (1.75,1.55) {uniform density};
\node[black, anchor=west, font=\scriptsize] at (3.4,0.0) {no density outside};
\end{tikzpicture}
$$

## The accessible volume and macrostate probabilities

The postulate turns questions about equilibrium into questions about counting
phase-space volume. Suppose the system has an internal parameter $x$ — the energy
in one half of a partitioned box, the number of particles on one side, the total
magnetization — that is not fixed by the external constraints. The probability
that $x$ takes a given value is proportional to the phase-space volume compatible
with it.

> **Definition (Accessible volume of a macrostate).** Let $\Omega(E, x)$ be the
> phase-space volume of the shell for which the internal variable equals $x$.
> Under the equal-probability postulate the probability density for $x$ is
> $$
> P(x) = \frac{\Omega(E, x)}{\Omega(E)}, \qquad
> \Omega(E) = \int \Omega(E, x)\,\d x.
> $$
> The equilibrium value of $x$ is the one that maximizes $\Omega(E, x)$ — the
> macrostate realized by the most microstates.[^kardar-most]

The equilibrium macrostate is the most probable one, and the second law is the
statement that an isolated system, released from a constrained value of $x$,
moves to the value of largest $\Omega$. What makes this a law rather than a
tendency is the extraordinary sharpness of $P(x)$ when $N$ is macroscopic.

## Counting states: the cell size

The volume $\Omega(E)$ carries the dimensions of $(\text{position} \times
\text{momentum})^{3N}$, so it is not yet a pure number of states. Probabilities
formed as ratios $\Omega(E,x)/\Omega(E)$ are dimensionless and insensitive to the
issue, but the entropy $k\ln\Omega$ and any absolute count of microstates require
a unit of phase-space volume. Classical mechanics does not supply one; quantum
mechanics does. The uncertainty principle $\Delta q\,\Delta p \gtrsim h$ forbids
localizing a single degree of freedom into a phase-space area smaller than
Planck's constant, so each of the $3N$ conjugate pairs occupies a cell of area
$h$, and one microstate fills a phase-space volume $h^{3N}$.

> **Definition (Number of microstates).** The number of accessible microstates in
> a phase-space region is the region's volume measured in units of $h^{3N}$, with
> a factor $1/N!$ for $N$ identical particles:
> $$
> \Omega(E) = \frac{1}{N!\,h^{3N}} \int_{E \le H \le E+\delta E}
> \d^{3N}q\, \d^{3N}p.
> $$
> The $h^{3N}$ makes the count dimensionless and fixes the additive constant in
> the entropy; the $N!$ removes the overcounting of states that differ only by a
> permutation of identical particles.[^reif-cell]

Neither factor changes the location of the maximum of $\Omega(E,x)$ or the width
of $P(x)$ — both are properties of ratios, in which the constants cancel. They
matter for the absolute entropy: $h^{3N}$ sets the zero from which entropy is
measured, and the $N!$ restores extensivity, without which the entropy of a gas
would depend spuriously on how its particles are labelled. The consequences of
the $N!$ — the Sackur-Tetrode entropy and the resolution of the Gibbs paradox —
are worked out in the microcanonical and classical-gas modules. Here it is enough
that a finite unit of phase-space volume converts Liouville's continuous measure
into a countable $\Omega$, and that the counting inherits the sharpness derived
next.

## Sharpness of the distribution

The multiplicity $\Omega(E, x)$ is a product of the multiplicities of independent
degrees of freedom, so its logarithm is a sum of $\mathcal{O}(N)$ terms and is
itself extensive, of order $N$. Expand $\ln\Omega(E,x)$ about its maximum at
$x = x^\ast$:

$$
\ln\Omega(E, x) = \ln\Omega(E, x^\ast)
+ \frac{1}{2}\left.\frac{\partial^2 \ln\Omega}{\partial x^2}\right|_{x^\ast}(x - x^\ast)^2
+ \cdots,
$$

with no linear term at the maximum. Because $\ln\Omega \sim N$, the second
derivative is of order $N$ (write it $-N/\sigma_0^2$ for a constant $\sigma_0$ set
by the microscopic physics). Exponentiating gives a Gaussian,

$$
P(x) \propto \exp\!\left[-\frac{N}{2\sigma_0^2}(x - x^\ast)^2\right],
$$

whose standard deviation is

$$
\Delta x = \frac{\sigma_0}{\sqrt{N}}.
$$

The **relative** width — the spread as a fraction of the value, when $x$ is
extensive and $x^\ast \sim N$ — is

$$
\frac{\Delta x}{x^\ast} \sim \frac{1}{\sqrt{N}}.
$$

For $N \sim 10^{22}$ this is of order $10^{-11}$: the internal variable is pinned
to its most probable value to eleven significant figures. Fluctuations exist, but
they are utterly negligible on a macroscopic scale, and this is why thermodynamics
reports sharp values for quantities that are, microscopically, statistical. The
distinction between the mean $\langle x \rangle$, the most probable $x^\ast$, and
a single measurement dissolves in the thermodynamic limit.

$$
% caption: The probability of an extensive internal variable narrows as the
% particle number grows: the peak stays at the same relative position while its
% fractional width shrinks as one over the square root of N.
\begin{tikzpicture}[scale=1.0, font=\footnotesize]
\definecolor{acc}{HTML}{4A6FA5}
\draw[->, black] (0,0) -- (7.2,0) node[right] {x over peak};
\draw[->, black] (0,0) -- (0,3.3) node[above] {P(x)};
\draw[black] (3.5,0.06) -- (3.5,-0.06) node[anchor=north, font=\scriptsize] {1};
% broad (small N)
\draw[black, thick, densely dotted, smooth] plot coordinates
  {(0.4,0.05)(1.2,0.25)(2.0,0.7)(2.7,1.15)(3.5,1.35)(4.3,1.15)(5.0,0.7)(5.8,0.25)(6.6,0.05)};
% medium
\draw[black, thick, dashed, smooth] plot coordinates
  {(1.9,0.03)(2.5,0.35)(3.0,1.2)(3.5,2.0)(4.0,1.2)(4.5,0.35)(5.1,0.03)};
% narrow (large N)
\draw[acc, very thick, smooth] plot coordinates
  {(2.9,0.02)(3.2,0.5)(3.4,2.3)(3.5,3.05)(3.6,2.3)(3.8,0.5)(4.1,0.02)};
\node[text=black, anchor=west, font=\scriptsize] at (5.2,0.6) {small $N$};
\node[text=black, anchor=west, font=\scriptsize] at (4.55,1.2) {larger $N$};
\node[text=acc, anchor=west, font=\scriptsize] at (3.95,2.2) {macroscopic $N$};
\end{tikzpicture}
$$

> **Worked example.** Divide an isolated ideal gas of $2N$ particles into two
> equal halves by an imaginary plane and let $x = N_L$ be the number in the left
> half. Each particle is independently in the left half with probability
> $\tfrac{1}{2}$, so $N_L$ is binomial with mean $N$ and variance
> $2N \cdot \tfrac{1}{2}\cdot\tfrac{1}{2} = N/2$. The standard deviation is
> $\Delta N_L = \sqrt{N/2}$ and the relative fluctuation is
> $$
> \frac{\Delta N_L}{N} = \frac{1}{\sqrt{2N}}.
> $$
> For a cubic centimeter of gas, $N \sim 10^{19}$ per half, giving
> $\Delta N_L / N \sim 2\times 10^{-10}$. The two halves hold equal numbers to
> ten figures at every instant; a spontaneous imbalance large enough to notice
> has probability $e^{-\mathcal{O}(N)}$, effectively zero. The equilibrium value
> $N_L = N$ is not merely likely but overwhelming.

## Time averages and the ergodic hypothesis

A real measurement is taken on one system over a stretch of time, not on an
imagined cloud of copies at one instant. The quantity a physical apparatus reports
is the **time average**

$$
\bar A = \lim_{\tau\to\infty} \frac{1}{\tau}\int_0^\tau A\big(q(t), p(t)\big)\,\d t,
$$

taken along the single trajectory the system actually follows. The ensemble
formalism instead computes the **ensemble average** $\langle A \rangle$ over the
microcanonical density. The two agree only if the trajectory visits the energy
shell in a way that samples every region in proportion to its phase-space volume.

> **Hypothesis (Ergodic).** Over a long time a system's trajectory spends, in
> each region of the energy shell, a fraction of time equal to that region's
> fraction of the shell volume. Time averages then equal microcanonical ensemble
> averages,
> $$
> \bar A = \langle A \rangle,
> $$
> for observables $A$ that depend only on the microstate.[^kardar-ergodic]

A single trajectory cannot literally pass through every point of a
$(6N-1)$-dimensional surface (it is a one-dimensional curve), so the strict
statement is that the trajectory comes arbitrarily close to every point and
samples the shell uniformly in the limit. Proving this for a realistic
Hamiltonian is extraordinarily hard, and it is false for integrable systems,
which possess enough conserved quantities to confine the motion to a
low-dimensional torus rather than the full shell. For the many-body systems of
interest — gases and liquids with generic interactions — the hypothesis is taken
as an empirically successful assumption, on the same footing as the
equal-probability postulate itself. The two figures below contrast the object the
apparatus samples with the object the ensemble computes.

$$
% caption: Two routes to the same average. Left: one trajectory sampled over a
% long time (the time average an apparatus reports). Right: a snapshot of many
% ensemble copies at one instant (the ensemble average theory computes). The
% ergodic hypothesis asserts they agree.
\begin{tikzpicture}[scale=1.0, font=\footnotesize]
\definecolor{acc}{HTML}{4A6FA5}
% left: time average, one long trajectory on a shell
\draw[acc, thick] plot [smooth cycle, tension=0.8] coordinates
  {(0,0) (2.0,0.3) (3.0,-0.1) (3.4,1.4) (2.5,2.4) (0.9,2.5) (-0.3,1.6) (-0.4,0.6)};
\draw[black, thick] plot [smooth, tension=0.95] coordinates
  {(0.5,0.9) (1.5,0.6) (2.4,1.1) (2.0,1.9) (0.9,2.0) (0.4,1.3) (1.0,0.9) (1.8,1.3) (2.3,1.7) (1.4,2.0) (0.7,1.5)};
\node[anchor=south, font=\scriptsize] at (1.5,2.6) {one trajectory, long time};
\node[text=black, anchor=north, font=\scriptsize] at (1.3,-0.15) {time average};
% right: ensemble snapshot, many points
\begin{scope}[xshift=5.2cm]
\draw[acc, thick] plot [smooth cycle, tension=0.8] coordinates
  {(0,0) (2.0,0.3) (3.0,-0.1) (3.4,1.4) (2.5,2.4) (0.9,2.5) (-0.3,1.6) (-0.4,0.6)};
\foreach \x/\y in {0.5/0.9, 1.2/0.6, 2.1/0.8, 2.6/1.3, 2.2/1.9, 1.4/2.1, 0.6/1.6, 0.9/1.2, 1.7/1.1, 1.9/1.6, 1.2/1.6, 2.4/1.6}
  \fill[black] (\x,\y) circle (1.5pt);
\node[anchor=south, font=\scriptsize] at (1.5,2.6) {many copies, one instant};
\node[text=black, anchor=north, font=\scriptsize] at (1.3,-0.15) {ensemble average};
\end{scope}
\node[anchor=center, font=\small] at (4.6,1.2) {$=$};
\end{tikzpicture}
$$

## The route to thermodynamics

The postulate and its sharpness deliver the program of the next lesson. Because
$P(x)$ is a Gaussian of relative width $1/\sqrt{N}$, its logarithm is dominated by
the single term $\ln\Omega(E, x^\ast)$, and the equilibrium of an isolated system
is the maximum of $\ln\Omega$. Identifying $k\ln\Omega$ with the entropy turns
"maximize the number of accessible microstates" into "maximize the entropy," and
the conditions for the maximum, worked out when two systems share energy, produce
temperature and the second law. The counting introduced here becomes the
statistical entropy next.

[^reif-post]: **Reif**, _Fundamentals of Statistical and Thermal Physics_, §3.1–3.3 — the statistical postulates, accessible states of an isolated system, and the calculation of probabilities by counting.
[^reif-postulate]: **Reif**, _Fundamentals of Statistical and Thermal Physics_, §2.5 and §3.2 — the postulate of equal a priori probabilities for an isolated system in equilibrium and its expression as a uniform density on the energy shell.
[^kardar-most]: **Kardar**, _Statistical Physics of Particles_, §4.1–4.2, and **Pathria & Beale**, _Statistical Mechanics_, §1.2–1.3 — the probability of a macrostate as its share of accessible phase-space volume and the identification of equilibrium with the most probable macrostate.
[^reif-cell]: **Reif**, _Fundamentals of Statistical and Thermal Physics_, §2.5, and **Pathria & Beale**, _Statistical Mechanics_, §1.4, §2.4 — the subdivision of phase space into cells of volume $h^{3N}$, the $1/N!$ correct Boltzmann counting for identical particles, and their role in the absolute entropy.
[^kardar-ergodic]: **Kardar**, _Statistical Physics of Particles_, §3.1 and §4.1, and **Pathria & Beale**, _Statistical Mechanics_, §2.3 — the ergodic hypothesis, the equality of time and ensemble averages, and its failure for integrable systems.
