4
$\begingroup$

There are 3 random variables, $X_1$, $X_2$ and $Y$. We know $$corr(X_2, Y)>corr(X_1, Y)>0$$, but $$corr(X_2 - X_1, Y)<0$$

In other words, $X_2$ is more positively correlated to $Y$ than $X_1$, but the difference ($X_2-X_1$) is actually negatively correlated with $Y$.

Is this possible? and can you construct such random variables?

$\endgroup$
2
  • 1
    $\begingroup$ Correlation is not linear right? $\endgroup$
    – BCLC
    Feb 4, 2023 at 17:54
  • $\begingroup$ @BCLC: 'Correlation' without further qualification, especially when represented by the $\mathrm{corr}$ operator, means Pearson correlation. $\endgroup$ Feb 6, 2023 at 7:29

2 Answers 2

13
$\begingroup$

It is possible. Simple algebra shows that \begin{align} \rho_{X_2 - X_1, Y} = \frac{\sigma_{X_2}\rho_{X_2, Y} - \sigma_{X_1}\rho_{X_1, Y}}{\sigma_{X_2 - X_1}}. \end{align} So although $\rho_{X_2, Y} > \rho_{X_1, Y}$, the sign can be flipped if $\sigma_{X_1} \gg \sigma_{X_2}$. Following this observation, a valid counterexample can be easily constructed as $(X_1, X_2, Y) \sim N_3(0, \Sigma)$, where \begin{align} \Sigma = \begin{bmatrix} 100 & 0 & 2 \\ 0 & 1 & 0.3 \\ 2 & 0.3 & 1 \end{bmatrix}. \end{align} In this case, $0 < \rho_{X_1, Y} = 0.2 < \rho_{X_2, Y} = 0.3$, but $\sigma_{X_2} = 1 < \sigma_{X_1} = 10$. In addition, the joint distribution of $(X_2 - X_1, Y)$ is $N_2(0, \Sigma')$, where \begin{align} \Sigma' = \begin{bmatrix} 101 & -1.7 \\ -1.7 & 1 \end{bmatrix}. \end{align} Hence $\rho_{X_2 - X_1, Y} = \frac{-1.7}{\sqrt{101 \times 1}} < 0$.

$\endgroup$
1
  • 1
    $\begingroup$ Ah yes, I guess in short: this is quite possible when $X_1$ has a much larger scale than $X_2$. Thanks for the quick solution. My pitfall when thinking about this was that when I visualize these 3 vectors in my head, I always visualize them having the same length, which would make this impossible. This is perhaps a pitfall that I have committed quite a few times before. $\endgroup$
    – ccxxmmm
    Feb 4, 2023 at 23:16
0
$\begingroup$

A small example in R:

X1 <- c(0, 1, 3)
X2 <- c(0, 1, 2)
Y  <- c(0, 1, 2)

cor(X1, Y)
# 0.9819805  # sqrt(27/28)
cor(X2, Y)
# 1
cor(X2-X1,Y)
# -0.8660254 # -sqrt(3/4)

It would not be possible with covariance, as cov(X2-X1, Y) = cov(X2, Y) - cov(X1, Y)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.