Statistical Mechanics
Probability Distributions
Why averaging over 10^23 degrees of freedom gives sharper predictions than tracking three.
Updated May 2026
There is something faintly absurd about statistical mechanics working at all. A litre of gas contains something like molecules. We cannot write down their positions, we cannot measure their velocities, and if we could solve the resulting coupled equations the answer would be useless. And yet the pressure that gas exerts on its container is so reliable you can build an engine on it.
The resolution is that the difficulty inverts. Three bodies interacting gravitationally is a famously unsolved problem. Ten to the twenty-three bodies bouncing off each other is straightforward, because we stop asking about the bodies and start asking about the distribution.
Microstates and macrostates
Definition
Microstate
A complete specification of the system: every position and every momentum. For classical particles in three dimensions that is a single point in a -dimensional phase space.
Definition
Macrostate
A specification in terms of the few quantities we actually measure: energy, volume, particle number. Enormously many microstates correspond to the same macrostate.
The whole subject turns on that last sentence. Write for the number of microstates consistent with a macrostate of energy . The fundamental postulate of statistical mechanics is that an isolated system in equilibrium is equally likely to be found in any of them:
This is not derived. It is the assumption the rest of the subject rests on, and the argument for it is retrospective: the predictions that follow from it agree with experiment.

A system's history is a curve through phase space. Conservation of energy confines that curve to a surface; the ergodic hypothesis says it eventually visits all of it.
Why the average becomes the certainty
The reason large numbers help is that the distribution of a sum sharpens as you add terms. For independent contributions, the mean grows like and the standard deviation like , so the relative fluctuation goes as
That single factor is why thermodynamics looks deterministic. The fluctuations have not gone away. They are simply smaller than anything we can measure.
The Boltzmann distribution
Now put our system in contact with a much larger reservoir at temperature . The combined system is isolated, so the fundamental postulate applies to it. Counting the reservoir's microstates when our system holds energy and expanding the reservoir's entropy to first order gives the single most useful formula in the subject:
Theorem
Partition function
The normalising constant
is not merely bookkeeping. Every thermodynamic quantity can be extracted from it by differentiation. It encodes the entire equilibrium behaviour of the system.
For instance the mean energy is a derivative of :
which is worth checking by hand once, because it makes clear that is a generating function and the thermodynamics is just its moments.

Occupation falls exponentially with energy. Raising flattens the curve, so high states become accessible, but the ordering never changes.
Three distributions, one derivation
Which distribution a system obeys depends only on what its particles are allowed to do when they meet.
| Occupancy | Distribution | |
|---|---|---|
| Maxwell–Boltzmann | distinguishable, unlimited | |
| Bose–Einstein | identical, unlimited | |
| Fermi–Dirac | identical, at most one |
The three differ by a sign and a rule about double occupancy, and that is enough to separate an ideal gas from a superfluid from the electrons in a metal.

At high energy all three converge, which is the classical limit. They differ only where occupation approaches unity and quantum statistics start to matter.
At low temperature they diverge completely. Fermions cannot share a state, so they stack upward and fill a Fermi sea. Bosons have no such restriction and collapse into the ground state together.

Below a macroscopic fraction of a Bose gas occupies a single quantum state. The narrow peak is not a lot of particles that happen to be nearby; it is a lot of particles in the same state.
What to take away
Statistical mechanics does not predict what any particle will do. It predicts what of them will do together, and the prediction is sharper than any measurement we can make. So the determinism of thermodynamics is statistical rather than mechanical, and the distinction is one you can state but not measure.