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:
)   can be derived from the density fluctuations of the grand canonical ensemble (Eq. 3.16 \cite{RPP_1965_28_0169}).
For a homogeneous system:
![{\displaystyle kT\left.{\frac {\partial \rho }{\partial P}}\right\vert _{T}=1+\rho \int h(r)~{\rm {d}}r=1+\rho \int [{\rm {g}}^{(2)}(r)-1]{\rm {d}}r={\frac {\langle N^{2}\rangle -\langle N\rangle ^{2}}{\langle N\rangle }}=\rho k_{B}T\chi _{T}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/9500b9cded7df21fe7a8024dd8225f6b72d19cfc) 
where  is the par distribution function.
For a spherical potential
 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