# Analytical solution to correlation between two linear combinations of values

#### BigBugBuzz

##### New Member
Greetings,

Suppose I have two linear combinations of values as follows:

Y1 = B11*X1 + B12*X2 + B13*X3

Y2 = B21*X1 + B22*X2 + B23*X3

where X1 ~ N(0,1) and X2 ~N(0,1) and X3 ~N(0,1)

Can corrY1,Y2 be derived analytically, that is, without me simulating numerous instances of Y1 and Y2 and doing statistical analysis? if so, I would very much appreciate a demonstration of how that is done, or perhaps a concrete reference to a demonstrated solution.

Last edited:

#### Dason

Cor(Y1, Y2) = Cov(Y1, Y2)/(sqrt(Var(Y1)*Var(Y2)))

Now Cov(Y1, Y2) = Cov(B11*X1 + B12*X2 + B13*X3, B21*X1 + B22*X2 + B23*X3)

Do you know any covariance rules that could allow you to break that into pairwise covariances?

#### BigBugBuzz

##### New Member
Cor(Y1, Y2) = Cov(Y1, Y2)/(sqrt(Var(Y1)*Var(Y2)))

Now Cov(Y1, Y2) = Cov(B11*X1 + B12*X2 + B13*X3, B21*X1 + B22*X2 + B23*X3)

Do you know any covariance rules that could allow you to break that into pairwise covariances?
That sounds like a trick question Well, what about the rule Cov(aX,bY) = ab*Cov(X,Y)?:

B11*B12*B21*B22*1

Then to find the correlation, I need to divide by the product of the two variable's standard deviations?

Is this on the right track?