# Spatial Correlation Function and Ensemble average

Well, I was reading the Statistical Mechanics book by Pathria, to understand the concepts of the correlation function. I want to quote some lines.

Spatial correlation functions are based on n-particle densities. The one-body number density is defined by the average quantity $$$$n_1(\vec{r})=\langle \sum_{i}\delta(\vec{r}-\vec{r_j})\rangle$$$$ This defines the local number density in which $$n_1(\vec{r})d\vec{r}$$ is a measure of the probability of finding a particle inside an elemental volume dr located at position r.

Now my question is about the averaging. Is it not the ensemble average? Because particle number density at a given point inside material is truely a random variable. So we need some distribution function to be average. So my question is, what kind of average was that?

Yes, that is an ensemble average. You create many realisations of your system and count how many particles are "around" each point $$\vec{r}$$. Or, if the system is ergodic, you just take the time average of the same quantity.