2
$\begingroup$

I have two Wiener processes (Brownian motion), W1 and W2. The relation between them is given by W2= W1 + 0.002*t where t is time index taking values from 1 to 500. If you plot these two processes, you will see that they are diverging away like below:

enter image description here

However, their Pearson's correlation coefficient is quite high and equal to 0.92. I don't understand why for two diverging series like this, Pearson's correlation coefficient would produce such a high value. In other words, why can't Pearson's correlation identify their divergence? Can anyone please explain the theoretical reason behind this? Thanks in advance.

Matlab codes for reproducing these graphs:

%Creating two Wiener processes

randn('state',100)          % set the state of randn
T = 1; N = 500; dt = T/N;

t=1:N;

dW = sqrt(dt)*randn(1,N);   % increments
W1 = cumsum(dW);             % cumulative sum



W2= W1+.002*t;           %Create the second Wiener process

c=num2str(corr(W1',W2')) %Computing correlation and converting it to string
                         %to use it later in the plot annotation box

figure()
plot([0:dt:T],[0,W1],'k-')   % plot W1 against t
xlabel('t','FontSize',10)
ylabel({'W_1(t)';' W_2(t)'},'FontSize',10,'Rotation',0)

hold on


plot([0:dt:T],[0,W2],'b-.')   % plot W2 against t

legend('W_1','W_2')
dim = [0.15 0.45 0.3 0.3];
str = 'Correlation=';
annotation('textbox',dim,'String', {str;c},'FitBoxToText','on');
$\endgroup$
4
  • $\begingroup$ Here's a fun exercise. Try letting the seed change rather than fixing it. Notice anything interesting? $\endgroup$ Commented Nov 2, 2017 at 23:21
  • $\begingroup$ @spaceisdarkgreen If I understood your comment clearly, I removed "state" from my code and re-ran it. Correlation is still high at 0.97. Would you please clarify the point you are trying to make? $\endgroup$
    – Anup
    Commented Nov 3, 2017 at 0:18
  • $\begingroup$ It should be way more unstable than that if you repeat it with different seeds. The graphs should sometimes be both going up, sometimes W2 goes up and W1 goes down, and sometimes both go down. $\endgroup$ Commented Nov 3, 2017 at 0:29
  • $\begingroup$ actually I just tried it with your exact parameters and in this range the correlation was much less likely to be negative than it seemed it would by eye. Still, when I repeat it over and over, it's not atypical to see a correlation of $.4$ or less every few times. It all depends on how $W_1$ happens to trend. A fun way to visualize is to do plot(W1,W2) (and do a line plot, not a scatter) $\endgroup$ Commented Nov 3, 2017 at 0:38

1 Answer 1

0
$\begingroup$

There are a lot of ways to answer this question, but the bottom line is that the Sample correlation is not well-suited for measuring the "divergence" of two things. Case in point, say $x_1(t) = \frac{1}{2}t$ and $x_2(t) = t.$ These certainly diverge, but you should be able to see that the correlation between them is one.

In general, using the sample correlation (and simple regression analysis and many other sample statistics that are bread and butter in 'iid' statistics) for any purpose is a bad idea when you have non-stationary and trending series.

$\endgroup$
2
  • $\begingroup$ Yes, I know that. But I was actually looking for the reason why trend cannot be captured by correlation. $\endgroup$
    – Anup
    Commented Nov 3, 2017 at 0:54
  • $\begingroup$ Why would it? Sample correlation tells you how when one variable is high (relative to its mean) the other one tends to be high (or low). If (in a time series context) both variables trend in time then there will be a positive correlation if they trend the same way or negative if they trend in opposite ways. A random walk, to first approximation in small samples, looks like a trend (though which way and how much varies between realizations). Imagine you had a much larger slope. Then $W_2$ will trend up and $W_1$ will trend however, and you expect to usually see a correlation of $\pm 1.$ $\endgroup$ Commented Nov 3, 2017 at 1:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .