Energy Fluctuations in the Canonical Ensemble

Fix a bottle of gas in contact with a thermostat and its temperature is pinned, but its energy is not. Energy leaks back and forth across the wall to the reservoir, so at any instant the system holds a little more or a little less than its average. The natural object is therefore not a single number EE but a whole distribution P(E)P(E) — and the width of that distribution turns out to be one of the most consequential quantities in statistical mechanics. The central result is ⟨(ΔE)2⟩=kBT2 CV\langle(\Delta E)^2\rangle = k_BT^2\,C_V: the variance of the spontaneous energy fluctuations equals the heat capacity, up to a factor of kBT2k_BT^2. On the left is a purely statistical quantity — how much the energy jitters. On the right is a thermodynamic response you can measure with a calorimeter — how much heat the system soaks up per degree. That a silent, spontaneous fluctuation should equal a driven, measurable response is the first and cleanest instance of a fluctuation–response relation, an idea that reappears everywhere from electrical Johnson noise to Brownian motion to critical opalescence. The whole structure is hiding inside a single function. Treating ln⁡Z\ln Z as a cumulant-generating function in the variable β=1/kBT\beta=1/k_BT, the first β\beta-derivative gives (minus) the mean energy and the second gives the variance — so the fluctuation formula is a two-line consequence of differentiating ZZ twice. This article proves that owned result, then reads off its payoffs: because ⟨E⟩\langle E\rangle and CVC_V are both extensive, the relative fluctuation shrinks as 1/N1/\sqrt N and the energy becomes effectively sharp for macroscopic matter (why the canonical and microcanonical ensembles agree); positivity of a variance forces CV≥0C_V\ge0 (thermodynamic stability from statistics); and a diverging CVC_V means macroscopic energy fluctuations — the fingerprint of a phase transition. Every number here is python-verified.

Key takeaways
  • In the canonical ensemble the system exchanges energy with a heat bath at fixed TT, so EE is not fixed — it fluctuates about ⟨E⟩\langle E\rangle with a variance ⟨(ΔE)2⟩\langle(\Delta E)^2\rangle.
  • That variance is governed exactly by the heat capacity: ⟨(ΔE)2⟩=kBT2 CV\langle(\Delta E)^2\rangle = k_BT^2\,C_V — the paradigmatic fluctuation–response relation.
  • Both ⟨E⟩\langle E\rangle and ⟨(ΔE)2⟩\langle(\Delta E)^2\rangle are derivatives of ln⁡Z\ln Z in β\beta: mean from the first, variance from the second (a cumulant-generating structure).
  • The relative energy fluctuation scales as σE/⟨E⟩∼N−1/2\sigma_E/\langle E\rangle\sim N^{-1/2} for an extensive system, so the energy becomes sharply defined per particle in the thermodynamic limit and the canonical and microcanonical ensembles become equivalent.
  • A diverging CVC_V means macroscopic energy fluctuations — the hallmark of a continuous phase transition; positivity of the variance forces CV≥0C_V\ge0 (stability).
  • Key idea: differentiating ln⁡Z\ln Z twice in β\beta generates the energy cumulants — ⟨E⟩=−∂βln⁡Z\langle E\rangle=-\partial_\beta\ln Z and ⟨(ΔE)2⟩=∂β2ln⁡Z=−∂β⟨E⟩=kBT2CV\langle(\Delta E)^2\rangle=\partial_\beta^2\ln Z=-\partial_\beta\langle E\rangle=k_BT^2C_V: statistical variance equals thermal response.
The core insight

Differentiating ln⁡Z\ln Z with respect to β\beta generates the energy cumulants: ⟨E⟩=−∂βln⁡Z\langle E\rangle=-\partial_\beta\ln Z and ⟨(ΔE)2⟩=∂β2ln⁡Z=kBT2CV\langle(\Delta E)^2\rangle=\partial_\beta^2\ln Z=k_BT^2C_V. Thus the heat capacity is directly proportional to the equilibrium energy variance. The variance of the spontaneous energy fluctuations is the heat capacity — one identity read two ways: statistical fluctuation on the left, thermodynamic response on the right.

Where this lives today

Energy fluctuations are the everyday workhorse of computational statistical mechanics. In Monte Carlo and molecular-dynamics simulations one almost never measures the heat capacity by numerically differentiating ⟨E⟩\langle E\rangle with respect to TT — that requires two noisy runs and a fragile subtraction. Instead one measures CVC_V from a single run by sampling the energy variance, CV=⟨(ΔE)2⟩/kBT2C_V=\langle(\Delta E)^2\rangle/k_BT^2, which is statistically far cleaner and needs no finite-difference. The same trick finds phase transitions: a sharp peak (a would-be divergence, rounded by finite size) in the sampled energy variance flags a critical temperature, and finite-size scaling of that peak extracts critical exponents. Every modern lattice-model and biomolecular simulation uses this fluctuation estimator. The relation is also the ancestor of a whole family of noise formulas that engineers cannot ignore. The Johnson–Nyquist thermal noise of a resistor, the temperature noise floor of a cryogenic bolometer or a superconducting single-photon detector, and the irreducible energy resolution of a calorimeter are all set by fluctuation–dissipation identities of exactly this shape — the mean-square fluctuation of a variable equals kBTk_BT times a susceptibility. When astronomers push X-ray microcalorimeters to resolve individual photon energies, or when quantum-computing groups fight the thermal noise of a qubit's environment, they are budgeting against kBT2CVk_BT^2C_V. Einstein's 1904 insight — that a spontaneous fluctuation is a measurable, quantitative thing — remains, more than a century later, the design constraint on the most sensitive detectors ever built.

