---
title: Deriving the Quantum Distributions from the Grand Ensemble
module: Quantum Statistics
moduleNumber: 7
lessonNumber: 2
order: 702
summary: >
  The Bose-Einstein and Fermi-Dirac distributions follow from one observation:
  in the occupation-number representation the single-particle modes are
  independent, so the grand partition function factorizes into one factor per
  mode. A boson mode sums a geometric series over all occupancies; a fermion
  mode sums two terms. Differentiating each factor gives the mean occupation
  $1/(e^{\beta(\varepsilon-\mu)}\mp 1)$, the Maxwell-Boltzmann limit when
  occupancies are small, and the occupation fluctuations that distinguish
  bunching from anti-bunching.
topics: [Quantum Statistics]
sources:
  - book: Schroeder
    ref: "Ch. 7 — Quantum Statistics; §7.2 Bosons and Fermions"
  - book: Reif
    ref: "Ch. 9 — Quantum Statistics of Ideal Gases; §9.5–9.9"
  - book: Kardar (Statistical Physics of Particles)
    ref: "Ch. 7 — Quantum Statistical Mechanics; §7.1–7.3"
  - book: Pathria & Beale
    ref: "Ch. 6 — The Theory of Simple Gases; §6.1–6.3"
draft: false
---

The previous lesson stated the Bose-Einstein and Fermi-Dirac laws and read off
their consequences, but the normalization constant $\alpha$ was left as a
quantity fixed after the fact by a particle-number integral. The grand canonical
ensemble removes that awkwardness. It fixes the temperature and the chemical
potential rather than the particle number, and it makes the single-particle
modes of an ideal quantum gas statistically independent. The whole derivation is
then a sum over the occupancy of one mode, done twice: a geometric series for
bosons, a two-term sum for fermions. The constant $\alpha$ of the survey lesson
becomes $-\beta\mu$, an equilibrium property of the reservoir rather than a
fitting parameter.

## The occupation-number representation

An ideal gas has no interactions, so its exact energy eigenstates are products
of single-particle states. Label the single-particle levels by an index $k$ with
energies $\varepsilon_k$. A microstate of the whole gas is fixed by stating how
many particles occupy each level: the **occupation numbers** $\{n_k\}$. The total
particle number and energy are

$$
N = \sum_k n_k, \qquad E = \sum_k n_k\,\varepsilon_k .
$$

The exchange symmetry of the previous lesson restricts the allowed values of
each $n_k$:

- **Bosons.** Any number of identical bosons may share a level, so
  $n_k \in \{0, 1, 2, \dots\}$ without bound.
- **Fermions.** The exclusion principle permits at most one fermion per state,
  so $n_k \in \{0, 1\}$.

In the canonical ensemble the constraint $\sum_k n_k = N$ couples the levels: the
occupancies are not free to vary independently, because raising one $n_k$ forces
another down to keep $N$ fixed. That coupling is what makes the fixed-$N$ sum
hard. Releasing $N$ decouples the levels.

$$
% caption: In the grand ensemble each single-particle level exchanges particles with a common reservoir at temperature $T$ and chemical potential $\mu$, so the occupancies of different levels vary independently.
\begin{tikzpicture}[>=Latex,font=\footnotesize,scale=1.0]
\definecolor{acc}{HTML}{4A6FA5}
\fill[black] (-0.4,-0.7) rectangle (8.6,0.5);
\draw[black,thick] (-0.4,-0.7) rectangle (8.6,0.5);
\node[black] at (4.1,-0.25) {reservoir: fixed $T$ and $\mu$};
\foreach \x/\lab in {0.6/{k=1}, 2.6/{k=2}, 4.6/{k=3}, 6.6/{k=4}} {
  \draw[acc,thick] (\x,1.1) -- (\x+1.2,1.1);
  \node[acc,font=\scriptsize,anchor=south] at (\x+0.6,1.15) {\lab};
  \draw[->,black] (\x+0.6,0.55) -- (\x+0.6,1.05);
  \draw[->,black] (\x+0.6,1.05) -- (\x+0.6,0.55);
}
\node[black,anchor=west,font=\scriptsize] at (7.9,0.85) {exchange};
\node[acc,anchor=west] at (0.0,2.0) {single-particle levels, energies $\varepsilon_k$};
\end{tikzpicture}
$$

