Discovering the Minimum Pairwise Correlation: X, Y, Z

X, Y, and Z are three random variables with mutual pairwise correlation rho. What is the minimum possible value that rho can take?

Definitions and concepts:

Before moving on to the actual question, let’s establish some base concepts and terminology. If you are comfortable with the notions of correlation, covariance, and positive semi-definite matrices, you can jump right ahead.

Definition 1: The correlation coefficient between two RVs, X and Y is equal to

corr(X,Y)=cov(X,Y)σXσY=E[(Xmux)(YmuY)]σXσY\text{corr}(X,Y) = \dfrac{\text{cov}(X,Y)}{\sigma_X \sigma_Y} = \dfrac{E[(X-mu_x)(Y-mu_Y)]}{\sigma_X\sigma_Y} Using the linearity of expectations and the standard deviation formula, this can be further expanded as: corr(X,Y)=E(XY)E(μyX)E(μxY)+E(μxμy)E(X2)E(X)2E(Y2)E(Y)2\text{corr}(X,Y) = \dfrac{E(XY)-E(\mu_yX)-E(\mu_xY)+E(\mu_x\mu_y)}{\sqrt{E(X^2)-E(X)^2}\cdot \sqrt{E(Y^2)-E(Y)^2}} As, from linearity, E(μyX)=E(μxY)=E(μxμy)=E(X)E(Y)E(\mu_yX)=E(\mu_xY)=E(\mu_x\mu_y)=E(X)E(Y), we get: corr(X,Y)=E(XY)E(X)E(Y)E(X2)E(X)2E(Y2)E(Y)2\text{corr}(X,Y) = \dfrac{E(XY)-E(X)E(Y)}{\sqrt{E(X^2)-E(X)^2}\cdot \sqrt{E(Y^2)-E(Y)^2}}

Property 1: The correlation coefficient takes values from -1 to 1

Proof:

Let X and Y be two random variables. We know that cX+YcX+Y is also an RV for any cRc \in\mathbb{R}, and, by definition, the variance of any RV is positive. We thus now have: Looking now at RHS, as a quadratic function of cc that is non-negative, we can affirm that its discriminant is non-positive. Δ=(2ccov(X,Y))24c2var(X)var(Y)0\Delta = \left(2c\cdot\text{cov}(X,Y)\right)^2 - 4c^2\cdot\text{var}(X)\text{var}(Y) \leq 0 Consequently, (2ccov(X,Y))24c2var(X)var(Y) \left(2c\cdot\text{cov}(X,Y)\right)^2 \leq 4c^2\cdot\text{var}(X)\text{var}(Y) If var(X)var(Y)=0\text{var}(X) \cdot \text{var}(Y) = 0 then X or Y must be a constant, thus corr(X,Y)=0[1,1]\text{corr}(X,Y) = 0 \in [-1,1] ✅. Otherwise, we can divide by it, and get: (2ccov(X,Y))24c2var(X)var(Y)1 \dfrac{\left(2c\cdot\text{cov}(X,Y)\right)^2}{4c^2\cdot\text{var}(X)\text{var}(Y)} \leq 1 We further simplify: (cov(X,Y))2var(X)var(Y)1 \dfrac{\left(\text{cov}(X,Y)\right)^2}{\text{var}(X)\text{var}(Y)} \leq 1 (cov(X,Y)var(X)var(Y))21 \left(\dfrac{\text{cov}(X,Y)}{\sqrt{\text{var}(X)}\sqrt{\text{var}(Y)}}\right)^2 \leq 1 We notice that we can replace LHS with corr, and get: (corr(X,Y))21\left(\text{corr}(X,Y)\right)^2 \leq 1 From this we get our final conclusion: 1corr(X,Y)1-1 \leq \text{corr}(X,Y) \leq 1

Definition 2: The covariance correlation matrix between two RVs, X, Y and Z is a square matrix giving the covariance/correlation between each pair of elements, i.e.:

