The variance formula is easily extended to multiple variables if you use a little matrix algebra. Say SD is an nX1 standard deviation vector, SD' is the transpose and P is the nXn correlation matrix. Just multiply SD' X P X SD (in this case, you'll want the weights multiplied to the corresponding entries in the SD vectors before you start).
|