## One mode as an independent subsystem

Fix the temperature through $\beta = 1/k_B T$ and the chemical potential $\mu$.
The grand partition function sums the Gibbs weight $e^{-\beta(E-\mu N)}$ over
every microstate. Writing $E-\mu N = \sum_k (\varepsilon_k-\mu)\,n_k$ turns the
weight into a product over levels, and because the occupancies now range
independently, the sum over microstates factorizes:

$$
\Xi = \sum_{\{n_k\}} \prod_k e^{-\beta(\varepsilon_k-\mu)\,n_k}
   = \prod_k \Bigg( \sum_{n_k} e^{-\beta(\varepsilon_k-\mu)\,n_k} \Bigg)
   = \prod_k \Xi_k .
$$

Each factor $\Xi_k$ is the grand partition function of a single level treated as
its own subsystem in contact with the reservoir. The grand potential is a sum of
one-level contributions,

$$
\Phi = -k_B T \ln\Xi = -k_B T \sum_k \ln\Xi_k ,
$$

and every thermodynamic quantity of the ideal quantum gas reduces to a
single-level calculation summed over $k$.[^schroeder-fact]

> **Definition (Single-mode grand partition function).** For the level of energy
> $\varepsilon$, with the abbreviation $x = \beta(\varepsilon-\mu)$,
> $$
> \Xi_k = \sum_{n} e^{-x n},
> $$
> where the sum runs over $n \in \{0,1,2,\dots\}$ for bosons and $n \in \{0,1\}$
> for fermions.

## Summing the two series

The two allowed ranges give two elementary sums.

For **bosons** the sum is a geometric series in the ratio $e^{-x}$. It converges
only if $e^{-x} < 1$, i.e. $\mu < \varepsilon$; applied to the lowest level this
requires the chemical potential to lie below the ground-state energy, a condition
that returns with force in Bose-Einstein condensation. The sum is

$$
\Xi_k^{\text{BE}} = \sum_{n=0}^{\infty} e^{-x n} = \frac{1}{1-e^{-x}} .
$$

For **fermions** only $n=0$ and $n=1$ contribute, so the sum has two terms:

$$
\Xi_k^{\text{FD}} = \sum_{n=0}^{1} e^{-x n} = 1 + e^{-x} .
$$

$$
% caption: A boson level sums an unbounded geometric ladder of occupancies while a fermion level admits only the empty and singly-occupied states.
\begin{tikzpicture}[>=Latex,font=\footnotesize,scale=1.0]
\definecolor{acc}{HTML}{4A6FA5}
% boson ladder
\node[anchor=south] at (1.3,3.3) {boson level};
\foreach \n/\y in {0/0, 1/0.7, 2/1.4, 3/2.1} {
  \draw[thick] (0.4,\y) -- (2.2,\y);
  \node[font=\scriptsize,anchor=west] at (2.3,\y) {n=\n};
}
\node[acc,font=\scriptsize] at (1.3,2.75) {up to infinity};
\draw[acc,dotted,thick] (1.3,2.25) -- (1.3,2.6);
% fermion two-state
\begin{scope}[xshift=5.4cm]
\node[black,anchor=south] at (1.3,3.3) {fermion level};
\foreach \n/\y in {0/0, 1/0.7} {
  \draw[black,thick] (0.4,\y) -- (2.2,\y);
  \node[black,font=\scriptsize,anchor=west] at (2.3,\y) {n=\n};
}
\node[black,font=\scriptsize] at (1.3,1.6) {two terms only};
\end{scope}
\end{tikzpicture}
$$

## Mean occupation from a single derivative

The mean occupation of a level is the reservoir-weighted average of $n_k$. It
comes directly from $\Xi_k$ by differentiating with respect to the level energy,
since each factor of $e^{-\beta\varepsilon_k n_k}$ carries an $n_k$ down:

$$
\langle n_k\rangle
  = \frac{1}{\Xi_k}\sum_n n\,e^{-x n}
  = -\frac{1}{\beta}\,\frac{\partial \ln\Xi_k}{\partial \varepsilon_k}
  = \frac{1}{\beta}\,\frac{\partial \ln\Xi_k}{\partial \mu}\bigg|_{\varepsilon_k}.
