# Can two variables be correlated in first differences but not in levels?

It is evident that if two random variables $$X$$ and $$Y$$ are correlated, their changes are also correlated. This is for instance a foundation in cointegration studies, and the Engel-Granger approach, where if a long-run relationship between $$X$$ and $$Y$$ exists, there is also a short term relationship.

Namely, if $$y_t = ax_t + \epsilon_t$$, then it must be the case that $$\Delta y_t = a \Delta x_t + \mu_t$$ (which can be also trivially seen in a 2D graph).

I am interested in the reverse. Is it possible for a pair of random variables to be related in first differences but not in levels? Or, using a very loose notation, are $$y_t \neq f(x_t)$$ and $$\Delta y_t = g(\Delta x_t)$$ compatible?

At first my answer is no, since the above process, in my opinion, is fully reversible. On the other hand, it is not uncommon in econometrics to estimate equations in changes when there is not a long run relationship.

PS: I use econometrics/cointegration as a motivation exercise, but my interest is not related to econometrics. Hence this post having no econometric-related tag.

• Hi: yes. take two stocks, A and B. Stock A has a price that is increasing with some constant positive slope and stock B has a price that is decreasing with some constant negative slope. Then, the changes in prices of stocks A and B are perfectly correlated but the price is "uncorrelated". well, the two price are atleast uncorrelated linearly because the mean price of each series is not constant. Commented Sep 22, 2018 at 10:53
• @mlofton How are prices not correlated? They clearly are. Commented Sep 22, 2018 at 10:58
• maybe you're right but it's not clear to me. if two variable are "trending", how does on define their correlation ? then whole notion of cointegration arose because of a long term relation of I(1) variables. So, I agree that they are cointegrated but I'm not sure if they are correlated ? How to define it ? Commented Sep 23, 2018 at 11:43

Note enough reputation to comment

I don't think correlation of differences necessarily implies correlation of levels. If you try to solve this you will see that you error terms sum over the series of defined error terms and you will struggle to define a correlation coefficient to solve this.

Assume that:

$$\Delta y_t = a\Delta x_t + \epsilon_t$$ for $$t \geq 1$$ and $$t \in \mathbb{Z}$$.

Define:

$$y_0 := a x_0 + \epsilon_ 0$$

Then:

$$y_t = ax_t + \sum_{n=0}^{t}\epsilon_n$$

I think you can define a series whereby you will struggle to find a better coefficient, probably because of the converse which you stated in your question. This growing error term is your problem, as you can probably define errors such that the errors are sufficiently small, but the sum is sufficiently begin to negate your question. On the other hand if the time series is sufficiently small you could be OK in those specific cases.

In the example provided by @mlofton the differences are perfectly correlated. Hence the error terms are zero. The sum of zeros is zero and hence the levels are also perfectly correlated. That is why the example provided does not work.

• Thanks Trevor. My mistake. You are absolutely correct. Commented Sep 6, 2019 at 12:59

Let $$\{X_t\}$$ and $$\{Y_t\}$$ be two stochastic processes.

Given, $$\rho \equiv \frac{Cov(\Delta X_t,\Delta Y_t)}{\sqrt{Var(\Delta X_t)Var(\Delta Y_t)}} \neq 0$$.

$$\implies Cov((X_t - X_{t-1}),(Y_t-Y_{t-1})) = Cov(X_t,Y_t)+Cov(X_{t-1},Y_{t-1})-Cov(X_t,Y_{t-1})-Cov(X_{t-1},Y_t) \neq 0$$

This means that not all, $$Cov(X_t,Y_t), Cov(X_{t-1},Y_{t-1}), Cov(X_t,Y_{t-1}), Cov(X_{t-1},Y_t)$$ can simultaneously be zero.

Therefore, for difference series to be correlated, there should be a contemporaneous correlation or at least at first lag or both. This is also fairly intuitive, I guess - based on which you predicted the answer to No.

Side note 1: In your question you talked about $$X$$ and $$Y$$ as random variables and then talked about time series, $$x_t$$ and $$y_t$$. Please keep in mind that a time series may be a series of random variables (i.e., a stochastic process) not just observations coming from a single random variable. That's why we generally say two time series (or stochastic processes) are correlated (not random variables) in context of co-integration.

Side Note 2:

"...a foundation in cointegration studies, and the Engel-Granger approach, where if a long-run relationship between X and Y exists, there is also a short term relationship."

Short-term relationship is not mandatory. What cointegration requires is that if two series, say $$\{X_t\}$$ and $$\{Y_t\}$$, are $$I(1)$$, but the regression $$y_t=\beta x_t +\epsilon_t$$ yields $$\hat{\epsilon_t}$$ such that $$\hat{\epsilon_t}$$ is stationary, then $$\{X_t\}$$ and $$\{Y_t\}$$ are cointegrated. Since IID $$\subset$$ Stationarity, $$\epsilon_t$$ might as well as IID. This would mean that while there is a long-term relationship, there is no short-term relationship between $$y_t$$ and $$x_t$$ (in fact, there would be no need to talk about "long" and "short" term relationship in such a case).

Hope this helps.