(Note: This is one of three posts that I wrote some time ago that have just been languishing under the “Misc.” tab of my website for a while, because for whatever reason I didn’t feel that they were a good fit for my blog. Well, I’ve decided to go ahead and move them to the blog, so here you go!)
Link to original TalkStats thread, September 17, 2013.
Today a labmate asked the following question: if we have three random variables x, y, z, and we know the correlations and
, what constraints if any does this place on the correlation
?
At the time I reflexively answered that the remaining correlation must be the product of the two known correlations. Which of course is totally wrong. I think I was getting some mental interference from some of the equations for simple mediation floating around in my head. Anyway, after thinking about it for a while I have come up with a convincing geometric argument for what the constraints actually are. I have also verified that my answer agrees with a more complicated-looking answer to this question that I found elsewhere online.
Because I ending up spending a lot of time on this and I thought some of you would find the results interesting, I thought I would share my work here. Comments are welcome!
Okay. So imagine our variables x, y, z as vectors in n-dimensional space. The Pearson correlation coefficient between any two of these variables can be interpreted as the cosine of the angle between the corresponding vectors. This is an interesting and well-known geometric fact about correlation coefficients.
So now imagine that the x and y vectors are fixed (and hence so is their correlation), but that the vector z is free to vary so long as is constant. This constraint on
means that the set of possible z vectors will form a sort of “cone” around the y vector, as in the following image:
Now it is intuitively obvious (I know this is a sneaky phrase, but that’s why I call this just an “argument” and not a “proof”) that the two possible z vectors that will lead to the minimum/maximum values of are the z vectors that lie on the same plane as the x and y vectors. This leads to the following expression for the minimum/maximum values of
given
and
:
.
One notable result following from this is that if x is orthogonal to y and y is orthogonal to z, then there is no constraint on , it can be anywhere from -1 to +1. But under any other circumstances, fixing
and
will place some constraint on the range of
.
Okay, now for the verification part, which requires a bit of math.
So in this stats.stackexchange.com thread it is stated that the three correlations must satisfy
,
the reasoning here being because this is the determinant of the correlation matrix and it cannot be negative. Anyway, this can be viewed as a quadratic inequality in , already in standard form:
.
So if we apply the quadratic formula and simplify the result, we get the following for the minimum/maximum values of :
.
Now taking my answer and applying the trig identity we get
.
Now applying the identity we get
,
which is the answer we got from the stackexchange post. So our simpler, geometrically based answer agrees with the more conventional answer that is harder to understand.
An oldie but def a goodie. Might have to steal it if I ever become a prof :p
Or simply set vector x-avg(x), y-avg(y), z-avg(z)=a, b, c, Then =corr(x,y)
I mean the angle between a and b=corr(x,y)