In this exercise, you will compute the two-point correlation function of dark matter in a cosmological simulation. The two-point correlation function can be measured for any set of points in space and it is defined as the excess number of pairs of points separated by a distance r, relative to what it would be if the points were randomly distributed. The definition is:
xi(r) = DD(r)/RR(r) -1
where DD(r) is the number of pairs of data points separated by a distance r (actually in a bin of r) and RR(r) is the number of pairs of random points separated by a distance r (in the same bin). The correlation function is thus defined to be zero for a set of random points.
To get a sense of how the correlation function is used in research, here are two journal papers. Weinberg et al.(2004) is a theoretical paper that measures the correlation function of dark matter and galaxies in a simulation and Zehavi et al.(2011) is an observational paper that measures the correlation function of galaxies in the Sloan Digital Sky Survey. These are very technical papers, so don't get discouraged if you don't understand most of them - it's perfectly normal!