The physical picture

Picture the system as a sponge dipped in a vast thermal ocean. Energy sloshes in and out across the contact, and the question is: how big are the slosh events? If the system can absorb a large amount of energy for a small temperature change, corresponding to a large CVC_V, then the canonical ensemble also predicts larger equilibrium energy fluctuations through ⟨(ΔE)2⟩=kBT2CV\langle(\Delta E)^2\rangle=k_BT^2C_V. A "stiff" system with few available modes (small CVC_V) barely fluctuates; a "soft" system near a transition fluctuates wildly. The heat capacity literally measures how easily the energy is jostled, so it is no accident that it also sets the fluctuation width.

Figure
A system in contact with a heat bath. Energy E flows both ways across the wall, so EE fluctuates about ⟨E⟩\langle E\rangle; the width of P(E)P(E) is set by the heat capacity.
heat bath (reservoir) temperature T fixed system energy E fluctuates ⟨E⟩ ± σ_E E in E out

Think of ln⁡Z\ln Z as a cumulant-generating function: differentiating with respect to β\beta successively produces the mean energy, the energy variance, and higher energy cumulants such as the skewness. This is precisely a cumulant-generating function in probability, with −β-\beta as the source variable. The thermodynamics you measure is nothing but the low-order cumulants of an underlying microscopic probability distribution over energy. The key thermodynamic result is therefore the 1/N1/\sqrt N law for relative energy fluctuations. For NN weakly correlated subsystems the energies add, so the mean energy is extensive and grows as NN; the independent variances also add, so the standard deviation grows only like N\sqrt N. The ratio N/N=1/N→0\sqrt N / N = 1/\sqrt N \to 0. The plot below shows the same energy distribution for growing NN: it does not stop fluctuating, but relative to its mean it collapses to a needle. This is the law of large numbers wearing thermodynamic clothes, and it is exactly why a single sharp internal energy emerges from a jittering microscopic world.

Figure
Punchline: P(E) narrows relative to its mean as NN grows. Absolute width ∝N\propto\sqrt N grows, but the relative width σE/⟨E⟩∝1/N\sigma_E/\langle E\rangle\propto1/\sqrt N collapses — the energy becomes sharp.
E / ⟨E⟩ P(E) 1 small N: broad larger N macroscopic N: needle, σ/⟨E⟩ ∝ 1/√N

The core equations

In the canonical ensemble each microstate carries the Boltzmann weight, and the partition function normalizes them. Everything downstream is a derivative of this one object. The starting point:

pi=e−βEiZ,Z=∑ie−βEi(1)p_i=\frac{e^{-\beta E_i}}{Z},\qquad Z=\sum_i e^{-\beta E_i} \qquad (1)

where: pip_i — probability of microstate ii; EiE_i — its energy; β=1/kBT\beta=1/k_BT — inverse temperature; ZZ — canonical partition function. The mean energy is the weighted average ⟨E⟩=∑ipiEi\langle E\rangle=\sum_i p_iE_i; the whole article is about the spread around it. The mean energy is the first β\beta-derivative of ln⁡Z\ln Z — differentiating brings a factor −Ei-E_i down inside the sum, and dividing by ZZ makes it an average:

⟨E⟩=U=−∂ln⁡Z∂β(2)\langle E\rangle=U=-\frac{\partial\ln Z}{\partial\beta} \qquad (2)

where: ⟨E⟩\langle E\rangle — ensemble-average (internal) energy, also written UU. Read it as: cooling the system (raising β\beta) lowers the mean energy, and the rate at which it does so is the next quantity we need. The variance of the energy is the second β\beta-derivative of ln⁡Z\ln Z — this is the article's owned structural result, the statement that ln⁡Z\ln Z is a cumulant generator:

⟨(ΔE)2⟩≡⟨E2⟩−⟨E⟩2=∂2ln⁡Z∂β2=−∂⟨E⟩∂β(3)\langle(\Delta E)^2\rangle\equiv\langle E^2\rangle-\langle E\rangle^2=\frac{\partial^2\ln Z}{\partial\beta^2}=-\frac{\partial\langle E\rangle}{\partial\beta} \qquad (3)

