# I'm confused with cross correlation and covariance of signals

I've heard that correlation is just a normalized covariance buy they can be treated the same. I'm a bit confused about it- I usually calculate cross correlation between two signals just like here in wiki= https://en.wikipedia.org/wiki/Cross-correlation

but I've seen in a few papers that they said they calculate cross correlation, but actually used the formula: E(XY)-E(x)E(Y) which is definatlly a formulla for covariance. I don't care about the amplitude (I use a.u), and I guess that's why this is legal, but I just can't get the math... I mean, I know that corr(XY)=cov(XY)/var(X)var(Y) but var(X), var(Y) are not a constant, they are also a function of t (and I've seen it in my matlab calculations), so why would it be the same? Thank you so much for answering.

• Hi: Assuming var(x) and var(y) are not a function of $t$, then correlation is just a scaled version of covariance. It' s probably easier to use correlation because, since it's scaled, you can have an idea of what large or small means. On the other hand, if they are a function of $t$, then you've got a much more complex problem because you're data is not stationary. ( non-constant variance ). The standard calculation of cross correlation assumes a constant mean and constant variance in both populations. If this is not true, then you're dealing with a different issue altogether.. Jul 1 '21 at 14:29