Understanding and Computing the Discrete Correlation Function of two time series

44 Views Asked by At

I am attempting to compute the discrete correlation function (DCF) that is defined in Edelson & Krolik for two time series, but I do not understand the final step. Let my two data sets $(a_i, t_{ai})$ and $(b_j, t_{bj})$ be defined as:

$$ a_i = [1,2,4,4,4] \;\;\;\;\;\;\;\;\;\;\;\;\;\; b_j = [1,1,1,2,3,3,3]$$ $$ t_{ai} = [1,2,4,6,7] \;\;\;\;\;\;\;\;\;\;\;\;\;\; t_{bj} = [1,2,3,4,5,6,7]$$

In order to compute the DCF, I first need to construct the unbinned DCF matrix and its associated time lag matrix, which are defined as:

$$ UDCF_{ij} = \frac{(a_i - \bar a)(b_j - \bar b)}{\sigma_a \sigma_b}$$

$$\Delta t_{ij} = t_j - t_i$$

Using python, I was easily able to construct these two matrices for my example data.

For the next step, I need to compute the DCF by "grouping the UDCF into a univariate function of lag time $\tau$ by collecting the $M(\tau) $ data pairs with lags falling within the interval $\tau - \Delta\tau/2 \leq \; \Delta t_{ij} \;< \tau + \Delta \tau/2$", giving:

$$DCF(\tau) = \frac{1}{M(\tau)} \sum_{k=1}^{M(\tau)} UDCF_{ij}$$

I am having trouble figuring out this last step as I am not a mathematics student and haven't worked with correlation functions very much. So my questions are:

  1. What exactly is this last step doing?

  2. What is meant by "$M(\tau)$ data pairs" and how is it computed? They want the pairs with lags falling in the given range, but isn't $\tau$ the independent variable and how do you compare a variable to a matrix like $\Delta t_{ij}$?

  3. How does one "group" a matrix like the UDCF into a function? I imagine this is what the $\sum_{k=1}^{M(\tau)} UDCF_{ij}$ is doing, but what does it mean to take the sum of a matrix?

Clearly, I don't have a good grasp of what this function is doing, and I'm sure I'm probably misinterpreting the mathematical notations. I'd appreciate any help or insight you can provide. Thanks.