Prof. Bryan Caplan
bcaplan@gmu.edu
http://www.gmu.edu/departments/economics/bcaplan
Econ 637
Spring, 1998
HW#2 Answer Key
3.5. y=i*b1+e naturally has RSS=e'e.
Pre-multiply both sides by A to get: Ay=Ai*b1+Ae. p.73 notes that Ai=0 and Ae=e, so:
Ay=y*=e. Therefore, y*'y*=e'e, the RSS of the original regression.
To prove that the estimated coefficient b1 of the regression y=i*b1+e equals
:
e=y-b1 (since your X variable is always equal to 1).
.
To minimize the sum of squared errors, differentiate the above expression and set it equal to zero:

QED.
3.9. This is a complicated problem that must be broken down into several smaller parts. Since we aren't going to be testing anything about the constant term, it is easiest to switch to deviation form:
, so:
.
Next, note that on p.71, Example 3.2 provides you with sigma-notation formulae for b1, b2, and b3:

Next, plug in all of the data provided to you in the problem:
.
This is just a standard linear equation; pre-multiply both sides by the inverse of the first matrix to solve for b. There are several ways to invert a 3x3 matrix; you can use Cramer's rule, or take advantage of the power of Gauss, as I did:
.
Since the data is demeaned, TSS=y'y=60; e'e=TSS-b'X'Xb. As example 3.3 notes, with demeaned data, b'X'Xb=b'X'y, so:
.
It is then easy to find that: s2=4.8/(24-4)=.24.
We now have all of the data we need to compute Var(b):

Now we are ready to test hypotheses!
H1: b 1=1. Use a t(20)-test: (b1-1)/SD(b1)=.40/.1897=2.109. Critical value is 2.086, so reject the hypothesis.
H2: b 2=1. Use a t(20)-test: (b2-1)/SD(b2)=-.80/.4099=-1.952. Critical value is 2.086, so accept the hypothesis.
H3: b 3=-2. Use a t(20)-test: (b3+2)/SD(b3)=.20/.1386=1.44. Critical value is 2.086, so accept the hypothesis.
H4: b 1+b 2+b 3=0. Since this is only 1 restriction, you may still use a t(20)-test. Calculating Var(b1+b2+b3) is a little tricky:
Var(b1+b2+b3)=
Var(b1)+Var(b2)+Var(b3)+2Cov(b1,b2)+2Cov(b1,b3)+2Cov(b2,b3)=.1992. So:
(b1+b2+b3-0)/SD(b1+b2+b3)=-.20/.4463=-.448. Critical value is 2.086, so accept the hypothesis.
H5: The final hypothesis is a joint hypothesis: all three conditions have to be satisfied for it to be true. In class, we learned to use the change in R2 to compute a test-statistic; as mentioned, there are several other equivalent formulae. Equation 3.38 is one of these; that's the one we'll use here.
First we need to set up the hypothesis correctly: pp.90-95 should prove useful here. The hypothesis is that:
; all this says is that b
1=1 AND b
2=1 AND b
3=-2.
Now simply apply 3.38:

The critical value for F(3,20)=3.10, so reject the null.
3.10. Again, apply the LS formulae for a regression of Y on a constant and 2 variables:

Simply plug in the values provided:

Solve by pre-multiplying both sides by the inverse of the first matrix. Get the inverse using either Gauss, Cramer's rule, or some other method.

Next, estimate s
2 - just use eq(3.6) to get e'e: 
s2=25.2/(10-3)=3.60. To get Var(b2), I simply took (X'X)-1, and looked at the (3,3) element, which was .4. Therefore, Var(b2)=3.6*.4=1.44.
At last we are ready to do a t(7)-test: (b2-0)/(1.2)=3/1.2=2.5. Since the critical value is 2.365, reject the hypothesis.
3.13. The RE hypothesis implies two restrictions: the constant must equal 0 AND the coefficient on r* must be 1. (If the constant is significantly different from 1, then estimates will be wrong on average even if the coefficient on r* is 1). So we will want to do ONE F-test, not two t-tests.
First, let's set up the restriction matrix correctly.
. Note that R is simply the 2x2 identity matrix.
Then, use formula 3.38:

But how does one calculate X'X? Use the fact that when 1 variable is a constant and k=2:
. Then since
,
; and since
,
, so
.
.
Plugging in:

The critical value of F(2,28)=3.34, so accept.
3.16. R2=r(Y,Yhat)2, where Yhat=X(X'X)-1X'Y.
r(Y,Yhat)=
. Square this to get:
r(Y,Yhat)2=

Now let's use a few of the useful theorems derived in week2, where we proved that:
Property #1: Residuals sum to zero.
Property #2: Actual and predicted values of Y have the same mean.
Property #4: Predicted values of Y uncorrelated with least squares residual.
First, replace Y-hat with (Y-e):

Next, note that
.

Notice that the same term appears in the numerator and the denominator. Cancel them, then rewrite the expression as:
QED.
3.17. Recall the proof that with a constant, the error terms sum to zero:
;
.
![]()
But if you do not include a constant term:
, so when you take summations:

which is clearly a special case (that's why you can't cancel the X's).
Now the decomposition of the sum of squares tells us that:
; but since the proof that
uses the assumption that the errors sums to zero, we can no longer cancel the middle terms. Similarly, it is no longer necessary for Y and Yhat to have the same mean, since this proof also used the fact that the errors sum to zero:
.
Now substitute Y'Y into the equation for R2=
:
.
Note: When the errors sum to zero, the above expression is just:
, which is definitely bounded between 0 and 1. But: 
Inspecting numerator and denominator, they are the same as for
, except that
has been added to both numerator and denominator. If this term is negative (and clearly it can be) then R2 may also be negative.
Computing Problems
Again, I attach my RA's sample programs. The first program is definitely correct; it matches with the sample Eviews output I include. On problems #2 and #3, I assumed most people would just re-use the data I already provided. It's fine if you didn't.