$$

Applying this to each closed-form $\Xi_k$ gives the two quantum distributions
with no free constants left.

> **Theorem (Bose-Einstein and Fermi-Dirac occupations).** The mean occupation of
> a single-particle level of energy $\varepsilon$ in an ideal quantum gas at
> temperature $T$ and chemical potential $\mu$ is
> $$
> \langle n\rangle = \frac{1}{e^{\beta(\varepsilon-\mu)}\mp 1},
> $$
> with the lower sign for bosons and the upper sign for fermions.[^kardar-occ]

> **Proof.** For bosons, $\ln\Xi_k^{\text{BE}} = -\ln\!\big(1-e^{-x}\big)$, so
> $$
> \langle n\rangle = -\frac{1}{\beta}\frac{\partial}{\partial\varepsilon}
> \Big[{-}\ln\!\big(1-e^{-x}\big)\Big]
> = \frac{e^{-x}}{1-e^{-x}} = \frac{1}{e^{x}-1}.
> $$
> For fermions, $\ln\Xi_k^{\text{FD}} = \ln\!\big(1+e^{-x}\big)$, so
> $$
> \langle n\rangle = -\frac{1}{\beta}\frac{\partial}{\partial\varepsilon}
> \ln\!\big(1+e^{-x}\big)
> = \frac{e^{-x}}{1+e^{-x}} = \frac{1}{e^{x}+1}.
> $$
> In both lines $x = \beta(\varepsilon-\mu)$ and $\partial x/\partial\varepsilon =
> \beta$. The signs are $-1$ for bosons and $+1$ for fermions, as claimed. $\square$

The constant $\alpha$ of the survey lesson is now identified: writing
$e^{\alpha} = e^{-\beta\mu}$ reproduces the earlier form
$1/(e^{\alpha}e^{\varepsilon/k_B T}\mp 1)$. What was a normalization constant is
the chemical potential of the reservoir, fixed by thermodynamics rather than by a
counting integral. The fermion occupation is bounded, $0 \le \langle n\rangle \le
1$, and equals $\tfrac12$ at $\varepsilon = \mu$; the boson occupation is
unbounded and diverges as $\varepsilon \to \mu^+$.

$$
% caption: Mean occupation against $(\varepsilon-\mu)/k_BT$. The Fermi-Dirac curve passes through one-half at $\varepsilon=\mu$ and is bounded by one; the Bose-Einstein curve diverges as $\varepsilon\to\mu^+$; both merge with the Maxwell-Boltzmann exponential once $\varepsilon-\mu \gtrsim 2k_BT$.
\begin{tikzpicture}[>=Latex,font=\footnotesize,scale=1.0]
\definecolor{acc}{HTML}{4A6FA5}
\draw[->,black] (0,0) -- (7.8,0) node[right,black,font=\scriptsize] {(E minus mu) over kT};
\draw[->,black] (0,0) -- (0,3.2) node[above,black,font=\scriptsize] {mean n};
\draw[black,dashed] (3,0) -- (3,3.0);
\node[black,font=\scriptsize,anchor=north] at (3,-0.05) {0};
\node[black,font=\scriptsize,anchor=north] at (1,-0.05) {-2};
\node[black,font=\scriptsize,anchor=north] at (5,-0.05) {2};
\node[black,font=\scriptsize,anchor=north] at (7,-0.05) {4};
\node[black,font=\scriptsize,anchor=east] at (0,1.3) {1};
% FD: through (3,0.65) = 0.5*1.3
\draw[black!70,very thick,densely dotted] plot coordinates
  {(0,1.24)(1,1.145)(2,0.95)(3,0.65)(4,0.35)(5,0.155)(6,0.062)(7,0.023)};
% BE: diverges near x=3
\draw[acc,very thick] plot coordinates
  {(3.5,2.00)(4,0.757)(4.5,0.373)(5,0.204)(6,0.068)(7,0.024)};
\draw[acc,dotted,thick] (3.5,2.0) -- (3.2,2.9);
% MB
\draw[black,thick,densely dashed] plot coordinates
  {(3,1.3)(4,0.478)(5,0.176)(6,0.065)(7,0.023)};
