# What is the formula for the cross correlation between two random vectors?

Let $$\boldsymbol{X}\in\mathbb{R}^n$$ be a random vector. Then

$$\text{Cov}(\boldsymbol{X}) = E\left[(\boldsymbol{X}-E[\boldsymbol{X}])^T(\boldsymbol{X}-E[\boldsymbol{X}])\right]=E[\boldsymbol{X}\boldsymbol{X}^T]-\boldsymbol{\mu_X}\boldsymbol{\mu_X}^T$$

Let $$\boldsymbol{D} = \text{diag}\left(\text{Cov}(\boldsymbol{X})\right)$$. Then

$$\text{Corr}(\boldsymbol{X})=\boldsymbol{D}^{-\frac{1}{2}}\text{Cov}(\boldsymbol{X})\boldsymbol{D}^{-\frac{1}{2}}$$

Now, suppose $$\boldsymbol{X,Y}\in\mathbb{R}^n$$ are random vectors. The cross-covariance is $$\text{Cov}(\boldsymbol{X},\boldsymbol{Y}) = E\left[(\boldsymbol{X}-E[\boldsymbol{X}])^T(\boldsymbol{Y}-E[\boldsymbol{Y}])\right]=E[\boldsymbol{X}\boldsymbol{Y}^T]-\boldsymbol{\mu_X}\boldsymbol{\mu_Y}^T$$

I found all the above facts in this link:

https://en.wikipedia.org/wiki/Covariance_matrix

So then, I assumed there was a correlation version of the cross-covariance. But when I looked it up, Wikiepdia says

I don't understand how this follows. Intuitively, this doesn't make sense to me because this Wikipedia formula doesn't involve rescaling. The prior definition for one random vector involves using $$\boldsymbol{D}^{-\frac{1}{2}}$$ and this makes sense to me because it corresponds to dividing by $$\sigma_X$$ in the univariate case. This definition on Wikipedia doesn't involve such a standardization, so I don't see how it could be correct.

What is the correct definition of cross-correlation between two random vectors?

• Please read the full article you cite. For more detail it references en.wikipedia.org/wiki/…, which explains the difference between "cross correlation" and "cross covariance," etc.
– whuber
Apr 15 at 22:00
• Even so, there is no intuition offered for how to understand that derivation. Do you have a more comprehensive introductory source perhaps than just that? I tried googling cross correlation, but I keep getting signal processing literature of the form $(f\star g)(\tau)$ and I don't see how that's related to the correlation between two random vectors. Apr 16 at 16:47
• There's no derivation: these are two different things.
– whuber
Apr 16 at 17:11
• @whuber ah ok, that makes sense. My confusion is arising from a course I'm taking on canonical correlation analysis. My professor started the discussion by asking us to consider the correlation between two random vectors $X,Y$ and I assumed, just as there is a cross covariance which considers the covariance between two vectors, then cross correlation must be analogous. But I am apparently wrong. Thanks for clarifying. Apr 16 at 18:25
• It's confusing terminology: I had to study several Wikipedia articles carefully.
– whuber
Apr 16 at 19:22