handout3.26
TRANSCRIPT
8/12/2019 handout3.26
http://slidepdf.com/reader/full/handout326 1/7
ECO391 Lecture Handout Over 15 .3
Sp rin g 2 00 3 , G. H oy t
I. ! at i" #! e $e t! o d o% Le a" t S& u ar e " ' O r din a ry Le a" t S &u a re " (
). #!eory
*. +oru-aC. )pp-icat io n
II. Standard Error o% t!e E"tiate
I. Ordinary Lea"t S&uare" 'OLS( 'a- "o ca- -ed #!e $et!od o% Lea"t S&uare" (
). #!e #!eory
Ordi na ry leas t squa r es is a st ati sti ca l techni que that us es s ampl e dat a to e sti ma t e thetrue populat ion relationship between two var iables.
Recall that :1) E' i/ i( o 1 /i is the p op u-a t io n re gr e " " io n -in e
2) i'!at( o 1/ i is the " a p- e regr e " "i o n e& ua ti o n
OLS allows us to find o an d 1 .
onsider the followin! sca tt e r plo t dia!ram the shows the actual " observed da ta point s ina sample:
#
$
%any lines could fit throu!h these data point s. &e want to determine the line with the'best fit.'
8/12/2019 handout3.26
http://slidepdf.com/reader/full/handout326 2/7
!a t do e" it ea n to "a y a -in e %it " t! e dat a t! e e "t
Rec all th at e i(hat) " the residu al" repre se nt s the dista nc e betw ee n the sa mpl ere!r ess ion line and the obse rved dat a poin t" ($ i"#i). he line t hat mini mi*es thesum of these dis tances is the one tha t !ives us the bes t fit.
+owever " some of the values of the residuals a re ne!at ive in si!n while o ther s a re posi tive. ,f we su m th e re siduals" posi tive values will ca ncel ou t ne!ative values sothe sum will not accurately reflect the total amount of error .
o solve thi s problem we square the residuals before we add them to!ether .
#! e $e t! o d o% -e a" t " &u ar e " 4 'OLS( produces a line that mini mi*es the sum of thesquared ver ti ca l dis tances from the line to the observed data poin ts .
i.e. it minimi*es Σ e i2 - e 1
2 e 22 e /
2 . .. .. .. .. e n2 " where n is the sample si*e
(hats over all of the e 0s)he sum of t he resi dua ls (uns qua r ed ) is eact ly *er o. (Lat er " you can us e this bit ofinformation to chec your wor.)
*. + or u- a " Ho6 do e " OLS g e t e "t i a t e " o% t! e co e% %i ci e n t "
e i2 i" a-" o ca-- ed t! e re "i du a- "u o% " &u ar e " 'SSE (. #!i" i" t !e a ou nt
t! at 6 e 6 an t t o in i i7 e .
SSE e i'!at(2 '1(
' i ' i'!at( ( 2 '2( ' i o 1/ i(
2 '3(
3ow consi der equation (/). , am !oin ! to as you to try to re memb er a littl e calculu s.&e can consider (/) as a mathema t ical function of b o an d b 1" f(b o" b 1)
&e want to minimi* e the su m of the squ ar ed error ter ms so we wan t to minimi* eequa ti on (/). ,n t er ms of calcul us this means we want to find the critical poin ts of afunction. &e want to find the values of b o and b 1 that minimi*e the function. o do thiswe t ae a firs t der iva tive of function (/) with r espect to b o a n d set it e qu al to *ero an dsolve for b o. &hen we do this we !et the function:
n
X b-Y =b ii
o
ΣΣ1
'8(
8/12/2019 handout3.26
http://slidepdf.com/reader/full/handout326 3/7
(4)
,f we t ae the firs t der iva tive of (/) with r espect to b 1 a nd se t it eq ual to *ero a nd th ensolve for b 1 we !et the followin! equation:
(5)
6qua ti ons (4) and (5) !ive us the for mulas that we need to find the val ues of b o a nd b 1
th at es ti ma t e th e tru e po pul ati on rela tio ns hi p b et we e n $ an d #. ,f we plu! (5)" th eformula for b 1" into (4) " the formula for b o" we may al so writ e b o as follows:
(3ot e that Σ$2≠ (Σ$)2) 6quations (4) 7 (8) !ive us b o and b 1 solely in terms or $ and #
(sample data .)
) X ( - X n
Y X -Y X n=b
2
ii
iiii
ΣΣ
ΣΣΣ
21 '5(
) X ( - X n
Y X X -Y X =b
2
ii
iiiiio
ΣΣ
ΣΣΣΣ
2
2
'(
8/12/2019 handout3.26
http://slidepdf.com/reader/full/handout326 4/7
. 6$9%L6:Let0 s t ry an eample. onsider the followin! dependen t and independ ent variables :
$i - the number of children in a family#i - th e nu mb e r of loav es of br ea d con su m e d by a fa mily in a !iv en thr ee we e
period
;amily<" n - 5
$, #i $i#i $i2 #i(hat) e i(hat) e i(hat)
2
1 2 4
2 / =
/ 1 /
4 5 >
5 > 1=
n - 5 Σ$i - Σ#i - Σ$i#i - Σ$i2 - Σe i(hat)
-Σe i(hat) 2
-
1( +ind o4
2(+ind 1 4
8/12/2019 handout3.26
http://slidepdf.com/reader/full/handout326 5/7
/) &rite out the full sample re!ression line? ,nterpret the coefficients " b o and b 1.
8( :redict ion4
@iven that $i - 8" p redi ct the value that we epect #i to t ae !iven our sample r e!ress ionline. (i.e. find #i(hat) .) omplete the sith column of the table.
5( Ca-cu-ate t!e re" idua-" 4
Recall e i(hat) - #i 7 #i(hat) (;ill in the seventh column of the table.)
hec: he sum of the res iduals should be approimately *ero" Σe i(hat) - A.
8) +ind e i'!at(2 or SSE : (omplete the ei!hth column of the table.)
8/12/2019 handout3.26
http://slidepdf.com/reader/full/handout326 6/7
)-ternative +oru-a"4
he formulas for the estimated coeffici ent s can be manipula ted and writ ten in a vari ety ofways. +ere are a f ew other alt erna t ives . One se t of alt erna t ives a re the formulas !ivenin the tet .
( )( )[ ]( ) 2
1
X X
Y Y X X b
i
ii
−Σ
−−Σ=
n
X X and
X n X
Y X nY X b
iii Σ
=−Σ
−Σ= "
221
n
Y Y and X bY b
i
o
Σ=−= "1
8/12/2019 handout3.26
http://slidepdf.com/reader/full/handout326 7/7
15./ #! e S ta n d a r d Error o% t !e E"t i a t e ' S e (
2
B2
−
Σ=
n
eS i
e
#!i" e a" ur e appr o;i a t e " t!e avera g e di"t an ce o% t!e rea- dat a point " %ro t!ee "t i a t e d re gr e " " i o n -in e.
i) S e i " ea " ur e d in t !e "a e uni t o% e a " ur e a" t! e vari a -e . So if the # variable is
m ea s u r ed in d oll ar s a nd S e - C>. 2/ " on av er a !e " our a ct ua l da ta poi nt s va ry fro m th ei r
est imated values by about C>.2/.
i i) S e c an e u" ed a" a ea " ur e o% t! e &ua-i t y o% %it o% t!e "a p -e re gr e" " io n -ine .
#! e " a -- e r t! e S e , t! e et t e r t! e %it .
iii) )n a -t e rn a t i v e % or u - a % or S e :
2
1
2
−
Σ−Σ−Σ=
n
Y X bY bY S iiioi
e