Two forms of cross-correlation

103 Views Asked by At

Wikipedia and MATLAB defines cross-correlation in this way.

In time series analysis (P21), it defines cross-correlation upon cross-covariance: Let $\{X_t\}$ and $\{Y_t\}$ be two time series, $\mu_{xs}$ be mean of $s$-th r.v. in the sequence $\{X_t\}$, similar for $\mu_{yt}$. cov$(x_s,y_t)=\text{E}[(x_s-\mu_{xs})(y_t-\mu_{yt})]$. Cross-correlation (at two points) is $$\rho_{xy}(s,t)=\frac{\text{cov}(x_s,y_t)}{\sqrt{\text{cov}(x_s,x_s)\text{cov}(y_t,y_t)}}=\frac{\text{cov}(x_s,y_t)}{\sqrt{\text{var}(x_s)\text{var}(y_t)}}$$

How are these two definitions related to each other? I know that the first one results in a sequence, while the second one is a scalar. And It's easy to extent the above scalar form into a sequence form. However, I still don't understand how each entry in the sequence (from the Wiki) corresponds to a scalar (in the time series).