where: ΔE=E−⟨E⟩\Delta E=E-\langle E\rangle — the instantaneous fluctuation; ⟨E2⟩\langle E^2\rangle — second moment. The two forms are equal because the second log-derivative is (second moment) minus (first moment squared) — exactly a variance. It is manifestly non-negative, a fact we will cash in below. Converting the β\beta-derivative to a temperature-derivative turns the statistical variance into a thermodynamic response, the fluctuation–response relation:

  ⟨(ΔE)2⟩=kBT2 CV  ,CV=(∂⟨E⟩∂T)V,N(4)\boxed{\;\langle(\Delta E)^2\rangle=k_BT^2\,C_V\;},\qquad C_V=\left(\frac{\partial\langle E\rangle}{\partial T}\right)_{V,N} \qquad (4)

where: CVC_V — heat capacity at constant volume and particle number; kBk_B — Boltzmann constant. The factor kBT2k_BT^2 is not decoration — it comes from the chain rule dβ/dT=−1/kBT2\mathrm d\beta/\mathrm dT=-1/k_BT^2 and must never be dropped. Because the left side is a variance (≥0\ge0), the relation forces CV≥0C_V\ge0. For an ordinary macroscopic system with short-range interactions, CV∝NC_V\propto N. Hence σE=kBT2CV∝N\sigma_E=\sqrt{k_BT^2C_V}\propto\sqrt N, while ⟨E⟩∝N\langle E\rangle\propto N, so the relative fluctuation vanishes as N−1/2N^{-1/2}:

σE⟨E⟩=kBT2CV⟨E⟩∼1N(5)\frac{\sigma_E}{\langle E\rangle}=\frac{\sqrt{k_BT^2C_V}}{\langle E\rangle}\sim\frac{1}{\sqrt N} \qquad (5)

where: σE=⟨(ΔE)2⟩\sigma_E=\sqrt{\langle(\Delta E)^2\rangle} — RMS energy fluctuation; NN — number of particles or degrees of freedom. For N∼1023N\sim10^{23} this ratio is ∼10−12\sim10^{-12}: microscopically the energy never stops fluctuating, macroscopically it is a fixed number. The generating-function viewpoint makes the pattern explicit: every cumulant of the energy is a derivative of ln⁡Z\ln Z in the source variable β\beta:

κn=(−1)n∂nln⁡Z∂βn,κ1=⟨E⟩,κ2=⟨(ΔE)2⟩,κ3=⟨(ΔE)3⟩(6)\kappa_n=(-1)^n\frac{\partial^n\ln Z}{\partial\beta^n},\qquad \kappa_1=\langle E\rangle,\quad \kappa_2=\langle(\Delta E)^2\rangle,\quad \kappa_3=\langle(\Delta E)^3\rangle \qquad (6)

where: κn\kappa_n — nn-th cumulant of the energy distribution. The mean (n=1n=1) and variance (n=2n=2) are just the first two members; the third measures skewness, which is why the near-Gaussian shape of P(E)P(E) is itself a consequence of the extensivity of ln⁡Z\ln Z.

Derivation AThe fluctuation–response relation — variance equals kBT2CVk_BT^2C_V, the owned result

This is the article's owned structural result, and it deserves a careful proof because the sign chain is where students lose marks. The goal is to show that the same object ln⁡Z\ln Z that generates the mean energy also generates its variance as the next derivative, and that this variance equals the measurable heat capacity kBT2CVk_BT^2C_V with the correct positive sign. The strategy is to differentiate ln⁡Z\ln Z twice with respect to β\beta, recognize the result as a variance (the second cumulant), rewrite it as minus the β\beta-derivative of the mean, and then carry the derivative from inverse temperature β\beta to temperature TT using dβ/dT=−1/kBT2\mathrm d\beta/\mathrm dT=-1/k_BT^2 — tracking both minus signs so they cancel.

Step 1. Differentiate ln⁡Z\ln Z once. −∂βln⁡Z=−1Z∂βZ=1Z∑iEie−βEi=⟨E⟩-\partial_\beta\ln Z=-\frac1Z\partial_\beta Z=\frac1Z\sum_iE_ie^{-\beta E_i}=\langle E\rangle. Why: the derivative pulls a factor −Ei-E_i into each term; the extra minus makes it +Ei+E_i, and division by ZZ turns the weighted sum into the ensemble average.

Step 2. Differentiate again, using the quotient rule on 1Z∂βZ\frac1Z\partial_\beta Z. ∂β2ln⁡Z=1Z∂β2Z−(1Z∂βZ)2=⟨E2⟩−⟨E⟩2=⟨(ΔE)2⟩\partial_\beta^2\ln Z=\frac1Z\partial_\beta^2 Z-\left(\frac1Z\partial_\beta Z\right)^2=\langle E^2\rangle-\langle E\rangle^2=\langle(\Delta E)^2\rangle. Why: the double derivative of ZZ delivers ⟨E2⟩\langle E^2\rangle, and the square of the first log-derivative delivers ⟨E⟩2\langle E\rangle^2; their difference is exactly the variance — the second cumulant.

