Equilibrium heat capacity of interconverting states (source code)

= Equilibrium heat capacity of interconverting states
{title2=$C_V=N\sum_i x_ic_i+N\operatorname{Var}_i(u_i)/(k_{\rm B}T^2)$}

For independent particles with interconverting state families $i$, the equilibrium <partition function> is a sum $q=\sum_iq_i$ and the family probabilities are $x_i=q_i/q$. Let $u_i$ be the conditional mean one-particle <energy> in family $i$ and $c_i=du_i/dT$. The total <canonical energy variance> separates into within-family and between-family contributions, giving
$$
C_V=N\sum_i x_ic_i+\frac{N}{k_{\rm B}T^2}\left[\sum_i x_iu_i^2-\left(\sum_i x_iu_i\right)^2\right].
$$
The final positive term is absent if family fractions are held fixed. A <frozen ortho-para mixture> and an equilibrating mixture can therefore have different <heat capacities> at the same instantaneous composition.