Chapter 11
Chapter 11
We have:
height weight . . . age amount of
lemonade purchased
person 1: x11 x12 ... x1k y1
person 2: x21 x22 ... x2k y2
:
where we assume
Is there any way we can fit something that isn’t linear? Like a polynomial?
Solve it the same way as we did in Chapter 10: set ∂Q/∂βj = 0 for all j. In this
case, we’ll let the computer solve it for us. So now we have all the β̂j ’s.
SSE = (yi − ŷi )2 where ŷi = β̂0 + β̂1 xi1 + β̂2 xi2 + · · · + β̂k xik
i
1
This time, by convention,
SSE
r =+ 1− .
SST
The square root is only positive, since it is not meaningful to assign an association
between y and multiple x’s.
SE(βˆj ) = s Vjj
�
SSE
where s2 = n−(k+1)
H0j : βj = βj0
H1j : βj = βj0 .
H0j : βj = 0
H1j : βj = 0.
2
Or we could test all βj ’s simultaneously:
H0 : β1 = β2 = · · · = βk = 0
H1 : βi = 0 for at least one i.
Both the numerator and the denominator look like sample variances so you
M SR
could see the intuition why M SE has an F-distribution.
Equivalently:
SSR r2 SST
M SR k (?) r2 (n − k − 1)
F = = SSE
= (1−r2k)SST =
M SE n−(k+1)
k(1 − r2 )
n−(k+1)
Note: The F-test above does not tell you which βj s are nonzero.
But then how do you do that?
This makes computation numerically unstable and βˆj are not statistically signif
icant. To avoid this, use only income and expenditure, not savings. (Or savings
and income, not expenditure, etc.)
3
Corresponding ANOVA regression table
SSR MSR
Regression SSR k MSR = k
F = MSE
p-value
SSE
Error SSE n − (k + 1) MSE = n−(k+1)
We can also put the hypothesis tests for the individual βj ’s in a table:
βˆ0
βˆ0 SE(βˆ0 ) t= SE(βˆ0 )
p-value
βˆ1
βˆ1 SE(βˆ1 ) t= SE(βˆ1 )
p-value
.. .. .. ..
. . . .
βˆk
βˆk SE(βˆk ) t= SE(βˆk )
p-value
4
MIT OpenCourseWare
http://ocw.mit.edu
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.