Should correlation coefficients be expressed as angles? - Less Wrong Discussion
http://lesswrong.com/r/discussion/
Should correlation coefficients be expressed as angles?
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/Wed, 28 Nov 2012 11:05:50 +1100
Submitted by <a href="http://lesswrong.com/user/Sniffnoy">Sniffnoy</a>
•
43 votes
•
<a href="http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/#comments">24 comments</a>
<div><p><strong>Edit 11/28:</strong> Edited note at bottom to note that the random variables should have finite variance, and that this is essentially just L². Also some formatting changes.</p>
<p>This is something that has been bugging me for a while.</p>
<p>The correlation coefficient between two random variables can be interpreted as the cosine of the angle between them[0]. The higher the correlation, the more "in the same direction" they are. A correlation coefficient of one means they point in exactly the same direction, while -1 means they point in exactly opposite directions.  More generally, a positive correlation coefficient means the two random variables make an acute angle, while a negative correlation means they make an obtuse angle.  A correlation coefficient of zero means that they are quite literally orthogonal.</p>
<p>Everything I have said above is completely standard.  So why aren't correlation coefficients commonly <em>expressed as angles</em> instead of as their cosines?  It seems to me that this would make them more intuitive to process.</p>
<p>Certainly it would make various statements about them more intuitive.  For instance "Even if A is positive correlated with B and B is positively correlated with C, A might be negatively correlated with C."  This sounds counterintuitive, until you rephrase it as "Even if A makes an acute angle with B and B makes an acute angle with C, A might make an obtuse angle with C."  Similarly, the geometric viewpoint makes it easier to make observations like "If A and B have correlation exceeding 1/√2 and so do B and C, then A and C are positively correlated" -- because this is just the statement that if A and B make an angle of less than 45° and so do B and C, then A and C make an angle of less than 90°.</p>
<p>Now when further processing is to be done with the correlation coefficients, one wants to leave them as correlation coefficients, rather than take their inverse cosines just to have to take their cosines again later.  (I don't know that the angles you get this way are actually useful mathematically, and I suspect they mostly aren't.)  My question rather is about when correlation coefficients are <em>expressed to the reader</em>, i.e. when they are considered as an end product.  It seems to me that expressing them as angles would give people a better intuitive feel for them.</p>
<p>Or am I just entirely off-base here?  Statistics, let alone the communication thereof, is not exactly my specialty, so I'd be interested to hear if there's a good reason people don't do this.  (Is it assumed that anyone who knows about correlation has the geometric point of view completely down?  But most people can't calculate an inverse cosine in their head...)</p>
<p>[0]Formal mathematical version: If we consider real-valued random variables with finite variance on some fixed probability space Ω -- that is to say, L²(Ω) -- the covariance is a positive-semidefinite symmetric bilinear form, with kernel equal to the set of essentially constant random variables.  If we mod out by these we can consider the result as an inner product space and define angles between vectors as usual, which gives us the inverse cosine of the correlation coefficient.  Alternatively we could just take L²(Ω) and restrict to those elements with zero mean; this is isomorphic (since it is the image of the "subtract off the mean" map, whose kernel is precisely the essentially constant random variables).</p></div>
<a href="http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/#comments">24 comments</a>
RichardKennaway on Should correlation coefficients be expressed as angles?
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7wvz
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7wvz2012-11-28T21:18:00.018352+11:00
<div class="md"><p>It's interesting to compare these angles with those that come up in engineering.</p>
<ul>
<li><p>One second of arc (the <a href="http://en.wikipedia.org/wiki/Ramsden_theodolite" rel="nofollow">Ramsden theodolite</a>): r = 0.99999999925</p></li>
<li><p>1/5000 to 1/1000 inch per inch (accuracy of a try-square): r = 0.99999950 to 0.999999980</p></li>
<li><p>1 minute of angle (the accuracy that a rifle should hold to) = 1 inch at 100 yards: r = 0.999999970</p></li>
<li><p>1 degree: r = 0.99985</p></li>
<li><p>1 compass point (1/32 of a revolution, limit of navigational accuracy in the days of sail): r = 0.981</p></li>
</ul>
<p>And in contrast:</p>
<ul>
<li><p>Correlation that implies 1 bit of mutual information (for a bivariate Gaussian): r = 0.866, angle = 30 degrees (exactly).</p></li>
<li><p>Correlation considered high in the softer disciplines: r = 0.8, angle = 36.9 degrees.</p></li>
<li><p>Correlation considered publishable: r = 0.2, angle = 78.5 degrees. This means that if the truth is due North, you're proceeding East by North (one compass point away from East).</p></li>
</ul></div>
Kindly on Should correlation coefficients be expressed as angles?
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7wtv
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7wtv2012-11-28T14:15:30.332514+11:00
<div class="md"><p>Among mathematicians, of course, one ought to be able to go from one interpretation to the other as necessary (I think it boils down to switching from an algebraic interpretation of your random variables to a geometric one).</p>
<p>If non-mathematicians were exposed to the angle version... that might help a lot of people understand how correlations interact. But, ultimately, the result is still a black box: in practice, I expect people to memorize "0.99 very good, 0.7 okay, 0.05 bad" which just turns into "8 degrees good, 45 degrees okay, 87 degrees bad".</p>
<p>In some cases, a (positive) correlation coefficient can be thought of as a probability, which is another point in its favor.</p></div>
RichardKennaway on Should correlation coefficients be expressed as angles?
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7wva
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7wva2012-11-28T19:44:05.826825+11:00
<div class="md"><blockquote>
<p>In some cases, a (positive) correlation coefficient can be thought of as a probability, which is another point in its favor.</p>
</blockquote>
<p>I haven't come across that. Could you amplify it?</p></div>
Kindly on Should correlation coefficients be expressed as angles?
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7www
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7www2012-11-29T00:04:00.993105+11:00
<div class="md"><p><em>Edit: I started out giving a somewhat confusing example so I'm just going to edit this comment to say something less confusing.</em></p>
<p>Let X be any random variable, and define Y as follows: with probability R, Y=X, and otherwise Y is independently drawn from the same distribution as X. Then X and Y are identically distributed and have correlation R.</p></div>
Douglas_Knight on Should correlation coefficients be expressed as angles?
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7x3k
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7x3k2012-11-29T09:25:04.118988+11:00
<div class="md"><p>What definition of correlation are you using?</p></div>
Kindly on Should correlation coefficients be expressed as angles?
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7x3o
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7x3o2012-11-29T09:39:16.047092+11:00
<div class="md"><p><a href="http://en.wikipedia.org/wiki/Pearson_product-moment_correlation_coefficient" rel="nofollow">This one</a>. As far as I know, it's the only kind of correlation that the cosine interpretation is valid for.</p>
<p>If you want to verify my claim, it will help to assume that your distribution has mean 0 and variance 1, in which case the correlation between X and Y is just E[XY]. But correlation is invariant under shifting and scaling, so this is fully general.</p>
<p>Edit: I suppose I was imprecise when referring to the correlation between bit strings; what I mean there is simply the correlation between any pair of corresponding bits. This sort of confusion appears to be standard.</p></div>
Douglas_Knight on Should correlation coefficients be expressed as angles?
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7x46
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7x462012-11-29T10:31:32.244856+11:00
<div class="md"><p>Yes, I was wondering what you meant by the correlation of a string. Also, the definition doesn't apply to binary variables unless you somehow interpret bits as numbers, but as you say, it doesn't matter how you do so. There's a reason I asked what definition <em>you</em> were using, not the original post.</p>
<blockquote>
<p>This sort of confusion appears to be standard.</p>
</blockquote>
<p>Which confusion? The confusion between a random variable and sequence of iid draws from it? And what do you mean by standard?</p></div>
Kindly on Should correlation coefficients be expressed as angles?
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7x4d
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7x4d2012-11-29T10:55:20.343512+11:00
<div class="md"><p>By "this sort of confusion" I meant the ambiguity between the correlation of two bit strings and the correlations between the individual bits. By "standard" I mean that I didn't make this up; I've seen other people do this.</p>
<p>Anyway, perhaps it's better to focus on the more general (and less notation-abusing) example I gave.</p></div>
Decius on Should correlation coefficients be expressed as angles?
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7wue
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7wue2012-11-28T15:44:35.591756+11:00
<div class="md"><p>All's well and good, until you get to adding angles together, unless you visualize A,B,C existing on a sphere and the angles between them being from the center of the sphere- are the possible angles of the sphere <em>identical</em> to the inverse cosines of the possible correlations? (If A and B are .707 correlated, and B and C are .707 correlated, are A and C necessarily somewhere between 0 and 1 correlated?)</p>
<p>For four variables (six angles), you would require visualizing them on a four-dimensional surface analogous to a sphere. I can do some of the math involved in calculating the possible angles there, but I can't visualize it beyond 'there are four points on that surface such that all of them are 90 degrees apart.' I know that any three of those points uniquely define a sphere, and each of those three spheres is a cross-section of the four-dimensional surface.</p></div>
Sniffnoy on Should correlation coefficients be expressed as angles?
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7wuk
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7wuk2012-11-28T16:46:42.055111+11:00
<div class="md"><blockquote>
<p>All's well and good, until you get to adding angles together, unless you visualize A,B,C existing on a sphere and the angles between them being from the center of the sphere- are the possible angles of the sphere identical to the inverse cosines of the possible correlations? (If A and B are .707 correlated, and B and C are .707 correlated, are A and C necessarily somewhere between 0 and 1 correlated?)</p>
</blockquote>
<p>Yes. If you have n random variables, you can restrict to the subspace spanned by them (or their equivalence classes). For instance, if we have 3 random variables whose equivalence classes are linearly independent, then the span of these equivalence classes will be a 3-dimensional real inner product space, which will then necessarily be isomorphic to <strong>R</strong>^3 with the dot product.</p>
<p>Actually, it occurs to me that I've never actually sat down and checked that angle addition obeys the triangle inequality in 3 dimensions -- I suppose if nothing else it can be done by lots of inequality grinding -- but that's not relevant. The point is, it does hold in dimension 3, and hence by the argument above, it holds regardless of dimension, finite or infinite.</p></div>
Decius on Should correlation coefficients be expressed as angles?
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7wzi
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7wzi2012-11-29T04:27:42.752532+11:00
<div class="md"><p>That's half of it- does there exist any set of angles which <em>are</em> mutually compatible angles on the n-dimensional surface but <em>not</em> inverse cosines of correlations?</p></div>
Kindly on Should correlation coefficients be expressed as angles?
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7x02
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7x022012-11-29T05:04:42.901743+11:00
<div class="md"><p>No. Given any mutually compatible angles (which means we can choose unit vectors that have those angles) we can generate appropriately correlated Gaussian variables as follows: take these unit vectors, generate an n-dimensional Gaussian, and then take its dot product with each of the unit vectors.</p></div>
Decius on Should correlation coefficients be expressed as angles?
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7xbw
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7xbw2012-11-30T04:24:04.352281+11:00
<div class="md"><p>Now the hard question: Is there a finite number n such that all finite combinations of possible correlations can be described in n-dimensional space as mutually compatible angles?</p>
<p>My gut says no, n+1 uncorrelated variables would require n+1 right angles, which appears to require n+1 dimensions. I'm only about 40% sure that that line of thought leads directly to a proof of the question I tried to ask.</p></div>
Kindly on Should correlation coefficients be expressed as angles?
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7xc4
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7xc42012-11-30T04:38:15.772108+11:00
<div class="md"><p>Your gut is right, both about the answer and about its proof (n+1 nonzero vectors, all at right angles to each other, always span an n+1-dimensional space). You should trust it more!</p></div>
Decius on Should correlation coefficients be expressed as angles?
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7xk4
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7xk42012-11-30T12:52:26.960682+11:00
<div class="md"><p>I think that my 40% confidence basis for the very specific claim is proper. Typically I am wrong about three times out of five when I reach beyond my knowledge to this degree.</p>
<p>I was hoping that there would be some property true of 11-dimensional space (or whatever the current physics math indicates the dimensionality of meatspace is) that allows an arbitrary number of fields to fit.</p></div>
RichardKennaway on Should correlation coefficients be expressed as angles?
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7x9w
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7x9w2012-11-30T01:20:32.756287+11:00
<div class="md"><blockquote>
<p>Actually, it occurs to me that I've never actually sat down and checked that angle addition obeys the triangle inequality in 3 dimensions -- I suppose if nothing else it can be done by lots of inequality grinding</p>
</blockquote>
<p>The ordinary triangle inequality is immediate from -- is practically identical to -- the statement that a straight line is the shortest distance between two points.</p>
<p>The spherical triangle inequality, in any number of dimensions, is the same thing with "straight line" replaced by "great circle". A detail that doesn't arise for flat space is that there are two angles between two lines (whereas there is only one distance between two points in flat space), and you have to choose one that is no more than pi.</p></div>
faul_sname on Should correlation coefficients be expressed as angles?
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7x0d
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7x0d2012-11-29T05:25:00.574361+11:00
<div class="md"><p>Apparently, some people can visualize more than 3 dimensions fairly easily. As for me, I use a little trick that engages the ability of my visual-spatial mind to visualize more than one object at a time.</p>
<p>To visualize a 6-sphere, I usually visualize a sphere of fixed size with three axes going through it. This sphere and the axes represent the higher-order dimensions. I then imagine myself somewhere in this three-dimensional space (specifically, somewhere inside the fixed sphere). I note the distance directly from the x, y, and z axes directly through me to the edge of the sphere. Each of these distances defines the radius of the 'visible surface' of the 6-sphere from that point in higher-order space looking from the x, y, or z axis respectively. By rotating the axes, the relative sizes of these surfaces change, and I'm guessing you can already visualize a rotating normal sphere in your mind. So you can rotate the 6-sphere in two sets of 3 dimensions fairly easily. Rotating between higher and lower dimensions is a bit more challenging, but still doable. For a 4- or 5- sphere, replace the 3-dimensional higher-order sphere with a circle, or just ignore the z axis.</p>
<p>If you can figure out how to do that, you can get a feeling for the possible orientations of the angles to one another. And that actually is fairly interesting, and the first time I really understood on a gut level why r^2 is used instead of r for correlations.</p></div>
Decius on Should correlation coefficients be expressed as angles?
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7xbu
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7xbu2012-11-30T04:16:35.537405+11:00
<div class="md"><p>Glad that works for you. I lose sight of where (0,0,1,0,0,0) is as soon as I rotate around any axis other than the z-axis, and I can never find (0,0,0,0,.707,.707) or any other point not on the reference plane for a higher-order dimension.</p></div>
The_Duck on Should correlation coefficients be expressed as angles?
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7wt4
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7wt42012-11-28T13:03:05.549448+11:00
<div class="md"><p>Thanks, I wish someone had pointed out this isomorphism to me earlier. I think angles might well be more intuitive than correlation coefficients.</p></div>
iDante on Should correlation coefficients be expressed as angles?
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7wsf
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7wsf2012-11-28T12:05:41.215721+11:00
<div class="md"><p>I don't think correlation coefficient is the cosine of the angle between them. <a href="http://en.wikipedia.org/wiki/File:Correlation_examples2.svg" rel="nofollow">In this picture</a> you can see that the middle row has 1 or -1 and yet different angles. Instead I think it's a measure of how well they correlate with each other. Maybe I'm crazy-wrong though. Edit: For only two variables you might be right, but I don't see correlation coefficients reported between just two variables.</p>
<p>I often see the entire covariance matrix reported, not just the correlation coefficient. This matrix has some handy properties. Its eigenstuff contains all the information about the arrows in <a href="http://en.wikipedia.org/wiki/File:GaussianScatterPCA.png" rel="nofollow">this</a> picture.</p></div>
Sniffnoy on Should correlation coefficients be expressed as angles?
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7wsx
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7wsx2012-11-28T12:33:11.804831+11:00
<div class="md"><blockquote>
<p>I don't think correlation coefficient is the cosine of the angle between them. In this picture you can see that the middle row has 1 or -1 and yet different angles.</p>
</blockquote>
<p>Sorry, I guess I was unclear on what I meant. I didn't mean the angles pictured in that graph. Rather I meant what was described in the footnote -- consider covariance as an inner product and consider the angles you get this way.</p>
<p>In other words, I'm not claiming any sort of theorem; I'm not claiming that the correlation coefficient in fact tells you some other information that isn't obviously already in there. I've defined the angles here such that "the correlation coefficient is the cosine of the angle between them" is a tautology. I'm just suggesting that this geometric viewpoint might help with the intuition.</p></div>
iDante on Should correlation coefficients be expressed as angles?
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7wtg
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7wtg2012-11-28T13:41:49.249716+11:00
<div class="md"><p>Whoa. I didn't have this geometric point of view down so I didn't understand at first what you meant, but now that I've thought about it for a few minutes it makes sense.</p>
<p>The prevalent intuitive meaning of correlation coefficient (at least the one I learned in the watered-down statistics-for-physics-students class) is "a measure of how well two variables correlate. 1 is well, 0 is not at all, -1 is backwards correlation." Hence, the first thing I thought of was that image. Many people who need to use this coefficient won't have taken linear algebra and it'll be a complication for them to learn that it's "the inner product of two random variablesies, so 0 means lots of correlation, pi means the opposite direction, and pi/2 means no correlation." Or maybe you use degrees, idk.</p>
<p>I like it, thanks for making this thread :D</p></div>
Giles on Should correlation coefficients be expressed as angles?
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7xkp
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7xkp2012-11-30T13:29:02.327149+11:00
<div class="md"><p>This might be helpful - thanks.</p></div>
army1987 on Should correlation coefficients be expressed as angles?
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7wwc
http://lesswrong.com/r/discussion/lw/foa/should_correlation_coefficients_be_expressed_as/7wwc2012-11-28T22:33:00.814116+11:00
<div class="md"><blockquote>
<p>So why aren't correlation coefficients commonly expressed as angles instead of as their cosines?</p>
</blockquote>
<p>Dunno, I guess hysterical raisins.</p>
<p>I <em>have</em> taken the arccosine of correlation coefficients in my mind occasionally.</p></div>