What is the way to find a correlation between two variables, where $X_1,X_2,X_3$ are independent and random variable is a linear equation of these variables. Also, how to find an value of $a_1$, so that two variables are uncorrelated? For example if variables are given as $X_1+2X_2$ and $3X_1+aX_2$. Thanks for any advice!


We have $X_1,X_2$ and $X_3$ independent.

Let $U=a_1X_1+a_2X_2+a_3X_3$ and $V=b_1X_1+b_2X_2+b_3X_3$


if $ k \ne j$, $cov(X_k,X_j)=0$

$$Corr(U,V)=\frac{a_1 b_1var(X_1)+a_2 b_2var(X_2)+a_3b_3var(X_3)}{\sqrt{cov(U,U)cov(V,V)}}$$

$$cov(U,U)=a_1^2var(X_1)+a_2^2var(X_2)+a_3^2var(X_3)$$ $$cov(V,V)=b_1^2var(X_1)+b_2^2var(X_2)+b_3^2var(X_3)$$


$$Corr(U,V)=\frac{a_1 b_1var(X_1)+a_2 b_2var(X_2)+a_3b_3var(X_3)}{\sqrt{\left(a_1^2var(X_1)+a_2^2var(X_2)+a_3^2var(X_3)\right)\left(b_1^2var(X_1)+b_2^2var(X_2)+b_3^2var(X_3)\right)}}$$

Now, if you want the correlation between $X_1+2X_2$ and $3X_1+aX_2$ to be zero, in other words, their covariance should be nil:


because $X_1$ and $X_2$ are independent, we have $cov(X_1,X_2)=0$

You choose $$a=-\frac{3var(X_1)}{2 var(X_2)}$$

| cite | improve this answer | |
  • $\begingroup$ ok, thank you. But how o find correlation itself? $\endgroup$ – user Jan 2 at 20:38
  • $\begingroup$ you said it is uncorrelated. $\endgroup$ – Canardini Jan 2 at 20:39
  • $\begingroup$ Yes, there are two questions: one is to find such $a$ that randm variables are uncorrelated but how do I calculate correlation between random variables? $\endgroup$ – user Jan 2 at 20:44
  • $\begingroup$ Check the edit, you have both cases $\endgroup$ – Canardini Jan 2 at 20:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.