By definition, g(r) is related to the average number of particles found within a given volume of shell located at a distance r from the center. The average density of atoms at a given radial distance from another atom is given by the formula: