= Solution
A <microstate> specifies the microscopic state: classically the positions and momenta of all particles, or quantum mechanically an allowed many-body state. A <macrostate> specifies a few coarse variables such as <energy>, <volume> and particle number. Many <microstates> can give the same <macrostate>. A <statistical ensemble> is a <probability> assignment over hypothetical copies prepared with the same macroscopic constraints; it does not require a sample to be literally divided into many physical copies. An observable's ensemble mean is $\langle A\rangle=\sum_i p_iA_i$, with an integral replacing the sum in classical <phase space>.
For an isolated system at fixed $U,V,N$, the <microcanonical ensemble> assigns equal <probability> to accessible <microstates> in a narrow <energy> shell. If their number is $\Omega(U,V,N)$, the <Boltzmann entropy> is $S=k_B\ln\Omega$. Thermal contact between two initially isolated systems allows <energy> to be shared while their sum stays fixed. The most probable division maximizes $S_1(U_1)+S_2(U-U_1)$, so equilibrium requires equal $\partial S/\partial U$. This gives the statistical <temperature> definition
$$
\boxed{\frac1T=\left(\frac{\partial S}{\partial U}\right)_{V,N},\qquad
\beta=\frac1{k_BT}=\left(\frac{\partial\ln\Omega}{\partial U}\right)_{V,N}.}
$$
For positive <temperature>, <energy> tends to <flow> from lower <entropy> slope to higher <entropy> slope until those slopes agree. The narrow energy-shell width represents macroscopic resolution; it must not exclude the physically accessible states.
For a small subsystem exchanging <energy> with a much larger bath, the bath has <energy> $U_{\rm tot}-E_i$ when subsystem <microstate> $i$ has <energy> $E_i$. Expanding its <entropy> gives $S_b(U_{\rm tot}-E_i)=S_b(U_{\rm tot})-E_i/T+\cdots$. Counting compatible bath states therefore yields the <Boltzmann distribution> and <canonical ensemble>:
$$
p_i=\frac{e^{-\beta E_i}}Z,\qquad Z=\sum_i e^{-\beta E_i},\qquad
U=-\frac{\partial\ln Z}{\partial\beta},\qquad F=-k_BT\ln Z.
$$
The exponential weights individual <microstates>. An <energy> level of degeneracy $g_j$ has total <probability> $g_je^{-\beta E_j}/Z$; a more degenerate excited level can outweigh one ground-state level even though each of its <microstates> is less probable. The <Gibbs entropy> $-k_B\sum_i p_i\ln p_i$ gives $S=k_B\ln Z+U/T$. The equilibrium <energy> <variance> is $\langle(\Delta E)^2\rangle=k_BT^2c_V$, linking measurable fluctuations to a macroscopic response.
If particle exchange is also allowed, a reservoir fixes $T$ and <chemical potential> $\mu$. The <grand canonical ensemble> weights a state by $e^{-\beta(E_i-\mu N_i)}/\Xi$, with $\Xi=\sum_{N,i}e^{-\beta(E_i-\mu N)}$. Mean particle number is $k_BT\,\partial\ln\Xi/\partial\mu$, while <volume> remains a constraint in this version. Thus the ensemble follows the physical exchange conditions: fixed <energy>, thermal contact, or thermal and particle contact.
In ordinary large short-range systems, relative fluctuations often decrease as $N^{-1/2}$ and the ensembles give the same bulk thermodynamics away from singular limits. Finite systems, critical fluctuations and long-range interactions require care. Interpreting a time average as an <ensemble average> additionally requires appropriate sampling or mixing dynamics; it is not guaranteed solely by naming an ensemble. <thermal equilibrium> <probability> assignments do not describe every driven or relaxing state.
Back to article page