Google Answers Logo
View Question
 
Q: Covariance of two weighted sums ( Answered 5 out of 5 stars,   0 Comments )
Question  
Subject: Covariance of two weighted sums
Category: Science > Math
Asked by: eg-ga
List Price: $20.00
Posted: 02 Oct 2002 11:41 PDT
Expires: 01 Nov 2002 10:41 PST
Question ID: 71721
What is the formula for the covariance of two weighted sums of random
variables in terms of the covariance matrix of the component
variables? i.e. Given a covariance matrix for n random variables
X1...Xn, how do I compute the covariance of a1*X1 + ... + an*Xn and
b1*X1 + ... + bn*Xn?
Answer  
Subject: Re: Covariance of two weighted sums
Answered By: calebu2-ga on 02 Oct 2002 13:02 PDT
Rated:5 out of 5 stars
 
eg-ga,

The best way to answer this question is to write down the definitions
and go from there. I'm not sure what you need the result for, so I'll
just give you the answer and the way I would go about obtaining the
answer. If you want an interpretation of the result, let me know what
context you are looking at it under (eg. are you asking this from a
statistical standpoint alone or does it have to pertain to some
scientific model or econometric application - such as portfolio
weights). (I'll also assume that it isn't a homework question for
stats 201 - if it is I encourage you to think through the steps rather
than copying verbatim).

One more point - doing equations in text is kind of tough, but
hopefully you understand my notation. If not, I will try to clarify.

The covariance matrix of (X1, ..., Xn) can be written as (I will use
discrete variables with S states of nature, but you can just as easily
replace the sums with integration - I just don't want to complicate
it)

Define the covariance matrix M of X :

M = cov = sum{over s}[p(s) * (X(s) - E(X))(X(s) - E(X))^T]

Where p(s) is the probability of state s happening
X(s) is the vector X1, ..., Xn in state s.
E(X) is the vector of expected value (sum[p(s) * X(s)])
and ^T means take the transpose of the vector.

Define A = a1*X1 + ... + an*Xn = a^T X (a is the vector of a1, ...,
an)
and    B = b1*X1 + ... + bn*Xn = b^T X

Then the expected value of A and B are :
E(A) = a1*E(X1) + ... + an*E(Xn) = a^T E(X)
E(B) = b^T E(X)

Given this we can calculate the Covariance which is :
cov(A, B) = sum{over s}[p(s) * (A - E(A))(B - E(B))]
          = sum{over s}[p(s) * (a^T (X - E(X))(b^T (X - E(X))]
          = sum{over s}[p(s) * (a^T (X - E(X))((X - E(X)^T b)]
          = a^T sum{over s}[p(s) * (X - E(X))(X - E(X))^T] b

Which, substituting in our variance-covariance matrix M gives :

cov(A, B) = a^T M b

(written another way) = sum{over i,j}[ai*bj*Mij]

So there's your result - it's the cross-weighted sum of the elements
of the covariance matrix for X.

It makes sense then that var(A) = a^T M a (quadratic form)
and var(B) = b^T M b.

Hope that helps and good luck. Regards,

Calebu2-ga

P.S. Typically I would give some kind of search strategy for an
answer, however in this case you are often best served with a good
textbook (my recommendation would depend on whether you intend to
apply this result to anything or not) or a good website.

The best site that I use for reference on statistics in
mathworld.wolfram.com. (I'm sure there are others but this is my
favorite).
eg-ga rated this answer:5 out of 5 stars

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy