What do correlation functions measure in Cosmology I have been reading an introductory text on cosmology and have just come across the notion of a correlation functions in context to measuring anisotropies in the CMB. My question is, what does such a correlation function actually measure? 
Using this example of temperature fluctuations $\frac{\delta T}{T}$ in the CMB, intuitively, is the correlation function of temperature fluctuations at two different points in the CMB a measure of how similar their values are, such that the closer the value of the correlation function is to 1, the more similar the values of the temperature fluctuations are at two different points in the CMB?! As such, if the values of the temperature fluctuations at two different points are very similar in value then one would say that they are "highly correlated"?!  
I've also heard of the correlation function for density perturbations at different spatial points, $\langle\xi(\mathbf{r})\xi(\mathbf{r}')\rangle$. Again, is this simply a measure of how similar (i.e. how correlated) the values of the density perturbations at two different spatial points are, and so the closer the value of $\langle\xi(\mathbf{r})\xi(\mathbf{r}')\rangle$ is to 1, the more similar the values of the density perturbations are at a given spatial separation?! In this case, one might expect that the values of the density perturbation at neighbouring spatial points will be very similar and hence density perturbations at nearby points will be more correlated than those at larger spatial separations (This seems to make sense, as if one knows that there is a galaxy in a given region of space, which heuristically corresponds to a density perturbation, then one might expect other galaxies in the neighbourhood of this region to cluster around this known galaxy; hence the density perturbations at two points within this neighbourhood will be highly correlated)?!
 A: The correlation function measures departures from perfect randomness, and how those departures depend on spatial scale. In the study of thermodynamics, we learn that the Boltzmann-Gibbs distribution says that the higher a temperature a system has, the more the states that have high energy will contribute to the overall state of the system. For example, in a ferromagnet the spins of the atoms would be in their lowest energy configuration when they're all lined up. If you look at the spin correlation function in the Ising model at a finite temperature, the correlation starts high, and decays exponentially. When the temperature is infinite, the correlation length is zero (the spin of one atom isn't correlated with its neighbor at all).
In cosmology the universe is not in any sense in a thermodynamic equilibrium, but the correlation functions still tell you similar information. For example, how big were the fluctuations in mass density when the universe became transparent (recombination)? That information goes in to models for how galaxies and clusters of galaxies are formed by gravity, and gives us another handle to cross-check the accuracy of the big bang model.
For more detailed information, I would recommend "The Large-Scale Structure of the Universe" by P.J.E. Peebles.
