# Correlation reverses when deflated by the same amount

Assume that we have two variables, $$a_{i}$$ and $$b_{i},$$measured across individuals $$i.$$ They have a strong, positive correlation, say $$corr(a_{i},b_{i})\approx0.9$$. Now, there is a another variable, $$c_{i}$$ , which varies across individuals. Note also that $$0

We compute, then, for each individual: $$A_{i}=\frac{a_{i}}{c_{i}}$$ and $$B_{i}=\frac{b_{i}}{c_{i}}$$

We notice that $$corr(A_{i},B_{i})$$ becomes strongly negative! This is a bit perplexing, but the only reasonable explanation I can come up with is this- across individuals, when $$b_{i}$$ increases, although $$a_{i}$$ increases, $$c_{i}$$ increases by more than $$a_{i}$$ increases on average, rendering this correlation negative. Is this reasoning correct? Is there perhaps a formal condition linking $$a,b$$ and $$c$$ which can capture the essence of this reverse in correlation?

• The nature of the answers may vary depending on what you assume about the signs of these variables. The context hints that all of them are non-negative: is this the case or not?
– whuber
Jun 28, 2021 at 14:35
• Yes indeed, they are! Well observed.. Jun 28, 2021 at 14:47
• I have included the requisite information in the body of the question. Jun 28, 2021 at 14:50

This can happen when the $$c_i$$ are positively correlated with $$a_i+b_i.$$ The geometry of the $$(a_i,b_i)$$ scatterplot reveals that such behavior should not be surprising.

Without any loss of generality we may scale all the $$a_i$$ by some positive value, all the $$b_i$$ by some other positive value, and all the $$c_i$$ by yet a third positive value, without changing any of the conditions.

Thus, it's no restriction to imagine the $$(a_i,b_i)$$ scatterplot takes on a classic "cigar" shape, with its axis oriented around 45 degrees.

The rescaling by the $$c_i$$ moves each point to another one on the line connecting it to the origin. Thus, we need to envision a situation in which the points in the original cigar can be moved in this way to fall along a cigar-shaped cloud that is oriented negatively. This is easily done: pick any nonzero number $$\mu$$ and for each point $$i$$ set

$$c_i \approx (a_i + b_i)/\mu.$$

The projected point

$$\left(\frac{a_i}{c_i},\frac{b_i}{c_i}\right) = \mu\left(\frac{a_i}{a_i+b_i},\frac{b_i}{a_i+b_i}\right)$$

will lie close to the line $$a_i+b_i=\mu,$$ which has negative slope. Thus, you can achieve any negative correlation, even $$-1.0$$ exactly, by varying the closeness of the approximation. The value $$\mu\sqrt{2}$$ will be the typical distance between the new points and the line $$b = -a.$$

Here is an example to illustrate. The $$n=30$$ original points with correlation coefficient $$0.9$$ are plotted as open circles. Arrows project them to new solid red points with correlation coefficient $$-0.8.$$ Those points all lie near the line $$a+b \approx 5.57$$ (the median of all the $$a$$ and $$b$$ coordinates).

• What an answer!! I'll be sure to go over it carefully. You, sir, should write a textbook on Statistics. Jun 28, 2021 at 16:12
• Just to clarify- a silly follow up I had- given that a_i and b_i are both scaled by the same amount, c_i, why does c_i not cancel out on both sides? I would imagine it would in the case where a_i and b_I are perfectly correlated... Jun 28, 2021 at 17:04
• It does cancel: the slope of the line of projection (that is, of any arrow) is $b_i/a_i = (b_i/c_i)/(a_i/c_i).$
– whuber
Jun 28, 2021 at 17:10
• Indeed- however, it seems it is not true when there is a constant. I am posting another question to that effect, and would appreciate your insight! Jun 28, 2021 at 18:55
• A basic property of correlation is that constant scaling of either variable doesn't change the correlation: see the initial remarks in this answer.
– whuber
Jun 28, 2021 at 19:37