corr()=(corr(X,X)corr(X,Y)corr(X,Z)corr(Y,X)corr(Y,Y)corr(Y,Z)corr(Z,X)corr(Z,Y)corr(Z,Z))\text{corr}() = \begin{pmatrix} \text{corr}(X,X)&\text{corr}(X,Y)&\text{corr}(X,Z) \\ \text{corr}(Y,X)&\text{corr}(Y,Y)&\text{corr}(Y,Z) \\ \text{corr}(Z,X)&\text{corr}(Z,Y)&\text{corr}(Z,Z) \end{pmatrix}

Definition 3: A minor of a matrix is the determinant of some smaller square matrix

Definition 4: The leading principal minor of order k is the minor of order k obtained by deleting the last n-k rows and columns from the matrix

Definition 5: An n×nn \times n symmetric matrix M is said to be positive-semidefinite if XTMX0,vRnX^TMX \geq 0, \forall v \in \mathbb{R}^n.

Property 2: A positive semi-definite matrix has all leading principal minors non-negative

Proof:

This proof is rather long and out of scope, but you can give it a read, for example, here: Sylvester’s Criterion (Math 484: Nonlinear Programming, University of Illinois, 2019). Do keep in mind that we only need the "\rightarrow" implication of the first bullet.

Property 3: For any set of random variables, both their covariance matrix and covariance matrix are positive semi-definite

Proof:

We will use the same trick that we employed in our previous proof. Consider XiX_i a set of random variables; then, we know that the variance of any weighted sum is non-negative, i.e.: var(iciXi)0,ciR\text{var}\left( \displaystyle\sum_{i} c_iX_i \right) \geq 0 , \forall c_i \in \mathbb{R} Thus: ijcicjcov(Xi,Xj)0,ci,cjR \displaystyle\sum_{i}\displaystyle\sum_{j} c_i c_j \text{cov}(X_i,X_j) \geq 0 , \forall c_i,c_j \in \mathbb{R} Denoting C=(c1,...,cn)C=(c_1,...,c_n) and M=(cov(Xi,Xj))i,jM= \left(\text{cov}(X_i,X_j)\right)_{i,j}, we get that CTMC0,CRn (1)C^TMC \geq 0, \forall C\in\mathbb{R}^n \text{ (1)}. Similarly, denoting C=(c1σX1,...,cnσXn)C^{\prime}=\left(c_1 \cdot \sigma_{X_1},...,c_n \cdot \sigma_{X_n}\right) and M=(corr(Xi,Xj))i,j=(cov(Xi,Xj)σXiσXj)i,jM^{\prime}= \left(\text{corr}(X_i,X_j)\right)_{i,j}= \left(\dfrac{\text{cov}(X_i,X_j)}{\sigma_{X_i}\sigma_{X_j}}\right)_{i,j}, we get that: (C)TMC0,CRn (2)\left(C^{\prime}\right)^TM^{\prime}C^{\prime} \geq 0, \forall C\in\mathbb{R}^n \text{ (2)}. By Definition 5, (1) and (2) imply that the covariance matrix, respectively the correlation matrix are positive semi-definite✅.

Property 4: If corr(X,Y)=corr(X,Z)=1corr(X,Y) = corr(X,Z)=-1 then corr(Y,Z)=1corr(Y,Z) = 1.

Proof:

The proof of this property is a direct consequence of the previous one. Let corr(Y,Z)=ρcorr(Y, Z) = \rho, and write the correlation matrix of the 3 random variables: corr()=(corr(X,X)corr(X,Y)corr(X,Z)corr(Y,X)corr(Y,Y)corr(Y,Z)corr(Z,X)corr(Z,Y)corr(Z,Z))=(11111rho1ρ1) \text{corr}() = \begin{pmatrix} \text{corr}(X,X) & \text{corr}(X,Y) & \text{corr}(X,Z)\\ \text{corr}(Y,X) & \text{corr}(Y,Y) & \text{corr}(Y,Z)\\ \text{corr}(Z,X) & \text{corr}(Z,Y) & \text{corr}(Z,Z) \end{pmatrix} = \begin{pmatrix} 1 & -1 & -1 \\ -1 & 1 & rho \\ -1 & \rho & 1 \end{pmatrix} The determinant of this matrix is 1+2ρρ20-1 + 2 \cdot \rho - \rho ^2 \geq 0 since the matrix is positive semi-definite. (1ρ)201ρ=0ρ=1- (1-\rho)^2 \geq 0 \Leftrightarrow 1 - \rho = 0 \Leftrightarrow \rho =1

Solutions:

Particular case: 3 RVs

When asked to give a minimum value, two things must be done. Find the lower bound and then prove that this bound is attainable, by providing an example. From Property 2, we know that the loosest bounds for ρ\rho are -1 and 1. We can easily see that ρ\rho can’t be equal to -1. If the pairs (X,Y)(X, Y) and (Y,Z)(Y, Z) have a correlation of -1, the correlation between X and Z must be 1. We could also choose X, Y, and Z independent, in which case ρ\rho would be 0. So, our minimal value is in the interval (1,0](-1, 0]. To get a tighter inequality, we use the necessary properties of the correlation matrix, outlined in the first part of the video. Write the correlation matrix of X, Y, and Z and set the condition for it to be positive-semi-definite. Recursively eliminate trailing rows and columns to get the principal leading minors. corr()=(1ρρρ1ρ11ρ) \text{corr}() = \begin{pmatrix} 1 & \rho & \rho \\ \rho & 1 & \rho \\ 1 & 1 & \rho \end{pmatrix} D1=10D_1 = | 1 | \geq 0D2=1ρρ1=1ρ20D_2 = \begin{vmatrix} 1 & \rho \\ \rho & 1 \end{vmatrix} = 1- \rho^2 \geq 0 (by Property 2) ✅ D3=1ρρρ1ρ11ρ=(1ρ)2(1+2ρ)0ρ12D3 = \begin{vmatrix} 1 & \rho & \rho \\ \rho & 1 & \rho \\ 1 & 1 & \rho \end{vmatrix} = (1-\rho)^2 \cdot (1+2\rho) \geq 0 \Longleftrightarrow \rho \geq - \dfrac{1}{2} (To get to this, use, for example, the Rule of Sarrus + Factorize) Now we have reduced the interval for ρ\rho, and the minimal value that ρ\rho can take is at least 12-\dfrac{1}{2}. If we find a triplet of random variables with pairwise correlations of 0.5-0.5, we have proved that this value is attainable, hence the minimum. Unfortunately, this is the tricky part. One way to construct such variables is: Let A1,A2,A3A_1, A_2, A_3 be independent identically distributed standard uniform random variables and consider Xi=AiAX_i = A_i - \overline{A}. If we expand the average and compute the coefficients, we get a simplified formula for the XiX_i‘s: Xi=23Ai13jiAjX_i = \dfrac{2}{3}A_i - \dfrac{1}{3}\sum_{j \neq i} A_j We compute the variance of the XiX_i‘s by using the formula for the linear combination of independent random variables (in our case the AiA_is). The variance of AiA_i is equal to 1 and the covariance of AiA_i and AjA_j, with iji \neq j is 0 as they are independent: var(Xi)=var(23Ai13jiAj)=49var(Ai)+ji(13)2var(Aj)+jiCcov(Ai,Aj)\text{var}(X_i) = \text{var}\left( \dfrac{2}{3}A_i - \dfrac{1}{3}\sum_{j \neq i} A_j \right) = \dfrac{4}{9} \text{var}(A_i) + \sum_{j \neq i} \left( - \dfrac{1}{3}\right)^2 var(A_j) + \sum_{j \neq i} C \cdot \text{cov}(A_i,A_j) var(Xi)=49+219=69=23,i1,2,3\text{var}(X_i) = \dfrac{4}{9} + 2\cdot \dfrac{1}{9} = \dfrac{6}{9} = \dfrac{2}{3}, \forall i \in {1,2,3} Thinking back to the correlation formula, we are missing the covariance between XiX_i and XkX_k. We again linearly expand the covariance, keeping in mind that the covariance of independent random variables is 0, and the covariance of a random variable with itself is its variance. cov(Xi,Xj)=cov(23Ai13jiAj,23Ak13jkAj)\text{cov}(X_i, X_j) = \text{cov} \left(\dfrac{2}{3}A_i - \dfrac{1}{3} \sum_{j\neq i} A_j ,\dfrac{2}{3}A_k - \dfrac{1}{3} \sum_{j\neq k} A_j \right) cov(Xi,Xj)=29cov(Ai,Ai)29cov(Ak,Ak)+19jkcov(Aj,Aj)+j1j2Ccov(Aj1,Aj2)\text{cov}(X_i, X_j) = - \dfrac{2}{9}\text{cov}(A_i,A_i) - \dfrac{2}{9}\text{cov}(A_k,A_k) + \dfrac{1}{9}\sum_{j\neq k}\text{cov}(A_j,A_j)+ \sum_{j_1\neq j_2}C \cdot \text{cov}(A_{j_1},A_{j_2}) cov(Xi,Xj)=2929+19=39=13,i,k1,2,3,ik\text{cov}(X_i, X_j) = - \dfrac{2}{9} - \dfrac{2}{9} + \dfrac{1}{9} = -\dfrac{3}{9} = -\dfrac{1}{3}, \forall i,k \in {1,2,3}, i\neq k Thus, corr(Xi,Xk)=cov(Xi,Xk)var(Xi)var(Xk)=1323=12,i,k1,2,3,ik\text{corr}(X_i, X_k) = \dfrac{cov(X_i,X_k)}{\sqrt{\text{var}(X_i)\text{var}(X_k)}} = \dfrac{-\frac{1}{3}}{\frac{2}{3}} = - \dfrac{1}{2}, \forall i,k \in {1,2,3}, i\neq k For this construction, all the pairwise correlations are equal to 12-\dfrac{1}{2}. Thus, we’ve obtained the minimum possible value for ρ\rho. ✅