Step 3. Rewrite the variance as a derivative of the mean. Since ⟨E⟩=−∂βln⁡Z\langle E\rangle=-\partial_\beta\ln Z, we have ⟨(ΔE)2⟩=∂β2ln⁡Z=−∂β⟨E⟩\langle(\Delta E)^2\rangle=\partial_\beta^2\ln Z=-\partial_\beta\langle E\rangle. Why: the variance is minus the rate at which the mean energy changes with inverse temperature — a response of the mean disguised as a fluctuation.

Step 4. Change variable from β\beta to TT. With β=1/kBT\beta=1/k_BT, the chain rule gives ∂β=dTdβ∂T=−kBT2 ∂T\partial_\beta=\frac{\mathrm dT}{\mathrm d\beta}\partial_T=-k_BT^2\,\partial_T (the derivative dT/dβ=−1/kBβ2=−kBT2\mathrm dT/\mathrm d\beta=-1/k_B\beta^2=-k_BT^2 is negative). Why: this is the single step where the factor kBT2k_BT^2 enters; forgetting it, or dropping the minus sign, is the classic error that wrecks the dimensions.

Step 5. Combine. ⟨(ΔE)2⟩=−∂β⟨E⟩=−(−kBT2∂T)⟨E⟩=kBT2 ∂T⟨E⟩=kBT2 CV\langle(\Delta E)^2\rangle=-\partial_\beta\langle E\rangle=-\left(-k_BT^2\partial_T\right)\langle E\rangle=k_BT^2\,\partial_T\langle E\rangle=k_BT^2\,C_V. The two minus signs cancel and CV=(∂⟨E⟩/∂T)V,NC_V=(\partial\langle E\rangle/\partial T)_{V,N} completes the relation. Why: the variance is necessarily non-negative, and kBT2>0k_BT^2>0. Therefore an ordinary canonical ensemble satisfies CV≥0C_V\ge0. Thus canonical statistical mechanics directly encodes the corresponding stability condition. *On the two-level system, ∂β2ln⁡Z=⟨E2⟩−⟨E⟩2=kBT2CV\partial_\beta^2\ln Z=\langle E^2\rangle-\langle E\rangle^2=k_BT^2C_V holds identically (confirmed symbolically), the chain-rule sign dT/dβ=−kBT2\mathrm dT/\mathrm d\beta=-k_BT^2 is correct, and the trap "variance =CV=C_V" (dropping kBT2k_BT^2) is false.*

Go deeper · Derivation B · 1 minWhy the energy is sharp: a monatomic ideal gas has relative fluctuation 2/(3N)\sqrt{2/(3N)}
Derivation BWhy the energy is sharp: a monatomic ideal gas has relative fluctuation 2/(3N)\sqrt{2/(3N)}

The goal here is to turn the abstract 1/N1/\sqrt N scaling into a concrete, checkable number for the monatomic ideal gas, and to see why the canonical ensemble (with its fluctuating energy) reproduces the microcanonical ensemble (with its fixed energy) for any macroscopic sample. The strategy is to feed the equipartition values of ⟨E⟩\langle E\rangle and CVC_V into the fluctuation relation, take the square root for σE\sigma_E, and form the ratio σE/⟨E⟩\sigma_E/\langle E\rangle — watching the NN's to see the suppression appear.

Step 1. Mean energy from equipartition. A monatomic atom has three quadratic translational degrees of freedom, each contributing 12kBT\tfrac12k_BT, so ⟨E⟩=32NkBT\langle E\rangle=\tfrac32Nk_BT. Why: equipartition gives 12kBT\frac12k_BT per quadratic degree of freedom, and the three momentum components contribute three such terms for each particle.

Step 2. Heat capacity. CV=∂⟨E⟩/∂T=32NkBC_V=\partial\langle E\rangle/\partial T=\tfrac32Nk_B, independent of temperature for the classical gas. Why: ⟨E⟩\langle E\rangle is linear in TT, so its temperature-derivative is a constant — the flat classical heat capacity.

Step 3. Variance. Insert into the fluctuation relation: ⟨(ΔE)2⟩=kBT2⋅32NkB=32N(kBT)2\langle(\Delta E)^2\rangle=k_BT^2\cdot\tfrac32Nk_B=\tfrac32N(k_BT)^2, so σE=32N kBT\sigma_E=\sqrt{\tfrac32N}\,k_BT. Why: the variance is proportional to NN, so the absolute RMS fluctuation grows as σE∝N\sigma_E\propto\sqrt N. The fluctuations therefore do not disappear; only their size relative to the extensive mean energy decreases.

