# How to find covariation and correlation between random variables

If there are independent random variables $$X_1,\ldots,X_3, D(X_i)=\sigma^2, i=1,\ldots,3$$

Then find correlation and covariance between variables $$X_1+2X_2+X_3$$ and $$2X_1-X_2+6X_3$$. I have no idea how to do it. But here is my take: $$\operatorname{Cov}(X_1+2X_2+X_3,2X_1-X_2+6X_3)$$

Here is my solution:

$$Cov(X_1,2X_1-X_2+6X_3)+Cov(2X_2,2X_1-X_2+6X_3)+Cov(X_3,2X_1-X_2+6X_3)=Cov(X1,2X_1)-Cov(X_1,X_2)+Cov(X_1,6X_3)+Cov(2X_2,2X_1)-Cov(2X_2,X_2)+Cov(2X_2,6X_3)+Cov(X_3,2X_1)-Cov(X_3,X_2)+Cov(X_3,6X_3)=2Var(X_1)-2Var(X_2)+6Var(X_3)=6\sigma^2$$ Can someone help me?

• Hint: covariance is linear in both its arguments. Moreover it takes value is zero if the arguments are independent. – drhab Dec 29 '19 at 20:49
• More specific: Covariance is bilinear. – callculus Dec 29 '19 at 20:57
• @callculus Maybe some of you have another hint, I'm really not getting it. – user Dec 29 '19 at 21:31
• $=2Cov(X_1,X_1)-Cov(X_1,X_2)+6Cov(X_1,X_3)+\cdots+6Cov(X_3,X_3)=...$ – Jean Marie Dec 29 '19 at 22:51
• @user If have any further question, feel free to ask. – callculus Dec 29 '19 at 23:56

I show you the case with a linear combination of two variables. It a bit similar like multiplying out of ordinary brackets.

\begin{align} & cov(a_1X_1+b_1X_2, a_2X_1+b_2X_2) \\\\ & \\\\ &=cov(a_1X_1, a_2X_1+b_2X_2)+cov(b_1X_2, a_2X_1+b_2X_2) \\\\ & \\\\ & =cov(a_1X_1, a_2X_1)+cov(a_1X_1,b_2X_2)+cov(b_1X_2, a_2X_1)+cov(b_1X_2, b_2X_2)\\\\ & \\\\ &=a_1a_2\cdot cov(X_1,X_1)+a_1b_2\cdot cov(X_1,X_2)+a_2b_1\cdot cov(X_1,X_2)+b_1b_2\cdot cov(X_2,X_2) \end{align}

Due the independence of $$X_1$$ and $$X_2$$ we have $$cov(X_1,X_2)=0$$. And the covariance of $$X_1$$ and $$X_1$$ is the variance of $$X_1$$.

\begin{align} & =a_1a_2\cdot Var(X_1)+b_1b_2\cdot var(X_2) \end{align}

You just have to transfer the calculation/result to the case of three random variables.

$$corr(Y_1,Y_2)=\frac{cov(Y_1,Y_2)}{\sqrt{var(Y_1)\cdot var(Y_2)}}$$

The term of the numerator is already calculated. And

$$var(Y_i)=var(aX_1+bX_2+cX_3)=a^2var(X_1)+b^2var(X_2)+c^2var(X_3)$$,

if the $$X_i's$$ are independent.

• I added my result, wanted to check if I am correct. – user Jan 2 at 19:47
• @user It looks perfect. – callculus Jan 2 at 20:01
• #callculus Ok, and what about correlation, how to find that? – user Jan 2 at 20:18
• @user I´ve made an edit. – callculus Jan 2 at 23:48