# Correlation is zero but with non-zero correlation coefficient

The correlation coefficient is given by

$$\rho_{XY}=\frac{R_{XY}-\mu_X \, \mu_Y}{\sigma_X \, \sigma_Y}$$

If the product $$\mu_X \, \mu_Y \neq 0$$ and $$\rho_{XY}\neq 0$$, then we can have two cases:

1. $$R_{XY}= 0$$ when $$X$$ and $$Y$$ are orthogonal;

2. $$R_{XY}\neq 0$$ when $$X$$ and $$Y$$ are not orthogonal to each other;

So I see from Case $$1$$ that $$R_{XY}= 0$$ is possible to have when $$\rho_{XY}\neq 0$$. Is my reasoning correct? Is this not counterintuitive?

Yes, it is possible.

Following this very good paper on the topic, consider two random variables $$X$$ and $$Y$$ with the following realizations:

$$X = (1, -5, 3, -1), Y = (5, 1, 1, 3)$$

You have:

$$R_{XY} = E(XY') = E(1\times5 - 5\times1 + 3\times1 - 1\times3) = 0$$

but:

$$\mu_{X} = -\frac{1}{2}, \mu_{Y} = \frac{5}{2} \Rightarrow \rho_{X,Y} \neq 0$$

In general, recall that while both orthogonality and uncorrelation imply linear independence, there's no implication between orthogonality and uncorrelation themselves.

When it comes to stochastic processes, following your notation, we say that $$(X_{t})_{t \geq 1}$$ $$(Y_{t})_{t \geq 1}$$ are uncorrelated if:

$$\forall t_{1}, t_{2}, COV_{X,Y}(t_{1}, t_{2}) = R_{XY}(t_{1}, t_{2}) - \mu_{X}(t_{1})\mu_{Y}(t_{2}) = 0$$

while we say that they're orthogonal if:

$$\forall t_{1}, t_{2}, R_{XY}(t_{1}, t_{2}) = E[X(t_{1})Y(t_{2})'] = 0$$

so the same reasoning as before applies. Here for a broader analysis.

• Great! Also $\sigma_x$ and $\sigma_y$ are non-zero here. When you are calculating $R_{XY}$, you are doing it at lag zero i.e. no shift between X and Y. Is there a special reason. Perhaps a similar reasoning as evaluating an autocovariance which gives the variance? – macy Mar 29 at 5:26
• See edited answer. – Nicg Mar 29 at 10:32
• In your example, why is $R_{XY}$ computed at lag $0$? – macy Mar 29 at 11:58
• Maybe I am missing what you mean by lag, but between $t_{2}$ and $t_{1}$ there's actually a one period lag. Perhaps it helps to see it using a single time series: Let $(X_{t})_{t \geq 0}$ be a time series. Then $$COV(X_{t + h}, X_{t}) = E[X_{t + h}X_{t}] - E(X_{t + h})E(X_{t})$$ is the autocovariance function, with $h$ being the lag, $1$ in our case. Hope this clarifies. – Nicg Mar 29 at 13:44
• By lag, I mean the shift in one sequence relative to the other one when doing the correlation. I say lag or shift zero because you take the first sample of $X$ and multiply it by the first sample of $Y$ in your example etc. i.e. you are doing $X_1Y_1+X_2Y_2+X_3Y_3+ X_4Y_4$. So your $h$ in your explanation is $0$. For instance the first product is $X_{1+0}X_1$ with your $h$ as $0$. Your $h$ is what I called lag or shift. In effect you are computing $R_{XX}(0)$ with the argument $h=0$. We can have $R_{XX}(1)$, $R_{XX}(2)$ and $R_{XX}(3)$ i.e. by shifting one sequence by $1$, $2$ or $3$ unit. – macy Mar 30 at 11:31