Step 4. Form the ratio. σE⟨E⟩=32N kBT32NkBT=23N\dfrac{\sigma_E}{\langle E\rangle}=\dfrac{\sqrt{\tfrac32N}\,k_BT}{\tfrac32Nk_BT}=\sqrt{\dfrac{2}{3N}}. For N∼1023N\sim10^{23} this is ∼10−12\sim10^{-12}; for N=1N=1 it is 2/3≈0.816\sqrt{2/3}\approx0.816, an O(1)O(1) single-particle fluctuation. Why: the mean grows as NN but the spread only as N\sqrt N, so the relative width collapses as 1/N1/\sqrt N — the microscopic canonical energy is indistinguishable from the fixed microcanonical energy once NN is macroscopic, which is the whole justification for ensemble equivalence. *These results hold symbolically: CV=32NkBC_V=\tfrac32Nk_B and σE/⟨E⟩=2/(3N)\sigma_E/\langle E\rangle=\sqrt{2/(3N)}; numerically the ratio equals 8.2×10−138.2\times10^{-13} at N=1024N=10^{24} and 0.8160.816 at N=1N=1.*

Limiting cases

How the fluctuation relation behaves in the regimes that matter:

CaseResultMeaning
Macroscopic limitσE/⟨E⟩∼N−1/2→0\sigma_E/\langle E\rangle\sim N^{-1/2}\to0Relative fluctuations vanish; canonical and microcanonical ensembles agree; EE is effectively sharp.
Classical ideal gas⟨(ΔE)2⟩=32N(kBT)2\langle(\Delta E)^2\rangle=\tfrac32N(k_BT)^2With ⟨E⟩=32NkBT\langle E\rangle=\tfrac32Nk_BT gives σE/⟨E⟩=2/3N\sigma_E/\langle E\rangle=\sqrt{2/3N} — the textbook check.
Near a critical pointCV→∞⇒⟨(ΔE)2⟩→∞C_V\to\infty\Rightarrow\langle(\Delta E)^2\rangle\to\inftyEnergy fluctuations become anomalously large and critical correlations can make P(E)P(E) non-Gaussian near a continuous phase transition.
Stability bound⟨(ΔE)2⟩≥0⇒CV≥0\langle(\Delta E)^2\rangle\ge0\Rightarrow C_V\ge0Variance positivity forces non-negative heat capacity — stability from statistics.
Low-TT quantum limitCV→0⇒⟨(ΔE)2⟩→0C_V\to0\Rightarrow\langle(\Delta E)^2\rangle\to0Third law: the system freezes into its ground state and energy fluctuations are quenched.

Worked examples

1 · The energy jitter of a mole of gas (a real number)

One mole of a monatomic ideal gas (argon, helium — the species does not matter) sits in a thermostat at T=300 KT=300\ \mathrm K. Compute its internal energy UU, the RMS energy fluctuation σE\sigma_E in joules, and the relative fluctuation σE/U\sigma_E/U. Is the energy "sharp"?

Step 1. Enumerate the inputs: N=NA=6.022×1023N=N_A=6.022\times10^{23}, T=300 KT=300\ \mathrm K, kB=1.381×10−23 J/Kk_B=1.381\times10^{-23}\ \mathrm{J/K}.

Step 2. Internal energy. U=32NkBT=32(6.022×1023)(1.381×10−23)(300)=3741 J (3.74 kJ)U=\tfrac32Nk_BT=\tfrac32(6.022\times10^{23})(1.381\times10^{-23})(300)=\mathbf{3741\ J}\ (3.74\ \mathrm{kJ}).

Step 3. Heat capacity and variance. CV=32NkB=12.47 J/KC_V=\tfrac32Nk_B=12.47\ \mathrm{J/K}; the variance is ⟨(ΔE)2⟩=kBT2CV=(1.381×10−23)(300)2(12.47)=1.55×10−17 J2\langle(\Delta E)^2\rangle=k_BT^2C_V=(1.381\times10^{-23})(300)^2(12.47)=1.55\times10^{-17}\ \mathrm J^2, so σE=1.55×10−17=3.94×10−9 J\sigma_E=\sqrt{1.55\times10^{-17}}=\mathbf{3.94\times10^{-9}\ J}.

Step 4. The boundary number. The relative fluctuation is σE/U=(3.94×10−9)/(3741)=1.05×10−12\sigma_E/U=(3.94\times10^{-9})/(3741)=\mathbf{1.05\times10^{-12}}, which matches 2/(3NA)=1.05×10−12\sqrt{2/(3N_A)}=1.05\times10^{-12} exactly. So the energy of a mole of gas fluctuates by only about four nanojoules — one part in 101210^{12} of its total. The energy is sharp to twelve decimal places; this is precisely why we can speak of "the" internal energy of a macroscopic system and why the canonical and microcanonical ensembles give identical thermodynamics.

2 · A two-level paramagnet: fluctuations of a finite-gap system (exam level)

N=1020N=10^{20} non-interacting two-level systems (a paramagnetic salt) each have a ground state at 00 and an excited state at ε=1 meV\varepsilon=1\ \mathrm{meV}. At the temperature where kBT=εk_BT=\varepsilon (i.e. βε=1\beta\varepsilon=1), find the per-system energy variance, the total RMS fluctuation, and the relative fluctuation. Compare its size to Example 1.