\node[text=black!70,font=\scriptsize,anchor=east] at (2.0,1.05) {Fermi-Dirac};
\node[text=acc,font=\scriptsize,anchor=west] at (3.55,2.35) {Bose-Einstein};
\node[text=black,font=\scriptsize,anchor=west] at (4.4,0.72) {Boltzmann};
\end{tikzpicture}
$$

## The Maxwell-Boltzmann limit

Both distributions collapse to a common form when every level is nearly empty.
That happens when $e^{\beta(\varepsilon-\mu)} \gg 1$ for all occupied levels,
which the lowest level makes the condition $e^{-\beta\mu} \gg 1$, i.e. a large
negative $\mu$. In that regime the $\mp 1$ is negligible beside the exponential
and

$$
\langle n\rangle \;\approx\; e^{-\beta(\varepsilon-\mu)}
   \;=\; e^{\beta\mu}\,e^{-\beta\varepsilon} \;\ll\; 1 .
$$

The occupancy is the Boltzmann factor scaled by the **fugacity** $z = e^{\beta\mu}$,
and the distinction between the two statistics disappears: when levels are almost
never doubly occupied, whether double occupancy is enhanced, forbidden, or
neutral cannot matter. This is the microscopic content of the classical-validity
criterion of the survey lesson, and the next lesson develops it into the quantum
concentration.[^reif-mb]

> **Worked example.** A boson and a fermion level with the same energy offset
> $\varepsilon-\mu = 3k_BT$ have $x=3$, so $e^{x}=20.09$. Their occupations are
> $$
> \langle n\rangle_{\text{BE}} = \frac{1}{20.09-1} = 0.0524, \qquad
> \langle n\rangle_{\text{FD}} = \frac{1}{20.09+1} = 0.0474,
> $$
> against the Boltzmann value $e^{-3} = 0.0498$. The three agree to within about
> $5\%$: at this offset the gas is already almost classical. At $x=0.5$ the same
> comparison gives $\langle n\rangle_{\text{BE}} = 1.54$ and
> $\langle n\rangle_{\text{FD}} = 0.378$ against $e^{-0.5}=0.607$ — a factor of
> four spread, the fully quantum regime.

## Occupation-number fluctuations

The grand ensemble delivers the variance of the occupation as easily as the mean,
through a second derivative of $\ln\Xi_k$. Since $\langle n_k\rangle$ is itself
$\beta^{-1}\partial_\mu \ln\Xi_k$, one more $\mu$-derivative gives

$$
\langle n_k^2\rangle - \langle n_k\rangle^2
  = \frac{1}{\beta}\,\frac{\partial \langle n_k\rangle}{\partial \mu}
  = \langle n_k\rangle\big(1 \mp \langle n_k\rangle\big),
$$

with the lower sign for bosons and the upper for fermions. The identity
$\partial_\mu\langle n\rangle = \beta\,\langle n\rangle(1\mp\langle n\rangle)$
follows from $e^{x} = (1\mp\langle n\rangle)/\langle n\rangle$. The three
statistics separate cleanly:

- **Bosons** have $\langle\Delta n^2\rangle = \langle n\rangle(1+\langle n\rangle)$,
  larger than the Poisson value $\langle n\rangle$. The excess $\langle n\rangle^2$
  is **bunching**: bosons are found together more often than independent particles
  would be.
- **Fermions** have $\langle\Delta n^2\rangle = \langle n\rangle(1-\langle n\rangle)$,
  smaller than Poisson and vanishing at both $\langle n\rangle=0$ and
  $\langle n\rangle=1$. A filled or empty level does not fluctuate. This
  suppression is **anti-bunching**.
- The **Maxwell-Boltzmann limit** $\langle n\rangle \ll 1$ sends both to the
  Poisson variance $\langle\Delta n^2\rangle \approx \langle n\rangle$, where the
  $\langle n\rangle^2$ correction is negligible.

