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)=σXσYcov(X,Y)=σXσYE[(X−mux)(Y−muY)] Using the linearity of expectations and the standard deviation formula, this can be further expanded as: corr(X,Y)=E(X2)−E(X)2⋅E(Y2)−E(Y)2E(XY)−E(μyX)−E(μxY)+E(μxμy) As, from linearity, E(μyX)=E(μxY)=E(μxμy)=E(X)E(Y), we get: corr(X,Y)=E(X2)−E(X)2⋅E(Y2)−E(Y)2E(XY)−E(X)E(Y)
Property 1: The correlation coefficient takes values from -1 to 1
Proof:
Let X and Y be two random variables. We know that cX+Y is also an RV for any c∈R, and, by definition, the variance of any RV is positive. We thus now have: Looking now at RHS, as a quadratic function of c that is non-negative, we can affirm that its discriminant is non-positive. Δ=(2c⋅cov(X,Y))2−4c2⋅var(X)var(Y)≤0 Consequently, (2c⋅cov(X,Y))2≤4c2⋅var(X)var(Y) If var(X)⋅var(Y)=0 then X or Y must be a constant, thus corr(X,Y)=0∈[−1,1] ✅. Otherwise, we can divide by it, and get: 4c2⋅var(X)var(Y)(2c⋅cov(X,Y))2≤1 We further simplify: var(X)var(Y)(cov(X,Y))2≤1(var(X)var(Y)cov(X,Y))2≤1 We notice that we can replace LHS with corr, and get: (corr(X,Y))2≤1 From this we get our final conclusion: −1≤corr(X,Y)≤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.:
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 Xi a set of random variables; then, we know that the variance of any weighted sum is non-negative, i.e.: var(i∑ciXi)≥0,∀ci∈R Thus: i∑j∑cicjcov(Xi,Xj)≥0,∀ci,cj∈R Denoting C=(c1,...,cn) and M=(cov(Xi,Xj))i,j, we get that CTMC≥0,∀C∈Rn (1). Similarly, denoting C′=(c1⋅σX1,...,cn⋅σXn) and M′=(corr(Xi,Xj))i,j=(σXiσXjcov(Xi,Xj))i,j, we get that: (C′)TM′C′≥0,∀C∈Rn (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)=−1 then corr(Y,Z)=1.
Proof:
The proof of this property is a direct consequence of the previous one. Let corr(Y,Z)=ρ, and write the correlation matrix of the 3 random variables: corr()=corr(X,X)corr(Y,X)corr(Z,X)corr(X,Y)corr(Y,Y)corr(Z,Y)corr(X,Z)corr(Y,Z)corr(Z,Z)=1−1−1−11ρ−1rho1 The determinant of this matrix is −1+2⋅ρ−ρ2≥0 since the matrix is positive semi-definite. −(1−ρ)2≥0⇔1−ρ=0⇔ρ=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 ρ are -1 and 1. We can easily see that ρ can’t be equal to -1. If the pairs (X,Y) and (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 ρ would be 0. So, our minimal value is in the interval (−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ρρρD1=∣1∣≥0 ✅ D2=1ρρ1=1−ρ2≥0 (by Property 2) ✅ D3=1ρ1ρ11ρρρ=(1−ρ)2⋅(1+2ρ)≥0⟺ρ≥−21 (To get to this, use, for example, the Rule of Sarrus + Factorize) Now we have reduced the interval for ρ, and the minimal value that ρ can take is at least −21. If we find a triplet of random variables with pairwise correlations of −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,A3 be independent identically distributed standard uniform random variables and consider Xi=Ai−A. If we expand the average and compute the coefficients, we get a simplified formula for the Xi‘s: Xi=32Ai−31∑j=iAj We compute the variance of the Xi‘s by using the formula for the linear combination of independent random variables (in our case the Ais). The variance of Ai is equal to 1 and the covariance of Ai and Aj, with i=j is 0 as they are independent: var(Xi)=var(32Ai−31∑j=iAj)=94var(Ai)+∑j=i(−31)2var(Aj)+∑j=iC⋅cov(Ai,Aj)var(Xi)=94+2⋅91=96=32,∀i∈1,2,3 Thinking back to the correlation formula, we are missing the covariance between Xi and Xk. 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(32Ai−31∑j=iAj,32Ak−31∑j=kAj)cov(Xi,Xj)=−92cov(Ai,Ai)−92cov(Ak,Ak)+91∑j=kcov(Aj,Aj)+∑j1=j2C⋅cov(Aj1,Aj2)cov(Xi,Xj)=−92−92+91=−93=−31,∀i,k∈1,2,3,i=k Thus, corr(Xi,Xk)=var(Xi)var(Xk)cov(Xi,Xk)=32−31=−21,∀i,k∈1,2,3,i=k For this construction, all the pairwise correlations are equal to −21. Thus, we’ve obtained the minimum possible value for ρ. ✅
General Case
We have the correct result for the case of 3 random variables. Can we generalize it? How about the minimum value of ρ 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 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×n matrix. However, we can use the decomposition along a column and induction to prove that its value is: D=(1−ρ)n−1(1+(n−1)ρ) For this to be greater than or equal to 0, we must have that: ρ≥−nn−11. We again construct the random variables Xi as the difference between Ai and the mean of the As, where Ai are iid standard uniform. With similar rationing as in the previous part, we compute the variance of Xi and get nn−1. The covariance of Xi and Xk turns out to be −n1. From the correlation formula, we obtain the correlation between any distinct Xi and Xj to be −n−11, 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.