Step 1. Per-system variance from the closed form. For a two-level system, ⟨(ΔE)2⟩1=ε2eβε(eβε+1)2\langle(\Delta E)^2\rangle_1=\varepsilon^2\dfrac{e^{\beta\varepsilon}}{(e^{\beta\varepsilon}+1)^2}. At βε=1\beta\varepsilon=1 with ε=1.602×10−22 J\varepsilon=1.602\times10^{-22}\ \mathrm J: ⟨(ΔE)2⟩1=ϵ2eβϵ(eβϵ+1)2=(1.602×10−22)2(0.1966)=5.05×10−45 J2\langle(\Delta E)^2\rangle_1 = \frac{\epsilon^2e^{\beta\epsilon}}{(e^{\beta\epsilon}+1)^2} = (1.602\times10^{-22})^2(0.1966) = 5.05\times10^{-45}\,\mathrm{J^2}.

Step 2. Total variance and RMS. Independent systems add variances: ⟨(ΔE)2⟩=N⟨(ΔE)2⟩1=1020(5.05×10−45)=5.05×10−25 J2\langle(\Delta E)^2\rangle=N\langle(\Delta E)^2\rangle_1=10^{20}(5.05\times10^{-45})=5.05\times10^{-25}\ \mathrm J^2, so σE=5.05×10−25=7.10×10−13 J\sigma_E=\sqrt{5.05\times10^{-25}}=\mathbf{7.10\times10^{-13}\ J}.

Step 3. Mean energy and ratio. Each system has ⟨E⟩1=ε/(eβε+1)=1.602×10−22/(e+1)=4.31×10−23 J\langle E\rangle_1=\varepsilon/(e^{\beta\varepsilon}+1)=1.602\times10^{-22}/(e+1)=4.31\times10^{-23}\ \mathrm J, so U=N⟨E⟩1=4.31×10−3 JU=N\langle E\rangle_1=4.31\times10^{-3}\ \mathrm J and σE/U=(7.10×10−13)/(4.31×10−3)=1.65×10−10\sigma_E/U=(7.10\times10^{-13})/(4.31\times10^{-3})=\mathbf{1.65\times10^{-10}}.

Step 4. The boundary check. The closed form of the ratio is σE/U=eβε/N=e/1020=1.65×10−10\sigma_E/U=\sqrt{e^{\beta\varepsilon}}/\sqrt N=\sqrt e/\sqrt{10^{20}}=1.65\times10^{-10} at βε=1\beta\varepsilon=1 — the 1/N1/\sqrt N law again, with an O(1)O(1) prefactor set by the spectrum. It is larger than Example 1's 10−1210^{-12} only because NN is a thousand times smaller (102010^{20} vs 102310^{23}); the relative fluctuation is still utterly negligible. Change the level gap or the temperature and the prefactor moves, but the 1/N1/\sqrt N suppression is universal — the reason any macroscopic system has a well-defined energy.

Origins · 1 minalbert einstein and how this was discovered
AE
albert einstein
1879–1955 · Bern/Berlin

Between 1902 and 1904 Albert Einstein, working alone and largely unaware of Gibbs's contemporaneous Elementary Principles (1902), rebuilt the foundations of statistical mechanics in three Annalen der Physik papers. In the third, published in 1904, he derived the mean-square energy fluctuation of a system in thermal contact with a reservoir and obtained exactly the relation of this article, ⟨(ΔE)2⟩=kBT2 CV\langle(\Delta E)^2\rangle=k_BT^2\,C_V (he wrote it as ⟨ε2⟩=kBT2 dE/dT\langle\varepsilon^2\rangle=k_B T^2\,\mathrm dE/\mathrm dT). For Einstein this was not a technical footnote but a weapon: fluctuations are observable consequences of the atomic hypothesis, a way to make molecules leave fingerprints on macroscopic measurements. He turned the same idea loose on radiation and on suspended particles — the 1905 theory of Brownian motion computes the fluctuations of a colloidal grain and predicts a measurable mean-square displacement, later confirmed by Perrin and used to pin down Avogadro's number. In 1910, with Smoluchowski, he applied density fluctuations to explain critical opalescence, the milky scattering of light near a liquid–gas critical point where the compressibility (and hence the fluctuations) diverge. The through-line of Einstein's statistical work is this article's thesis: a spontaneous fluctuation is not noise to be averaged away but a direct, quantitative window onto the microscopic world.

History
1902
— Gibbs's Elementary Principles in Statistical Mechanics formalizes ensembles and the canonical distribution.
1904
— Einstein derives the energy-fluctuation formula ⟨ΔE²⟩ = k_BT²·dE/dT for a system in a heat bath.
1905
— Einstein's theory of Brownian motion applies fluctuation ideas to suspended particles, predicting mean-square displacement.
1908
— Smoluchowski develops the statistical theory of density fluctuations and opalescence.
1910
— Einstein and Smoluchowski explain critical opalescence via diverging density fluctuations near the critical point.

