Donoghue Lab, Neuroscience Department, Brown University
Library
Crosscorrelation tutorial

Cross-correlation

by Aaron Gabow

A cross-correlation is used to compare two dynamically changing series. The cross-correlation value is related to the ordinary linear correlation coefficient. A cross-correlation function is given by the equation,

where is the cross-covariance of yn and xn and the variance of yn and xn are and . The cross-covariance function of two stationary time series yn and xn-k is given by

where and are the means of yn and xn respectively. The relationship between cross-correlation and linear correlation coeffient is now clear since the coefficient of correlation is defined as2:

By dividing by the standard deviations the values are constrained to run from -1 to 1.

The equation of the cross-correlation function for a continuous system is:

where and <si> is the mean value of the ith signal. Now, the 1/2T is a normalizing factor, the value t is the lag time they are inserting, since the formula evaluates si at time (tau) and sj at (tau + t) so dij(t) is how the two series correlate when you insert a lag of t.

If you plot the various correlation coefficients at various lag times against the lag times themselves, you obtain a cross-correlogram.

Covariograms are just "shuffle-corrected cross-correlograms"3. Shuffle correction makes a permutation on the order of trials for one of the two data sets, recomputes its correlation function, then subtracts the mean shuffled correlation function from the previously calculated correlation function.

It does this because it:

1. takes a data set si(t) [when starting out with two data sets si(t) and sj(t)] and alters it so the original data set si(1), si(2), si(3)... gets permutated to something like si(3), si(91),si(38)... etc and then recomputes dij(t) in the above formula. Intuitively this value is just an indicator of how big the numbers in the si and sj data sets are- its how big dij(t) would be if there were *no* correlation

2. It then finds the mean of these dij(t)'s

3. Finally it subtracts that number from the dij(t)'s that were calculated originally. This gets rid of the effect of chance occurances of correlation.

In a sense, this could be described as correcting for the mean levels of chance activity.

Bibliography:

1. Hirotugu Akaike. Genshiro Kitagawa, eds. The Practice of Time Series Analysis (New York: Springer, 1999) p. 374

2.Denis Wackerly, William Mendenhall, Richard Scheaffer, Mathematical Statistics with Applications(Fifth edition) (Belmont: Duxbury Press, 1996) p.224.

3.Carlos Brody, "Spike Covariations in Neuronal Resting Potentials Can Lead to Artefactually Fast Cross-Correlations in Their Spike Trains," Journal of Neurophysiology, 1998, vol. 80, pp. 3345-3351.

Tutorials Index