Why is pair distribution function equal to the Boltzmann factor? On my statistical physics book it is written that the probability of finding two molecules at distance $r$ is not influenced by the presence of the other molecules, and for this reason, without any other explanation, the  author says that:
$$g(r)=\exp(-\beta u(r)) \quad ,$$
where
$g(r)$ is the pair distribution function
$u(r)$ is the potential energy of a pair of molecules at distance r.
I don't understand why the fact that the the probability of finding two molecules at distance $r$ is not influenced by the presence of the other molecules allow me to write the equation above, can you show me some passages that explain how to arrive there?
 A: Your intuition is correct: this is only true in the limit of dilute gases, so when there are no other molecules around to influence the pair distribution.
In that case, this relation follows from the Boltzmann distribution: the probability of finding a configuration where the energy contribution from a specific pair of particles is $u(r)$ is proportional to $\exp(-\beta u(r))$, and $g(r)$ is normalized such that at large distances (where $u(r) \to 0$), it is equal to 1.
As soon as you go to higher densities, the g(r) for even the simplest interaction potentials (e.g. hard spheres or Lennard-Jones) will start to show oscillations. See for example the $g(r)$ plotted on the Wikipedia page for the radial distribution function:
https://en.wikipedia.org/wiki/Radial_distribution_function
It has multiple maxima, while the LJ potential has only a single minimum, so clearly the relation does not hold here.
(Note that the Wikipedia page also mentions the behavior in the dilute limit, under the heading "The potential of mean force")
I have not checked whether your source mentions the condition of being in the dilute limit.