Going further

References. Pathria & Beale, Statistical Mechanics, 3rd ed., §3.6 (Energy fluctuations in the canonical ensemble) · Kardar, Statistical Physics of Particles, Ch. 4 · Reif, Fundamentals of Statistical and Thermal Physics, §6.5 · Sethna, Statistical Mechanics: Entropy, Order Parameters, and Complexity, Ch. 6 · Landau & Lifshitz, Statistical Physics Part 1, §112 · Einstein, Ann. Phys. 14 (1904) 354 (fluctuation theory). The two generating-function relations ⟨E⟩=−∂βln⁡Z\langle E\rangle=-\partial_\beta\ln Z and ⟨(ΔE)2⟩=∂β2ln⁡Z\langle(\Delta E)^2\rangle=\partial_\beta^2\ln Z follow by direct differentiation of Z=∑ie−βEiZ=\sum_ie^{-\beta E_i}; the conversion ⟨(ΔE)2⟩=kBT2CV\langle(\Delta E)^2\rangle=k_BT^2C_V uses dβ/dT=−1/kBT2\mathrm d\beta/\mathrm dT=-1/k_BT^2. Key checkpoints: the two-level identity ∂β2ln⁡Z=⟨E2⟩−⟨E⟩2=kBT2CV\partial_\beta^2\ln Z=\langle E^2\rangle-\langle E\rangle^2=k_BT^2C_V (symbolic); the ideal-gas results ⟨E⟩=32NkBT\langle E\rangle=\tfrac32Nk_BT, CV=32NkBC_V=\tfrac32Nk_B, σE/⟨E⟩=2/3N\sigma_E/\langle E\rangle=\sqrt{2/3N}; and the worked-example figures (U=3741 JU=3741\ \mathrm J, σE=3.94×10−9 J\sigma_E=3.94\times10^{-9}\ \mathrm J, σE/U=1.05×10−12\sigma_E/U=1.05\times10^{-12} for a mole at 300 K; σE/U=1.65×10−10\sigma_E/U=1.65\times10^{-10} for 102010^{20} two-level systems at βε=1\beta\varepsilon=1). kBk_B, NAN_A (CODATA).

Builds on: Canonical Ensemble · Boltzmann Factor · Canonical Partition Function · Thermodynamic Quantities from the Partition Function. Leads to: Heat Capacity and Fluctuation-Response Relation · Grand Canonical Ensemble · Helmholtz Free Energy from the Partition Function.

Where exactly does the factor of k_BT² come from — I keep losing it?

It comes from one place and one place only: the change of variable from inverse temperature β\beta to temperature TT. The variance is naturally an object in β\beta, namely ⟨(ΔE)2⟩=−∂β⟨E⟩\langle(\Delta E)^2\rangle=-\partial_\beta\langle E\rangle. But the heat capacity is defined as a TT-derivative, CV=∂T⟨E⟩C_V=\partial_T\langle E\rangle. To connect them you use the chain rule with β=1/kBT\beta=1/k_BT, so dβ/dT=−1/kBT2\mathrm d\beta/\mathrm dT=-1/k_BT^2, which means ∂β=−kBT2 ∂T\partial_\beta=-k_BT^2\,\partial_T. Substituting gives ⟨(ΔE)2⟩=−(−kBT2∂T)⟨E⟩=kBT2CV\langle(\Delta E)^2\rangle=-(-k_BT^2\partial_T)\langle E\rangle=k_BT^2C_V. The two minus signs cancel. A quick way never to lose it: check units. A variance is J2\mathrm J^2; CVC_V is J/K\mathrm J/\mathrm K; the only way to make J/K\mathrm J/\mathrm K into J2\mathrm J^2 is to multiply by something with units J⋅K\mathrm{J\cdot K}, and kBT2k_BT^2 has exactly those units ((J/K)⋅K2=J⋅K(\mathrm J/\mathrm K)\cdot\mathrm K^2=\mathrm{J\cdot K}). If your answer's units don't come out as energy-squared, you dropped the factor.

The absolute fluctuation grows with N but the relative one shrinks — how can both be true?

Both are true and there is no contradiction — they are answering different questions. The absolute fluctuation is σE=⟨(ΔE)2⟩\sigma_E=\sqrt{\langle(\Delta E)^2\rangle}. Since the variance is extensive (⟨(ΔE)2⟩∝N\langle(\Delta E)^2\rangle\propto N, because independent subsystems add their variances), σE∝N\sigma_E\propto\sqrt N — it grows without bound as you add particles. The relative fluctuation is σE/⟨E⟩\sigma_E/\langle E\rangle. Since the mean energy is also extensive (⟨E⟩∝N\langle E\rangle\propto N), the ratio is N/N=1/N\sqrt N/N=1/\sqrt N — it shrinks toward zero. So a bigger system jitters by a larger number of joules, but that jitter is a smaller and smaller fraction of its total energy. When we say "the energy of a macroscopic system is sharp," we mean the fraction is negligible (10−1210^{-12} for a mole), not that the absolute fluctuation is zero. This is the law of large numbers: sums of many independent variables have means that grow like NN and spreads that grow like N\sqrt N.

