+ Reply to Thread
Results 1 to 4 of 4

Thread: Help with covariance problem for a sum

  1. #1
    Points: 6,362, Level: 52
    Level completed: 6%, Points required for next Level: 188

    Posts
    129
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Help with covariance problem for a sum



    Hi,

    I would appreciate some help with showing:

    Cov(S[i= 1..n] Xi, S[j= 1..m] Yj) = S[i= 1.. n]S[j= 1..m](Cov(Xi, Yj)

    Where S[i= 1..n] denotes summation terms i from 1 to n; likewise for S[j= 1..m].

    = Cov(X1 + X2 + ... + Xn, Y1 + Y2 + ... + Yn)

    Now there might be a correlation with say X2 and Y5 so:

    = Cov(X1, Y1) + Cov(X1, Y2) + ... + Cov(X1, Ym) +
    Cov(X2, Y1) + Cov(X2, Y2) + ... + Cov(X2, Ym) +
    .
    .
    . +
    Cov(Xn, Y1) + Cov(Xn, Y2) + ... + Cov(Xn, Ym)

    Applying the definition of Cov(X, Y) to the above I obtain the required result.

    However I do not really understand why I need to sum the covariances for all the pairs as listed above. I know that if there is no correlation between an X, Y pair then the covariance will be 0 so they are not contributing to the sum. But why is the covariance of the sums equal to the sum of the covairances.

    A proof would be great as it would help me understand what is really going on.

    Many thanks,

    Peter

  2. #2
    Points: 6,362, Level: 52
    Level completed: 6%, Points required for next Level: 188

    Posts
    129
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Hi,

    I think that I have figured this out.

    I will post my work and maybe someone will comment on it.

    Peter

  3. #3
    Points: 6,362, Level: 52
    Level completed: 6%, Points required for next Level: 188

    Posts
    129
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I would be obliged if someone would check this:

    Expextation operator is E[X]

    Cov(X1 + X2, Y) = E[(X1 + X2)Y] - E[X1 + X2]E[Y] //def of covariance

    = E[YX1 + YX2] - E[X1 + X2]E[Y] //distribute Y into (X1 + X2)
    = E[YX1] + E[YX2] - (E[X1] + E[X2])E[Y] // property of expectation E[x + y] = E[x] + E[y]
    = E[YX1] + E[YX2] - E[Y]E[X1] - E[Y]E[X2] //distribute E[Y] into (E[X1] + E[X2])

    = E[YX1] - E[Y]E[X1] + E[YX2] - E[Y]E[X2] //group variables
    = Cov(X1, Y) + Cov(X2, Y) //def of variance


    Proved:
    Cov(X1 + X2, Y) = Cov(X1, Y) + Cov(X2, Y)


    Now try to extend this to general sum for X

    Notation: Where S[i= 1..n] denotes summation terms i from 1 to n.
    Cov(S[i= 1..n]Xi, Y) = S[i= 1..n](Cov(Xi, Yj))

    = E[(S[i= 1..n]Xi) * Y] - E[(S[i= 1..n]Xi)] * E[Y] //def of covariance
    = E[(X1 + X2 +...+ Xn)*Y] - E[X1 + X2 +...+ Xn]* E[Y] //expand out the sums
    = E[YX1 + YX2 +...+ YXn] - E[X1 + X2 +...+ Xn]* E[Y] //distribuite the Y into (X1 + X2 +...+ Xn)
    = E[YX1 + YX2 +...+ YXn] - (E[X1] + E[X2] +...+ E[Xn])* E[Y] // property of expectation E[x + y] = E[x] + E[y]
    = E[YX1] + E[YX2] +...+ E[YXn] - (E[X1] + E[X2] +...+ E[Xn])* E[Y] // property of expectation E[x + y] = E[x] + E[y]
    = E[YX1] + E[YX2] +...+ E[YXn] -(E[Y]E[X1] + E[Y]E[X2] + E[Y]E[Xn]) // property of expectation E[x + y] = E[x] + E[y]
    = E[YX1] + E[YX2] +...+ E[YXn] - E[Y]E[X1] - E[Y]E[X2] - E[Y]E[Xn] // distribuite the -
    = E[YX1] - E[Y]E[X1] + E[YX2] - E[Y]E[X2] +...+ E[YXn] - E[Y]E[Xn] // group the variables
    = Cov(X1, Y) + Cov(X2, Y) +...+ Cov(Xn, Y) //def of variance
    = S[i= 1..n]Cov(Xi, Y) // apply summation operator, proved

    Proved:
    Cov(S[i= 1..n]Xi, Y) = S[i= 1..n](Cov(Xi, Y)), call this equation *

    Now try to extend for general sum of Y

    Notation: Where S[j= 1..m] denotes summation terms j from 1 to m.

    To prove:
    Cov(S[i= 1..n]Xi, S[j= 1..m]Yj) = S[i= 1.. n]S[j= 1..m](Cov(Xi, Yj))

    Start with:

    Cov(S[i= 1..n]Xi, Y) = S[i= 1..n](Cov(Xi, Y))
    = S[i= 1..n](Cov(Xi, S[j= 1..m]Yj)) //instantiate with Y = S[j= 1..m]Yj
    = S[i= 1..n](Cov(S[j= 1..m]Yj, Xi,)) // covariance commutes
    = S[i= 1..n]S[j= 1..m](Cov(Yj, Xi,)) //apply equation * with X & Y interchanged
    = S[i= 1..n]S[j= 1..m](Cov(Xi, Yj)) // covariance commutes, proved

    Proved:
    Cov(S[i= 1..n]Xi, S[j= 1..m]Yj) = S[i= 1.. n]S[j= 1..m](Cov(Xi, Yj))

    Peter

  4. #4
    TS Contributor
    Points: 5,172, Level: 46
    Level completed: 11%, Points required for next Level: 178

    Location
    Athens , Greece
    Posts
    330
    Thanks
    0
    Thanked 4 Times in 2 Posts

    I think it's right (I skimmed along the lines..)

    You could find this in a regression textbook in sections proving BLUEs etc. I remember I had to prove this for my Regression Analysis exams couple of years ago.

+ Reply to Thread

Similar Threads

  1. Effect on covariance?
    By stud40111 in forum Statistics
    Replies: 1
    Last Post: 10-05-2010, 03:53 PM
  2. covariance/correlation problem
    By pc678 in forum Statistics
    Replies: 2
    Last Post: 10-05-2008, 10:41 AM
  3. covariance
    By smallkai in forum Statistics
    Replies: 2
    Last Post: 07-20-2008, 12:36 PM
  4. Covariance
    By statsrocks in forum Statistics
    Replies: 2
    Last Post: 05-27-2008, 03:38 AM
  5. Replies: 2
    Last Post: 02-24-2008, 09:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts








Advertise on Talk Stats