Correlation between two linear combinations of random variables

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












Let $X_1, X_2, X_3, X_4$ be independent random variables with $operatornamevar(X_i)=1$, and



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



Find $operatornamecorr(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 $operatornamevar(X_i)$?



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







share|cite|improve this question





















  • You can just go to this question. The answer are great.
    – M. Cris
    Jul 28 at 22:30










  • This question has no answer unless you know how $X_i$'s depend on each other.
    – Kavi Rama Murthy
    Jul 28 at 23:11










  • @KaviRamaMurthy I'm sorry! I forgot to mention the X's are independent
    – Duars
    Jul 28 at 23:14










  • I think Henry's answer below is too complicated. See my answer.
    – Michael Hardy
    Jul 30 at 1:35














up vote
1
down vote

favorite












Let $X_1, X_2, X_3, X_4$ be independent random variables with $operatornamevar(X_i)=1$, and



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



Find $operatornamecorr(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 $operatornamevar(X_i)$?



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







share|cite|improve this question





















  • You can just go to this question. The answer are great.
    – M. Cris
    Jul 28 at 22:30










  • This question has no answer unless you know how $X_i$'s depend on each other.
    – Kavi Rama Murthy
    Jul 28 at 23:11










  • @KaviRamaMurthy I'm sorry! I forgot to mention the X's are independent
    – Duars
    Jul 28 at 23:14










  • I think Henry's answer below is too complicated. See my answer.
    – Michael Hardy
    Jul 30 at 1:35












up vote
1
down vote

favorite









up vote
1
down vote

favorite











Let $X_1, X_2, X_3, X_4$ be independent random variables with $operatornamevar(X_i)=1$, and



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



Find $operatornamecorr(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 $operatornamevar(X_i)$?



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







share|cite|improve this question













Let $X_1, X_2, X_3, X_4$ be independent random variables with $operatornamevar(X_i)=1$, and



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



Find $operatornamecorr(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 $operatornamevar(X_i)$?



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









share|cite|improve this question












share|cite|improve this question




share|cite|improve this question








edited Jul 30 at 1:21









Michael Hardy

204k23185461




204k23185461









asked Jul 28 at 22:27









Duars

155




155











  • You can just go to this question. The answer are great.
    – M. Cris
    Jul 28 at 22:30










  • This question has no answer unless you know how $X_i$'s depend on each other.
    – Kavi Rama Murthy
    Jul 28 at 23:11










  • @KaviRamaMurthy I'm sorry! I forgot to mention the X's are independent
    – Duars
    Jul 28 at 23:14










  • I think Henry's answer below is too complicated. See my answer.
    – Michael Hardy
    Jul 30 at 1:35
















  • You can just go to this question. The answer are great.
    – M. Cris
    Jul 28 at 22:30










  • This question has no answer unless you know how $X_i$'s depend on each other.
    – Kavi Rama Murthy
    Jul 28 at 23:11










  • @KaviRamaMurthy I'm sorry! I forgot to mention the X's are independent
    – Duars
    Jul 28 at 23:14










  • I think Henry's answer below is too complicated. See my answer.
    – Michael Hardy
    Jul 30 at 1:35















You can just go to this question. The answer are great.
– M. Cris
Jul 28 at 22:30




You can just go to this question. The answer are great.
– M. Cris
Jul 28 at 22:30












This question has no answer unless you know how $X_i$'s depend on each other.
– Kavi Rama Murthy
Jul 28 at 23:11




This question has no answer unless you know how $X_i$'s depend on each other.
– Kavi Rama Murthy
Jul 28 at 23:11












@KaviRamaMurthy I'm sorry! I forgot to mention the X's are independent
– Duars
Jul 28 at 23:14




@KaviRamaMurthy I'm sorry! I forgot to mention the X's are independent
– Duars
Jul 28 at 23:14












I think Henry's answer below is too complicated. See my answer.
– Michael Hardy
Jul 30 at 1:35




I think Henry's answer below is too complicated. See my answer.
– Michael Hardy
Jul 30 at 1:35










3 Answers
3






active

oldest

votes

















up vote
1
down vote













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 $operatornamevar(A)= E[A^2]$ and $operatornamecov[A,B]=E[AB]$ and $operatornamecorr(A,B) = fracoperatornamecov[A,B]sqrtoperatornamevar(A)sqrtoperatornamevar(B)$


  • If $A$ and $B$ are independent with positive finite variances then $operatornamecov[A,B]=0$ and $operatornamecorr(A,B) = 0$


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


So finding $operatornamecorr(U,V)$ is just a matter of substitution, multiplying and tidying up






share|cite|improve this answer























  • I cleaned up your MathJax usage. See my edits for proper usage.
    – Michael Hardy
    Jul 30 at 1:25










  • Certainly someone doing problems like this should rely on the bilinearity of covariance.
    – Michael Hardy
    Jul 30 at 1:34

















up vote
0
down vote













beginalign
& operatornamecov(U,V) \[10pt]
= & operatornamecov(2X_1+X_2+X_3,X_2+X_3 + 2X_4) \[10pt]
= & 2operatornamecov(X_1,, X_2+X_3 + 2X_4) + operatornamecov(X_2,,X_2+X_3 + 2X_4) + operatornamecov(X_3,,X_2+X_3+2X_4)
endalign
I.e. covariance is linear in the first argument. Then for something like
$operatornamecov(X_1,,X_2+X_3+2X_4),$ write
beginalign
& operatornamecov(X_1,,X_2+X_3+2X_4) \[10pt]
= & operatornamecov(X_1,,X_2) + operatornamecov(X_1,,X_3) + 2operatornamecov(X_1,,X_4)
endalign
and so on.



For $operatornamevar (U),$ you have
$$
operatornamevar(2X_1+X_2+X_3) = 2^2operatornamevar(X_1) +operatornamevar(X_2) + operatornamevar(X_3).
$$






share|cite|improve this answer




























    up vote
    0
    down vote













    When $A,B,C$ are pairwise independent, the bilinearity of covariance states:



    $$mathsfCov(A+B,B+C)~=mathsf Cov(A,B)+mathsf Cov(A,C)+mathsf Cov(B,B)+mathsf Cov(B,C)\=0+0+mathsfVar(B)+0$$



    Just apply this principle to to find the covariance for your $U,V$.



    ...and of course, as $mathsfVar(A+B)=mathsf Cov(A+B,A+B)$, then the variances of $U,V$ may be found in the same manner.




    PS: Of course, if the $X_i$ variables are not uncorrelated, then those covariances will not be zero.   However, the bilinearity rule is still usable.








    share|cite|improve this answer





















      Your Answer




      StackExchange.ifUsing("editor", function ()
      return StackExchange.using("mathjaxEditing", function ()
      StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
      StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
      );
      );
      , "mathjax-editing");

      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "69"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      convertImagesToLinks: true,
      noModals: false,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      noCode: true, onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );








       

      draft saved


      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2865621%2fcorrelation-between-two-linear-combinations-of-random-variables%23new-answer', 'question_page');

      );

      Post as a guest






























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      1
      down vote













      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 $operatornamevar(A)= E[A^2]$ and $operatornamecov[A,B]=E[AB]$ and $operatornamecorr(A,B) = fracoperatornamecov[A,B]sqrtoperatornamevar(A)sqrtoperatornamevar(B)$


      • If $A$ and $B$ are independent with positive finite variances then $operatornamecov[A,B]=0$ and $operatornamecorr(A,B) = 0$


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


      So finding $operatornamecorr(U,V)$ is just a matter of substitution, multiplying and tidying up






      share|cite|improve this answer























      • I cleaned up your MathJax usage. See my edits for proper usage.
        – Michael Hardy
        Jul 30 at 1:25










      • Certainly someone doing problems like this should rely on the bilinearity of covariance.
        – Michael Hardy
        Jul 30 at 1:34














      up vote
      1
      down vote













      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 $operatornamevar(A)= E[A^2]$ and $operatornamecov[A,B]=E[AB]$ and $operatornamecorr(A,B) = fracoperatornamecov[A,B]sqrtoperatornamevar(A)sqrtoperatornamevar(B)$


      • If $A$ and $B$ are independent with positive finite variances then $operatornamecov[A,B]=0$ and $operatornamecorr(A,B) = 0$


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


      So finding $operatornamecorr(U,V)$ is just a matter of substitution, multiplying and tidying up






      share|cite|improve this answer























      • I cleaned up your MathJax usage. See my edits for proper usage.
        – Michael Hardy
        Jul 30 at 1:25










      • Certainly someone doing problems like this should rely on the bilinearity of covariance.
        – Michael Hardy
        Jul 30 at 1:34












      up vote
      1
      down vote










      up vote
      1
      down vote









      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 $operatornamevar(A)= E[A^2]$ and $operatornamecov[A,B]=E[AB]$ and $operatornamecorr(A,B) = fracoperatornamecov[A,B]sqrtoperatornamevar(A)sqrtoperatornamevar(B)$


      • If $A$ and $B$ are independent with positive finite variances then $operatornamecov[A,B]=0$ and $operatornamecorr(A,B) = 0$


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


      So finding $operatornamecorr(U,V)$ is just a matter of substitution, multiplying and tidying up






      share|cite|improve this 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 $operatornamevar(A)= E[A^2]$ and $operatornamecov[A,B]=E[AB]$ and $operatornamecorr(A,B) = fracoperatornamecov[A,B]sqrtoperatornamevar(A)sqrtoperatornamevar(B)$


      • If $A$ and $B$ are independent with positive finite variances then $operatornamecov[A,B]=0$ and $operatornamecorr(A,B) = 0$


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


      So finding $operatornamecorr(U,V)$ is just a matter of substitution, multiplying and tidying up







      share|cite|improve this answer















      share|cite|improve this answer



      share|cite|improve this answer








      edited Jul 30 at 1:24









      Michael Hardy

      204k23185461




      204k23185461











      answered Jul 28 at 23:52









      Henry

      92.8k469147




      92.8k469147











      • I cleaned up your MathJax usage. See my edits for proper usage.
        – Michael Hardy
        Jul 30 at 1:25










      • Certainly someone doing problems like this should rely on the bilinearity of covariance.
        – Michael Hardy
        Jul 30 at 1:34
















      • I cleaned up your MathJax usage. See my edits for proper usage.
        – Michael Hardy
        Jul 30 at 1:25










      • Certainly someone doing problems like this should rely on the bilinearity of covariance.
        – Michael Hardy
        Jul 30 at 1:34















      I cleaned up your MathJax usage. See my edits for proper usage.
      – Michael Hardy
      Jul 30 at 1:25




      I cleaned up your MathJax usage. See my edits for proper usage.
      – Michael Hardy
      Jul 30 at 1:25












      Certainly someone doing problems like this should rely on the bilinearity of covariance.
      – Michael Hardy
      Jul 30 at 1:34




      Certainly someone doing problems like this should rely on the bilinearity of covariance.
      – Michael Hardy
      Jul 30 at 1:34










      up vote
      0
      down vote













      beginalign
      & operatornamecov(U,V) \[10pt]
      = & operatornamecov(2X_1+X_2+X_3,X_2+X_3 + 2X_4) \[10pt]
      = & 2operatornamecov(X_1,, X_2+X_3 + 2X_4) + operatornamecov(X_2,,X_2+X_3 + 2X_4) + operatornamecov(X_3,,X_2+X_3+2X_4)
      endalign
      I.e. covariance is linear in the first argument. Then for something like
      $operatornamecov(X_1,,X_2+X_3+2X_4),$ write
      beginalign
      & operatornamecov(X_1,,X_2+X_3+2X_4) \[10pt]
      = & operatornamecov(X_1,,X_2) + operatornamecov(X_1,,X_3) + 2operatornamecov(X_1,,X_4)
      endalign
      and so on.



      For $operatornamevar (U),$ you have
      $$
      operatornamevar(2X_1+X_2+X_3) = 2^2operatornamevar(X_1) +operatornamevar(X_2) + operatornamevar(X_3).
      $$






      share|cite|improve this answer

























        up vote
        0
        down vote













        beginalign
        & operatornamecov(U,V) \[10pt]
        = & operatornamecov(2X_1+X_2+X_3,X_2+X_3 + 2X_4) \[10pt]
        = & 2operatornamecov(X_1,, X_2+X_3 + 2X_4) + operatornamecov(X_2,,X_2+X_3 + 2X_4) + operatornamecov(X_3,,X_2+X_3+2X_4)
        endalign
        I.e. covariance is linear in the first argument. Then for something like
        $operatornamecov(X_1,,X_2+X_3+2X_4),$ write
        beginalign
        & operatornamecov(X_1,,X_2+X_3+2X_4) \[10pt]
        = & operatornamecov(X_1,,X_2) + operatornamecov(X_1,,X_3) + 2operatornamecov(X_1,,X_4)
        endalign
        and so on.



        For $operatornamevar (U),$ you have
        $$
        operatornamevar(2X_1+X_2+X_3) = 2^2operatornamevar(X_1) +operatornamevar(X_2) + operatornamevar(X_3).
        $$






        share|cite|improve this answer























          up vote
          0
          down vote










          up vote
          0
          down vote









          beginalign
          & operatornamecov(U,V) \[10pt]
          = & operatornamecov(2X_1+X_2+X_3,X_2+X_3 + 2X_4) \[10pt]
          = & 2operatornamecov(X_1,, X_2+X_3 + 2X_4) + operatornamecov(X_2,,X_2+X_3 + 2X_4) + operatornamecov(X_3,,X_2+X_3+2X_4)
          endalign
          I.e. covariance is linear in the first argument. Then for something like
          $operatornamecov(X_1,,X_2+X_3+2X_4),$ write
          beginalign
          & operatornamecov(X_1,,X_2+X_3+2X_4) \[10pt]
          = & operatornamecov(X_1,,X_2) + operatornamecov(X_1,,X_3) + 2operatornamecov(X_1,,X_4)
          endalign
          and so on.



          For $operatornamevar (U),$ you have
          $$
          operatornamevar(2X_1+X_2+X_3) = 2^2operatornamevar(X_1) +operatornamevar(X_2) + operatornamevar(X_3).
          $$






          share|cite|improve this answer













          beginalign
          & operatornamecov(U,V) \[10pt]
          = & operatornamecov(2X_1+X_2+X_3,X_2+X_3 + 2X_4) \[10pt]
          = & 2operatornamecov(X_1,, X_2+X_3 + 2X_4) + operatornamecov(X_2,,X_2+X_3 + 2X_4) + operatornamecov(X_3,,X_2+X_3+2X_4)
          endalign
          I.e. covariance is linear in the first argument. Then for something like
          $operatornamecov(X_1,,X_2+X_3+2X_4),$ write
          beginalign
          & operatornamecov(X_1,,X_2+X_3+2X_4) \[10pt]
          = & operatornamecov(X_1,,X_2) + operatornamecov(X_1,,X_3) + 2operatornamecov(X_1,,X_4)
          endalign
          and so on.



          For $operatornamevar (U),$ you have
          $$
          operatornamevar(2X_1+X_2+X_3) = 2^2operatornamevar(X_1) +operatornamevar(X_2) + operatornamevar(X_3).
          $$







          share|cite|improve this answer













          share|cite|improve this answer



          share|cite|improve this answer











          answered Jul 30 at 1:32









          Michael Hardy

          204k23185461




          204k23185461




















              up vote
              0
              down vote













              When $A,B,C$ are pairwise independent, the bilinearity of covariance states:



              $$mathsfCov(A+B,B+C)~=mathsf Cov(A,B)+mathsf Cov(A,C)+mathsf Cov(B,B)+mathsf Cov(B,C)\=0+0+mathsfVar(B)+0$$



              Just apply this principle to to find the covariance for your $U,V$.



              ...and of course, as $mathsfVar(A+B)=mathsf Cov(A+B,A+B)$, then the variances of $U,V$ may be found in the same manner.




              PS: Of course, if the $X_i$ variables are not uncorrelated, then those covariances will not be zero.   However, the bilinearity rule is still usable.








              share|cite|improve this answer

























                up vote
                0
                down vote













                When $A,B,C$ are pairwise independent, the bilinearity of covariance states:



                $$mathsfCov(A+B,B+C)~=mathsf Cov(A,B)+mathsf Cov(A,C)+mathsf Cov(B,B)+mathsf Cov(B,C)\=0+0+mathsfVar(B)+0$$



                Just apply this principle to to find the covariance for your $U,V$.



                ...and of course, as $mathsfVar(A+B)=mathsf Cov(A+B,A+B)$, then the variances of $U,V$ may be found in the same manner.




                PS: Of course, if the $X_i$ variables are not uncorrelated, then those covariances will not be zero.   However, the bilinearity rule is still usable.








                share|cite|improve this answer























                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  When $A,B,C$ are pairwise independent, the bilinearity of covariance states:



                  $$mathsfCov(A+B,B+C)~=mathsf Cov(A,B)+mathsf Cov(A,C)+mathsf Cov(B,B)+mathsf Cov(B,C)\=0+0+mathsfVar(B)+0$$



                  Just apply this principle to to find the covariance for your $U,V$.



                  ...and of course, as $mathsfVar(A+B)=mathsf Cov(A+B,A+B)$, then the variances of $U,V$ may be found in the same manner.




                  PS: Of course, if the $X_i$ variables are not uncorrelated, then those covariances will not be zero.   However, the bilinearity rule is still usable.








                  share|cite|improve this answer













                  When $A,B,C$ are pairwise independent, the bilinearity of covariance states:



                  $$mathsfCov(A+B,B+C)~=mathsf Cov(A,B)+mathsf Cov(A,C)+mathsf Cov(B,B)+mathsf Cov(B,C)\=0+0+mathsfVar(B)+0$$



                  Just apply this principle to to find the covariance for your $U,V$.



                  ...and of course, as $mathsfVar(A+B)=mathsf Cov(A+B,A+B)$, then the variances of $U,V$ may be found in the same manner.




                  PS: Of course, if the $X_i$ variables are not uncorrelated, then those covariances will not be zero.   However, the bilinearity rule is still usable.









                  share|cite|improve this answer













                  share|cite|improve this answer



                  share|cite|improve this answer











                  answered Jul 30 at 1:43









                  Graham Kemp

                  80k43275




                  80k43275






















                       

                      draft saved


                      draft discarded


























                       


                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2865621%2fcorrelation-between-two-linear-combinations-of-random-variables%23new-answer', 'question_page');

                      );

                      Post as a guest













































































                      Comments

                      Popular posts from this blog

                      What is the equation of a 3D cone with generalised tilt?

                      Color the edges and diagonals of a regular polygon

                      Relationship between determinant of matrix and determinant of adjoint?