The most common definition of a correlation function is the
canonical ensemble (thermal) average of the scalar product of two random variables, s_1 and s_2, at positions R and R+r and times t and t+\tau: C (r,\tau) = \langle \mathbf{s_1}(R,t) \cdot \mathbf{s_2}(R+r,t+\tau)\rangle\ - \langle \mathbf{s_1}(R,t) \rangle\langle \mathbf{s_2}(R+r,t+\tau) \rangle\,. Here the brackets, \langle \cdot \rangle , indicate the above-mentioned thermal average. It is important to note here, however, that while the brackets are called an average, they are calculated as an
expected value, not an average value. It is a matter of convention whether one subtracts the uncorrelated average product of s_1 and s_2, \langle \mathbf{s_1}(R,t) \rangle\langle \mathbf{s_2}(R+r,t+\tau) \rangle from the correlated product, \langle \mathbf{s_1}(R,t) \cdot \mathbf{s_2}(R+r,t+\tau)\rangle, with the convention differing among fields. The most common uses of correlation functions are when s_1 and s_2 describe the same variable, such as a spin-spin correlation function, or a particle position-position correlation function in an elemental liquid or a solid (often called a
Radial distribution function or a pair correlation function). Correlation functions between the same
random variable are
autocorrelation functions. However, in statistical mechanics, not all correlation functions are autocorrelation functions. For example, in multicomponent condensed phases, the pair correlation function between different elements is often of interest. Such mixed-element pair correlation functions are an example of
cross-correlation functions, as the random variables s_1 and s_2 represent the average variations in density as a function position for two distinct elements.
Equilibrium equal-time (spatial) correlation functions Often, one is interested in solely the
spatial influence of a given random variable, say the direction of a spin, on its local environment, without considering later times, \tau. In this case, we neglect the
time evolution of the system, so the above definition is re-written with \tau = 0. This defines the
equal-time correlation function, C(r,0). It is written as: C (r,0) = \langle \mathbf{s_1}(R,t) \cdot \mathbf{s_2}(R+r,t)\rangle\ - \langle \mathbf{s_1}(R,t) \rangle\langle \mathbf{s_2}(R+r,t) \rangle\,. Often, one omits the reference time, t, and reference radius, R, by assuming equilibrium (and thus time invariance of the ensemble) and averaging over all sample positions, yielding: C (r) = \langle \mathbf{s_1}(0) \cdot \mathbf{s_2}(r)\rangle\ - \langle \mathbf{s_1}(0) \rangle\langle \mathbf{s_2}(r) \rangle where, again, the choice of whether to subtract the uncorrelated variables differs among fields. The
Radial distribution function is an example of an equal-time correlation function where the uncorrelated reference is generally not subtracted. Other equal-time spin-spin correlation functions are shown on this page for a variety of materials and conditions.
Equilibrium equal-position (temporal) correlation functions One might also be interested in the
temporal evolution of microscopic variables. In other words, how the value of a microscopic variable at a given position and time, R and t, influences the value of the same microscopic variable at a later time, t+\tau (and usually at the same position). Such temporal correlations are quantified via
equal-position correlation functions, C (0,\tau). They are defined analogously to above equal-time correlation functions, but we now neglect spatial dependencies by setting r=0, yielding: C (0,\tau) = \langle \mathbf{s_1}(R,t) \cdot \mathbf{s_2}(R,t+\tau)\rangle\ - \langle \mathbf{s_1}(R,t) \rangle\langle \mathbf{s_2}(R,t+\tau) \rangle\,. Assuming equilibrium (and thus time invariance of the ensemble) and averaging over all sites in the sample gives a simpler expression for the equal-position correlation function as for the equal-time correlation function: C (\tau) = \langle \mathbf{s_1}(0) \cdot \mathbf{s_2}(\tau)\rangle\ - \langle \mathbf{s_1}(0) \rangle\langle \mathbf{s_2}(\tau) \rangle\,. The above assumption may seem non-intuitive at first: how can an ensemble which is time-invariant have a non-uniform temporal correlation function? Temporal correlations remain relevant to talk about in equilibrium systems because a time-invariant,
macroscopic ensemble can still have non-trivial temporal dynamics
microscopically. One example is in diffusion. A single-phase system at equilibrium has a homogeneous composition macroscopically. However, if one watches the microscopic movement of each atom, fluctuations in composition are constantly occurring due to the quasi-random walks taken by the individual atoms. Statistical mechanics allows one to make insightful statements about the temporal behavior of such fluctuations of equilibrium systems. This is discussed below in the section on the
temporal evolution of correlation functions and Onsager's regression hypothesis.
Time correlation function Time correlation function plays a significant role in nonequilibrium statistical mechanics as partition function does in equilibrium statistical mechanics. For instance, transport coefficients are closely related to time correlation functions through the
Fourier transform; and the
Green-Kubo relations, used to calculate relaxation and dissipation processes in a system, are expressed in terms of equilibrium time correlation functions. The time correlation function of two observables A and B is defined as, C_{AB} (t_1, t_2) = \langle A(t_1) B(t_2) \rangle and this definition applies for both classical and quantum version. For stationary (equilibrium) system, the time origin is irrelevant, and C_{AB}(\tau)=C_{AB} (t_1, t_2), with \tau = t_2 - t_1 as the time difference. The explicit expression of classical time correlation function is, C_{AB}(t) = \int d^N \mathbf{r} d^N \mathbf{p} f(\mathbf{r}_0, \mathbf{p}_0) A(\mathbf{r}_0, \mathbf{p}_0) B(\mathbf{r}_t, \mathbf{p}_t) where A(\mathbf{r}_0, \mathbf{p}_0) is the value of A at time t=0, B(\mathbf{r}_t, \mathbf{p}_t) is the value of B at time t given the initial state (\mathbf{r}_0, \mathbf{p}_0) , and f(\mathbf{r}_0, \mathbf{p}_0) is the phase space distribution function for the initial state. If
ergodicity is assumed, then the
ensemble average is the same as the time average over a long time; mathematically, C_{AB}(\tau) = \langle A(\tau) B(0) \rangle = \lim_{T \to \infty} \frac{1}{T} \int_0^{T-\tau} dt \, A(t+\tau) B(t) scanning different time windows \tau gives the time correlation function. As t \to 0, the correlation function C_{AB}(0) = \langle A B \rangle, while as t \to \infty, we may assume the correlation vanishes and \lim_{t \to \infty} C_{AB}(t) = \langle A \rangle \langle B \rangle. Correspondingly, the quantum time correlation function is, in the canonical ensemble, is a family to evaluate the quantum time correlation function from the definition. Additionally, there are two alternative quantum time correlations, and they both related to the definition of quantum time correlation function in the Fourier space. The first symmetrized correlation function G_{AB}(t) is defined by, G_{AB}(t) = \frac{1}{Q(N, V, T)} \text{Tr} \left[\hat{A} e^{i\hat{H}\tau_c^*/\hbar} \hat{B} e^{-i\hat{H}\tau_c/\hbar}\right] with \tau_c \equiv t - i\beta \hbar / 2 as a complex time variable. G_{AB}(t) is related with the definition of quantum time correlation function by, \tilde{C}_{AB}(\omega) = e^{\beta \hbar \omega / 2} \tilde{G}_{AB}(\omega) The second symmetrized (Kubo transformed) correlation function is, K_{AB}(t) = \frac{1}{\beta Q(N, V, T)} \int_0^{\beta} d\lambda \operatorname{Tr} \left[e^{-(\beta-\lambda)\hat{H}} \hat{A} e^{-\lambda \hat{H}} e^{i\hat{H}t/\hbar} \hat{B} e^{-i\hat{H}t/\hbar}\right] and K_{AB}(t) reduces to its classical counterpart both in the high temperature and harmonic limit. K_{AB}(t) is related with the definition of quantum time correlation function by, \tilde{C}_{AB}(\omega) = \left[\frac{\beta \hbar \omega}{1-e^{-\beta \hbar \omega}}\right] \tilde{K}_{AB}(\omega) The symmetrized quantum time correlation function are easier to evaluate, and the Fourier transformed relation makes them applicable in calculating spectrum, transport coefficients, etc. Quantum time correlation function can be approximated using the
path integral molecular dynamics.
Generalization beyond equilibrium correlation functions All of the above correlation functions have been defined in the context of equilibrium statistical mechanics. However, it is possible to define correlation functions for systems away from equilibrium. Examining the general definition of C(r,\tau), it is clear that one can define the random variables used in these correlation functions, such as atomic positions and spins, away from equilibrium. As such, their scalar product is well-defined away from equilibrium. The operation which is no longer well-defined away from equilibrium is the average over the equilibrium ensemble. This averaging process for non-equilibrium system is typically replaced by averaging the scalar product across the entire sample. This is typical in scattering experiments and computer simulations, and is often used to measure the radial distribution functions of glasses. One can also define averages over states for systems perturbed slightly from equilibrium. See, for example, http://xbeams.chem.yale.edu/~batista/vaa/node56.html ==Measuring correlation functions==