General Case

We have the correct result for the case of 3 random variables. Can we generalize it? How about the minimum value of ρ\rho when you have n random variables with pairwise correlations equal? Just as before, we consider the correlation matrix and its properties. corr()=(1ρρρ1ρρρ1)\text{corr}() = \begin{pmatrix} 1 & \rho & \cdots & \rho \\ \rho & 1 & \cdots & \rho \\ \vdots & \vdots & \ddots & \vdots \\ \rho & \rho & \cdots & 1 \end{pmatrix} Like before, its determinant must be at least 0. Computing it is not as trivial, since there is no generalized formula for the determinant of an n×n×nn \times n \times n matrix. However, we can use the decomposition along a column and induction to prove that its value is: D=(1ρ)n1(1+(n1)ρ) D=(1-\rho)^{n-1} (1+(n-1)\rho) For this to be greater than or equal to 0, we must have that: ρn1n1\rho \geq -n\dfrac{1}{n-1}. We again construct the random variables XiX_i as the difference between AiA_i and the mean of the AAs, where AiA_i are iid standard uniform. With similar rationing as in the previous part, we compute the variance of XiX_i and get n1n\dfrac{n-1}{n}. The covariance of XiX_i and XkX_k turns out to be 1n-\dfrac{1}{n}. From the correlation formula, we obtain the correlation between any distinct XiX_i and XjX_j to be 1n1-\dfrac{1}{n-1}, just the lower bound we observed above. This generalization is consistent with our result for n equals three. At the same time, we can see that the value of the minimal correlation converges to 0 when n goes to infinity. Our expectation that adding more random variables makes it impossible to have their correlation small, is supported by this convergence.