[Math] Correlation between two linear combinations of random variables

correlationprobabilityrandom variablesstatistics

Let $X_1, X_2, X_3, X_4$ be independent random variables with $\operatorname{var}(X_i)=1$, and

$$U = 2X_1+X_2+X_3$$
$$ V = X_2+X_3 + 2X_4$$

Find $\operatorname{corr}(U, V)$

In general, how can I calculate the correlation between two linear combinations of independent $X_i$ such as $U$ and $V$ knowing only $\operatorname{var}(X_i)$?

Or what if they weren't independent, but I had their covariance or correlation matrix?

Best Answer

Hints:

  • You do not know the means of the $X_i$, but life would be simpler of you assumed they were $0$; if they are not, then consider $X_i-E[X_i]$ instead, with the same variances and covariances

  • If the means are $0$ then $\operatorname{var}(A)= E[A^2]$ and $\operatorname{cov}[A,B]=E[AB]$ and $\operatorname{corr}(A,B) = \frac{\operatorname{cov}[A,B]}{\sqrt{\operatorname{var}(A)}\sqrt{\operatorname{var}(B)}}$

  • If $A$ and $B$ are independent with positive finite variances then $\operatorname{cov}[A,B]=0$ and $\operatorname{corr}(A,B) = 0$

  • $E[nC+mD]=nE[C]+mE[D]$

So finding $\operatorname{corr}(U,V)$ is just a matter of substitution, multiplying and tidying up