The compressibility equation () can be derived from the density fluctuations of the grand canonical ensemble (Eq. 3.16 \cite{RPP_1965_28_0169}).
For a homogeneous system:
where is the par distribution function.
For a spherical potential
Note that the compressibility equation, unlike the energy and pressure equations,
is valid even when the inter-particle forces are not pairwise additive.
References