Why does a diverging heat capacity signal a phase transition?

Through the fluctuation relation directly. If CV→∞C_V\to\infty, then ⟨(ΔE)2⟩=kBT2CV→∞\langle(\Delta E)^2\rangle=k_BT^2C_V\to\infty as well — the energy fluctuations, instead of being a tiny 1/N1/\sqrt N fraction of the mean, become macroscopic. Physically this means the system can no longer decide on an energy: it wanders over an extensive range, which is exactly what happens when two phases (say liquid and gas) coexist or when a system is poised at a critical point where correlations extend across the whole sample. At a continuous (second-order) transition CVC_V typically diverges as a power law ∣T−Tc∣−α|T-T_c|^{-\alpha}, and the near-Gaussian P(E)P(E) broadens and develops non-negligible higher cumulants (the skewness κ3\kappa_3 and beyond stop being small). At a first-order transition P(E)P(E) becomes bimodal — two peaks for the two coexisting phases with different energies. So the innocuous-looking equation ⟨(ΔE)2⟩=kBT2CV\langle(\Delta E)^2\rangle=k_BT^2C_V is precisely the bridge that lets a calorimeter detect a phase transition, and lets a simulation locate TcT_c by watching the energy variance spike.

Is ⟨(ΔE)²⟩ = k_BT²C_V exact, or only an approximation?

It is exact — no assumption of a Gaussian distribution, no thermodynamic limit required. It follows from just two things: the canonical probability pi=e−βEi/Zp_i=e^{-\beta E_i}/Z and the definitions of mean and variance. Differentiating ln⁡Z\ln Z twice gives ⟨E2⟩−⟨E⟩2\langle E^2\rangle-\langle E\rangle^2 identically, and the chain rule gives kBT2CVk_BT^2C_V identically. It holds for a single particle, a two-level system, or a strongly interacting fluid at a critical point — anywhere the canonical ensemble applies. What is approximate is the separate claim that P(E)P(E) is Gaussian: that shape (with width kBT2CV\sqrt{k_BT^2C_V}) is the leading term of an expansion valid when higher cumulants are small, i.e. large NN away from criticality. Keep the two ideas distinct: the variance formula is exact, while the Gaussian shape of the energy distribution is the large-NN approximation.

How is this the “fluctuation–response” or “fluctuation–dissipation” relation people talk about?

Because it has the universal form of that whole family: a spontaneous fluctuation of a quantity equals kBTk_BT times a susceptibility describing how that quantity responds to its conjugate field. Here the fluctuating quantity is the energy EE, the conjugate "field" is (inverse) temperature β\beta, and the susceptibility is the heat capacity. The same skeleton appears everywhere: magnetization fluctuations equal kBTk_BT times the magnetic susceptibility (⟨(ΔM)2⟩=kBT χ\langle(\Delta M)^2\rangle=k_BT\,\chi); density fluctuations equal kBTk_BT times the compressibility; the current noise in a resistor equals kBTk_BT times its conductance (Johnson–Nyquist noise); a Brownian particle's velocity fluctuations relate to its friction (the Einstein relation). All are instances of the fluctuation–dissipation theorem, and the energy–heat-capacity relation of this article is the simplest and historically first member — the one Einstein derived in 1904. It says the jitter of a system in equilibrium and its response to a perturbation are two faces of the same microscopic physics.

Does this formula still work in the grand canonical ensemble or with volume changes?

Not unchanged — you have to be careful about what is held fixed. The relation ⟨(ΔE)2⟩=kBT2CV\langle(\Delta E)^2\rangle=k_BT^2C_V is derived for the canonical ensemble, where volume VV and particle number NN are fixed and only energy is exchanged with the bath; that is why the heat capacity is the constant-volume, constant-N one, CV=(∂⟨E⟩/∂T)V,NC_V=(\partial\langle E\rangle/\partial T)_{V,N}. If the system can also exchange particles with a reservoir (the grand canonical ensemble), then NN fluctuates too, the energy fluctuations pick up an additional contribution correlated with the particle-number fluctuations, and the simple formula is replaced by a more elaborate one involving both CVC_V and the number-fluctuation susceptibility. Likewise, if the volume is allowed to fluctuate (an isobaric ensemble), enthalpy rather than energy is the natural variable and CpC_p replaces CVC_V. The lesson is that each fluctuation formula is tied to a specific ensemble and a specific set of fixed variables; the canonical energy-variance relation is the cleanest because only one quantity (energy) fluctuates. The particle-number version is the subject of the companion article on grand-canonical fluctuations.

Before this

Where this leads