This is a variation of one of my previous questions:
Problem:
A die was thrown three times. The results of the throws are $X_1,X_2,X_3$. Let $L = X_1 + X_2$, $S = X_2 + X_3$ and $R = X_1 + X_2 + X_3$.
Find $p \Bbb Corr(L,S; R)$.
Note, $p \Bbb Corr(X, Y ;Z)$ means a partial correlation between $X$ and $Y$, "cleared" of the $Z$ effect.
Trouble
I came up to two solutions which have different answer.
My solution $1$
The idea is here to "offset" the change in C by substracting it from A and B
$$p \Bbb Corr(L,S; R) = p\Bbb Corr(X_1 + X_2, X_2 + X_3; X_1 + X_2 + X_3) = $$ $$ = \Bbb Corr(-X_3, -X_1) = 0 \quad \text{due to independence}$$
My solution $2$
I found the following formula on the Internet:
$$ r_{AB|Z} = \frac{ r_{AB} - r_{AC}\cdot r_{BC}}{\sqrt{(1- r^2_{AC})(1- r^2_{BC})}}$$
Using this formula I obtain number $p \Bbb Corr(A,B; C) = -\frac{1}{2}$.
As you can see the results are different. Which approach is wrong then?
If we clear variables $L$ and $S$ from $R$ such that $$L = aR + \nu_1, \quad \Bbb Cov(R, \nu_1) = 0$$ $$S = bR + \nu_2, \quad \Bbb Cov(R, \nu_2) = 0$$ than $p \Bbb Corr(L,S; R) =\Bbb Corr(\nu_1, \nu_2) = \Bbb Corr(L - aR, S - bR) = \frac{\Bbb Cov(L - aR, S - bR)}{\sqrt{\Bbb Var(L - aR) \Bbb Var( S - bR)}}$
Now, the task is to find $a$ and $b$.
From condition $\Bbb Cov(R, \nu_1) = 0$ the expression for $a$ follows $$ a = \frac{ \Bbb Cov(L,R)}{\Bbb Var(R)}$$ Same for $b$. Using this idea, you should get $a=-\frac{1}{2}$, $b=-1$ The fact that $X_1, X_2, X_3$ are from discrete uniform distribution should allow you calculate these covariance and variances easily. $$p \Bbb Corr(L,S; R) = \frac{2}{3}$$