$$
% caption: Occupation variance against mean occupation. Bose bunching lifts the variance above the Poisson line; Fermi anti-bunching pulls it below and to zero at full occupancy.
\begin{tikzpicture}[>=Latex,font=\footnotesize,scale=1.0]
\definecolor{acc}{HTML}{4A6FA5}
\draw[->,black] (0,0) -- (5.6,0) node[right,black,font=\scriptsize] {mean n};
\draw[->,black] (0,0) -- (0,3.4) node[above,black,font=\scriptsize] {variance};
\node[black,font=\scriptsize,anchor=north] at (5,-0.05) {1};
\node[black,font=\scriptsize,anchor=east] at (0,2.5) {0.25};
% Poisson: var = n, slope so that n=1 -> tikz x=5, y = n*? choose var scale: var 0.25 -> 2.5, so *10
% Poisson y = n (data), tikz y = n*? Poisson at n=1 is 1; boson at n=1 is 2. Let scale y: 1 unit var = 1.0 cm? then boson n=1 ->2 -> off. Use scale 1.0
% x: n from 0..1 -> 0..5 (x=5n). y: var 0..2 -> 0..3.0 (y=1.5 var)
\draw[black,thick,densely dashed] (0,0) -- (5,1.5);
\node[text=black,font=\scriptsize,anchor=south] at (2.5,1.75) {Poisson};
% boson var = n(1+n): n=0..1 -> data 0..2
\draw[acc,very thick] plot coordinates
  {(0,0)(1,0.33)(2,0.72)(2.5,0.94)(3,1.17)(4,1.68)(5,3.0)};
\node[text=acc,font=\scriptsize,anchor=south east] at (4.6,2.4) {Bose};
% fermion var = n(1-n): n=0..1 -> data 0..0.25 at n=0.5
\draw[black!70,very thick,densely dotted] plot coordinates
  {(0,0)(1,0.27)(2,0.48)(2.5,0.56)(3,0.63)(4,0.72)(4.5,0.62)(5,0)};
\node[text=black!70,font=\scriptsize,anchor=north] at (2.5,0.45) {Fermi};
\end{tikzpicture}
$$

The variance identities are the seed of the correlation properties of quantum
light and matter: boson bunching underlies the Hanbury Brown-Twiss effect and the
photon statistics of thermal light, and fermion anti-bunching underlies the
Pauli-suppressed shot noise of a degenerate electron gas.[^pathria-fluct]

## Summary

- In the occupation-number representation an ideal quantum gas is a set of
  single-particle levels, each holding an occupation $n_k$; the total energy and
  number are $\sum_k n_k\varepsilon_k$ and $\sum_k n_k$.
- Fixing $T$ and $\mu$ decouples the levels: $\Xi = \prod_k \Xi_k$ with $\Xi_k =
  \sum_n e^{-\beta(\varepsilon_k-\mu)n}$. Bosons sum a geometric series
  ($1/(1-e^{-x})$), fermions sum two terms ($1+e^{-x}$).
- One derivative gives $\langle n\rangle = 1/(e^{\beta(\varepsilon-\mu)}\mp 1)$,
  and the survey-lesson constant is $e^{\alpha}=e^{-\beta\mu}$.
- When $e^{\beta(\varepsilon-\mu)}\gg 1$ both reduce to $\langle n\rangle \approx
  z\,e^{-\beta\varepsilon}$, the Maxwell-Boltzmann limit.
- The occupation variance is $\langle n\rangle(1\pm\langle n\rangle)$: boson
  bunching above Poisson, fermion anti-bunching below it and zero at full
  occupancy.

[^schroeder-fact]: **Schroeder**, _An Introduction to Thermal Physics_, §7.2 — the factorization of the grand partition function over single-particle states and the reduction of the ideal quantum gas to a one-level calculation.
[^kardar-occ]: **Kardar**, _Statistical Physics of Particles_, §7.1–7.3 — the occupation-number Hilbert space and the Bose/Fermi mean occupations from the grand partition function. See also MIT OCW 8.333, <https://ocw.mit.edu/courses/8-333-statistical-mechanics-i-statistical-mechanics-of-particles-fall-2013/>.
[^reif-mb]: **Reif**, _Fundamentals of Statistical and Thermal Physics_, §9.5–9.9 — the two quantum distributions and their common Maxwell-Boltzmann limit at small occupancy.
[^pathria-fluct]: **Pathria & Beale**, _Statistical Mechanics_, §6.1–6.3 — mean occupations and the fluctuation formulas $\langle n\rangle(1\pm\langle n\rangle)$ for the ideal Bose and Fermi gases.
