# Calculating Variances and Regression Coefficients

• Feb 1st 2013, 03:07 PM
drabbie
Calculating Variances and Regression Coefficients
This first part I am just looking for confirmation that I am working it correctly:
I have 30 observations and sumX=30, sumX2=150, sumY=120, sumY2=1830 and sumXY=480.

I found the variance of X to be V[X]= E[X2] - (E[X])2= (150/30) - (12) = 5 - 1 = 4
the variance of X to be V[Y]= E[Y2] - (E[Y])2= (1830/30) - (42) = 61 - 16 = 45
and the covariance of X,Y to be Cov[X,Y] = E[XY] - E[X]E[Y] = (480/30) - (1)(4) = 16 - 4 = 12

Then I was asked to fit a regression line and I found beta to be Cov[X,Y]/V[X] = 12/4 = 3.
Alpha = E[Y] - beta*E[X] = 4 - 3 * 1 = 1 and the regression equation is Y = 1 + 3X

Now the part I am stuck:
Suppose I am told that the scale of the X variable is was cut in half for this data (i.e. the original variable was 2X that given above). What would we find out about our regression coefficients?

In this case my sumX=60 and sumX2=300 ? But how would I know the effect on sumXY as I don't know the actual X inputs, only that they are twice what I was originally told. And I need sumXY to calculate new regression coefficients to determine a change.

I appreciate any help figuring this part out...thanks!
• Feb 1st 2013, 04:35 PM
chiro
Re: Calculating Variances and Regression Coefficients
Hey drabbie.

Hint: Use the fact that E[aZ] = a*E[Z] (Let Z = XY).
• Feb 1st 2013, 05:45 PM
drabbie
Re: Calculating Variances and Regression Coefficients
Thank you chiro!

That's what I did for X and X2. Wonder why it is so obvious for those, but not XY?

Was I on track with the others?
• Feb 1st 2013, 06:05 PM
chiro
Re: Calculating Variances and Regression Coefficients
For E[(2X)^2] just be aware that this is 4*E[X^2] not 2*E[X^2].

Otherwise, the idea is correct.
• Feb 1st 2013, 08:30 PM
drabbie
Re: Calculating Variances and Regression Coefficients
Just to make sure I understand: E[aX]^2 = a^2 * E[X]^2. Because the whole term aX is squared rather than just the X, such as in E[X^2].

Thank you for all your help! I really appreciate it.
• Feb 1st 2013, 09:01 PM
chiro
Re: Calculating Variances and Regression Coefficients
Yes that's right, but I was also thinking of E[(aX)^2] = E[a^2*X^2] = a^2*E[X^2].