We introduce a conditional pair distribution function (CPDF) which characterizes the probability density of finding an object (e.g., a particle in a fluid) to certain distance of other, with each of these two having a nearest neighbor to a fixed but otherwise arbitrary distance. This function describes special four-body configurations, but also contains contributions due to the so-called mutual nearest neighbor (two-body) and shared neighbor (three-body) configurations. The CPDF is introduced to improve a Helmholtz free energy method based on space partitions. We derive exact expressions of the CPDF and various associated quantities for randomly distributed, non-interacting points at Euclidean spaces of one, two and three dimensions. Results may be of interest in many diverse scientific fields, from fluid physics to social and biological sciences.