Skip to main content
Sandbox Physics
Volume 5 · Heat, Probability and Matter

How do probabilities determine a system's thermal averages?

Normalize Boltzmann weights to predict level populations. Use the same probabilities to calculate thermal averages and fluctuations.

Before you start: Chapter 2 on histograms and Chapter 4 on entropy.

After this chapter you can: Calculate a partition sum and use it to find state probabilities, mean energy and energy variance.

At thermal equilibrium with a large heat bath, each microstate has a weight that falls exponentially with its energy. A higher energy level can still hold more of the population if many microstates share it. Normalizing the weights lets you calculate averages and the size of their fluctuations.

6.1 Turn the bath's entropy into a probability

Consider a small system that exchanges energy with a large bath at absolute temperature TT. The two together are isolated. If the system gains energy EiE_i in microstate ii, the bath has that much less energy. For a bath large enough to keep its temperature nearly fixed, its entropy changes by about −Ei/T-E_i/T relative to the chosen zero for system energy.

The number of bath states is proportional to the exponential of its entropy divided by kBk_B. This gives the relative weight of microstate ii. Divide by the sum of all weights to make the probabilities add to one.

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

The factor e−βEie^{-\beta E_i} is the Boltzmann weight. The normalization ZZ is the partition function. Adding the same constant to every energy multiplies each weight and their sum by the same factor, leaving the probabilities unchanged.

6.2 Count every state at the same energy

Set a ground level to energy zero and an excited level to energy Δ\Delta. The ground level contains one microstate. If gg microstates share the excited energy, their probabilities add. With dimensionless temperature ϑ=kBT/Δ\vartheta=k_BT/\Delta,

Z=1+ge−βΔ,Pexc=ge1/ϑ+g.Z=1+g e^{-\beta\Delta},\qquad P_{\mathrm{exc}}=\frac{g}{e^{1/\vartheta}+g}.

The count gg is the degeneracy of the excited level. At ϑ=1\vartheta=1, a single excited state gives probability 0.2690.269. Three excited states at the same energy give total probability 0.5250.525. Each individual excited state is still less likely than the ground state.

Table 6.1 Calculated probability of finding the system at the excited energy for two state counts.
Dimensionless temperatureOne excited stateThree excited states
0.500.500.1190.1190.2890.289
1.001.000.2690.2690.5250.525
2.002.000.3780.3780.6450.645
  • One excited state
  • Three excited states
Excited-level probability as temperature and the state count changeBoth curves rise from zero. Three states at the excited energy give a higher probability than one state at every positive temperature. At thermal energy equal to the gap the two probabilities are about 0.52 and 0.27.

Figure 6.1 Analytic excited-level probabilities for one ground microstate and either one or three excited microstates. The energy gap stays fixed. The vertical axis counts all the probability at the excited energy.

6.3 Use the probabilities for averages and fluctuations

Multiply a quantity's value in each state by that state's probability and sum. For the energy, the first and second moments give the mean and variance.

⟨E⟩=∑ipiEi,Var⁡(E)=∑ipiEi2−⟨E⟩2.\langle E\rangle=\sum_i p_i E_i,\qquad \operatorname{Var}(E)=\sum_i p_i E_i^2-\langle E\rangle^2.

In the example, the mean energy is ΔPexc\Delta P_{\mathrm{exc}} and the variance is Δ2Pexc(1−Pexc)\Delta^2 P_{\mathrm{exc}}(1-P_{\mathrm{exc}}). At low temperature, the system is almost always near the ground energy. At higher temperature both levels can have substantial probability, so individual observations can differ substantially from the mean.

For a system at fixed volume and particle count with temperature-independent energies, differentiating the normalized weights gives

CV=∂⟨E⟩∂T=Var⁡(E)kBT2.C_V=\frac{\partial\langle E\rangle}{\partial T} =\frac{\operatorname{Var}(E)}{k_BT^2}.

CVC_V is the total heat capacity, in J K−1\mathrm{J\,K^{-1}}. This connects an equilibrium fluctuation to the response of the mean energy to a small change in temperature. A sample variance from a short, correlated run may differ from this equilibrium variance.

6.4 See two ways to obtain a distribution

6.4.1 Sample a spin lattice at fixed temperature

Open Ising Critical Fluctuations. The model has spins on a square lattice. Neighbouring spins have lower energy when they align. The program proposes a randomly chosen spin flip. It accepts a flip that lowers the energy or leaves it unchanged, and accepts an energy increase ΔE\Delta E with probability e−ΔE/(kBT)e^{-\Delta E/(k_BT)}. The energy-increasing proposal and its reverse have the same proposal probability. The acceptance rule gives their forward and reverse transitions the ratio required by the Boltzmann weights.

Choose Order survives, then Heat breaks the patches. Compare the visible domains and Energy per spin. Both use a 32×3232\times32 lattice and zero applied field. Lower temperature makes energy-increasing flips rare, so aligned regions persist. At higher temperature disordering flips are more common.

Table 6.2 Example means from the model's first 96 recorded sweeps after warm-up. Energy is in units of the coupling JJ per spin.
PresetTemperature kBT/Jk_BT/JMean energy per spin divided by JJ
Order survives1.501.50−1.952-1.952
Heat breaks the patches4.204.20−0.520-0.520

Consecutive sweeps share much of the same configuration. The table describes these particular model samples. It takes longer runs and checks for equilibration to estimate an equilibrium average or its uncertainty.

6.4.2 Group motions by speed in a gas

Open Hard Spheres to Boltzmann and turn on Statistical lens. Follow one particle while watching the empirical speed histogram change. The bodies move in two dimensions. For a classical equilibrium velocity in two dimensions, the ring of velocity vectors with the same speed has circumference proportional to vv. The thermal speed density is therefore proportional to ve−mv2/(2kBT)v e^{-mv^2/(2k_BT)}. In the three-dimensional example in Chapter 2, the shell area gave the factor v2v^2 instead.

The curve in this Lab uses the current mean speed to set its scale. Compare its shape with the fluctuating histogram. The two-dimensional gas visualization follows elastic collisions. The spin experiment uses a sampling rule with a prescribed temperature.

6.5 Exercises

  1. Two individual microstates differ by 2kBT2k_BT in energy. What is the higher-to-lower probability ratio?
  2. One ground state has energy zero. Two excited states have the same energy Δ\Delta. Write the partition function and the probability of being at the excited energy.
  3. Why does adding a constant to all energies leave every state probability fixed?
  4. In the model with one ground state and three excited states, what fraction of the population goes to the excited level in the high-temperature limit?
  5. In the high-temperature limit, a one-ground, one-excited system has Pexc=1/2P_{\mathrm{exc}}=1/2. What are the mean energy and its variance in terms of Δ\Delta?
  6. Two systems at the same temperature have different energy variances at fixed volume and particle count. Which has the greater equilibrium heat capacity under the conditions of §6.3?
  7. For an upward energy move in the spin model, does heating make acceptance more or less likely? Use the sign of the energy change.
  8. Why should you distinguish a two-dimensional speed distribution from a three-dimensional one for the same particle mass and temperature?
Exercise 1

The ratio is e−2≈0.135e^{-2}\approx0.135. The partition function cancels in the ratio.

Exercise 2

The partition function is Z=1+2e−βΔZ=1+2e^{-\beta\Delta}. The excited-energy probability is 2e−βΔ/Z2e^{-\beta\Delta}/Z because it sums the probabilities of two states.

Exercise 3

The shift multiplies every weight by a common factor. It multiplies the partition function by that factor too, so it cancels.

Exercise 4

At very high temperature all four states approach equal probability. Three are excited states, so their total fraction approaches 3/43/4.

Exercise 5

The mean is Δ/2\Delta/2. The second moment is Δ2/2\Delta^2/2. Subtracting the squared mean gives variance Δ2/4\Delta^2/4.

Exercise 6

The system with greater variance has greater CVC_V, since both share the same factor 1/(kBT2)1/(k_BT^2).

Exercise 7

It becomes more likely. For ΔE>0\Delta E>0, increasing temperature moves −ΔE/(kBT)-\Delta E/(k_BT) toward zero and raises its exponential.

Exercise 8

The equilibrium energy weight is the same for the same kinetic energy. The number of velocity states in a given speed interval grows differently with speed in the two cases. A ring gives the factor vv, and a spherical shell gives v2v^2.

Test it in the Lab

Change one setting at a time, then compare what you see with the tables and answers in this chapter.

Ising Critical Fluctuations →Heat a sheet of tiny magnets and watch its domains break apart. Paint a patch directly on the lattice, then compare its survival at different temperatures and sizes.Hard Spheres to Boltzmann →Every sphere on the left moves by deterministic elastic collisions. The upper-right view drops particle identities and keeps only the speed distribution. The lower-right view weaves one particle’s past collisions into a graph, and a violet recollision closes it into a correlation loop.

Sources and reading scope

  1. MIT 8.044 Statistical Physics I, Notes on the Canonical Ensemble

    The notes derive canonical weights from a system in contact with a thermal reservoir and interpret the partition sum and its derivatives.

  2. Nicholas Metropolis et al., Equation of State Calculations by Fast Computing Machines

    The original report describes accepting or rejecting proposed moves to sample configurations with the Boltzmann weight.

  3. OpenStax, University Physics Volume 2, §2.4 Distribution of Molecular Speeds

    The distribution gives the most probable, mean and root-mean-square speeds and shows how they depend on temperature.

Keep reading

What this page links to directly

See this series on the content map →

Interactive Physics Textbook · Reading path

Heat, Probability and Matter

  1. ArticleWhen does a thermometer represent the sample temperature?
  2. ArticleHow do molecular collisions create pressure?
  3. ArticleHow do heat and work change internal energy?
  4. ArticleWhy does heat flow spontaneously from hot to cold?
  5. ArticleHow much work can a heat engine deliver in one cycle?
  6. You are hereHow do probabilities determine a system's thermal averages?
1 more group

Other articles that use the same experiments

Each experiment from this article that another series also uses, followed by the articles there.

  1. LabIsing Critical Fluctuations
  2. ArticleWhy very different materials behave alike near a critical point
Something broken, confusing, or missing on this page?Tell us
What kind of feedback?

Sent with this page’s address, its Lab ID, the site language and your device type. Please leave out personal details. Feedback is kept for up to 12 months.Privacy policy