EGlx)as a linear function of x, where for any x the distribution of y is centered about E(x) fy) E(x)=Bo+ Bx x Economics 20- Prof anderson 6
Economics 20 - Prof. Anderson 6 . . x1 x2 E(y|x) as a linear function of x, where for any x the distribution of y is centered about E(y|x) E(y|x) = b0 + b1x y f(y)
Ordinary least squares o Basic idea of regression is to estimate the population parameters from a sample o Let ((,yi: i=1,.,n) denote a random sample of size n from the population o For each observation in this sample, it will be the case that y1=B0+Bx1+1 Economics 20- Prof anderson 7
Economics 20 - Prof. Anderson 7 Ordinary Least Squares Basic idea of regression is to estimate the population parameters from a sample Let {(xi ,yi ): i=1, …,n} denote a random sample of size n from the population For each observation in this sample, it will be the case that yi = b0 + b1 xi + ui
Population regression line, sample data points and the associated error terms ECx)=Bo+ Bx 3 2 Economics 20- Prof anderson 8
Economics 20 - Prof. Anderson 8 . . . . y4 y1 y2 y3 x1 x2 x3 x4 } } { { u1 u2 u3 u4 x y Population regression line, sample data points and the associated error terms E(y|x) = b0 + b1x
Deriving ols estimates To derive the ols estimates we need to realize that our main assumption ofe(ulx) E(u=0 also impli that ◆Cov(x,l)=E(xn)=0 e Why? Remember from basic probability that Cov(X,Y=E(XY)-E(XE(Y) Economics 20- Prof anderson 9
Economics 20 - Prof. Anderson 9 Deriving OLS Estimates To derive the OLS estimates we need to realize that our main assumption of E(u|x) = E(u) = 0 also implies that Cov(x,u) = E(xu) = 0 Why? Remember from basic probability that Cov(X,Y) = E(XY) – E(X)E(Y)
Deriving ols continued o We can write our 2 restrictions just in terms of x, y, Boand B,, since u=y-Bo-Bix ◆F(y-BD-Bx)=0 ◆E[x(y-B-B1x)=0 These are called moment restrictions Economics 20- Prof anderson 10
Economics 20 - Prof. Anderson 10 Deriving OLS continued We can write our 2 restrictions just in terms of x, y, b0 and b1 , since u = y – b0 – b1 x E(y – b0 – b1 x) = 0 E[x(y – b0 – b1 x)] = 0 These are called moment restrictions