# Placing Bounds on Correlation/Covariance Through Correlation with an Intermediate Variable

I am trying to make the most of computations that have already been performed in previous steps of an algorithm. Throughout this problem statement I am only mentioning correlation, but I think it is essentially an equivalent question if I replace "correlation" with "covariance".

Suppose I have samples of three random variables $X_1$, $X_2$, and $X_3$ (each a column vector of dimensions $(n, 1)$). If I have already computed 2 correlations $c_{1, 2} = cor(X_1, X_2)$ and $c_{1, 3} = cor(X_1, X_3)$, what can I say about the remaining correlation $c_{2, 3} = cor(X_2, X_3)$? It seems like I should be able to place upper and lower bounds $c_{2, 3}$.

One possible example is that if there is high positive correlation between $X_1$ and $X_2$ and also between $X_1$ and $X_3$, then I'd like to show that there must be a reasonably strong positive correlation between $X_2$ and $X_3$ (by computing the bounds ($b_1$ and $b_2$):

$c_{1, 2} = 0.99$

$c_{1, 3} = 0.99$

$b_1 \le c_{2, 3} \le b_2$

The information I have available about $X_1$, $X_2$ and $X_3$ is there sum and sum of squares: $\sum_j x_{i, j} \\ \\ i \in {1, 2, 3}$ $\\ \\ \\$ $\sum_j x_{i, j}^2 \\ \\ i \in {1, 2, 3}$. Based on those values I can calculate the mean and variance of $X_1, X_2, X_3$.

I also have the sum of the products of the pairs $X_1, X_2$ and $X_1, X_3$: $\sum_j x_{1, j} \cdot x_{2, j}$ $\\ \\ \\$ $\sum_j x_{1, j} \cdot x_{3, j}$. Based on those values and the means and variances I can calculate $c_{1, 2}, c_{1, 3}$

Specifically I do not have: $\sum_j x_{2, j} \cdot x_{3, j}$, which would allow me to calculate $c_{2, 3}$.

I use this equation to calculate the correlations (from http://en.wikipedia.org/wiki/Correlation_and_dependence>Wikipedia):

$cor(a, b) = \dfrac{n\sum {a_i b_i} - \sum {a_i} \sum {b_i}}{\sqrt{n\sum{a_i^2} - (\sum{a_i})^2}\sqrt{n\sum{b_i^2} - (\sum {b_i})^2}}$

The correlation is the cosine of the angle $\alpha$ between the vectors, so the question can be rephrased like this: given many vectors in a Hilbert space with some known angles, what can be said about the other angles? The particular example you mentioned is answered by the angular triangle inequality: $|\alpha(x,y)-\alpha(y,z)|\le \alpha(x,z)\le \alpha(x,y)+\alpha(y,z)$. If you know more angles, the picture gets more complicated. Another good way to look at this problem is to notice that the only restrictions on the correlation matrix are its positive definiteness and 1's on the diagonal. –  fedja May 5 '13 at 0:30
Thus, if $c_{1,2}=c_{1,3}=0.99$, then $2(0.99)^2-1\leqslant c_{2,3}\leqslant1$ (and every value inbetween can be realized). –  Did May 6 '13 at 11:50