This action might not be possible to undo. Are you sure you want to continue?

Welcome to Scribd! Start your free trial and access books, documents and more.Find out more

y = β0 + β1x + u

Economics 20 - Prof. Anderson

1

Some Terminology

In the simple linear regression model, where y = β0 + β1x + u, we typically refer to y as the

Dependent Variable, or Left-Hand Side Variable, or Explained Variable, or Regressand

Economics 20 - Prof. Anderson

2

**Some Terminology, cont.
**

In the simple linear regression of y on x, we typically refer to x as the

**Independent Variable, or Right-Hand Side Variable, or Explanatory Variable, or Regressor, or Covariate, or Control Variables
**

Economics 20 - Prof. Anderson 3

A Simple Assumption

The average value of u, the error term, in the population is 0. That is, E(u) = 0 This is not a restrictive assumption, since we can always use β0 to normalize E(u) to 0

Economics 20 - Prof. Anderson 4

Anderson 5 . that E(u|x) = E(u) = 0. so that they are completely unrelated.Prof.Zero Conditional Mean We need to make a crucial assumption about how u and x are related We want it to be the case that knowing something about x does not give us any information about u. That is. which implies E(y|x) = β0 + β1x Economics 20 .

where for any x the distribution of y is centered about E(y|x) y f(y) . E(y|x) = β + β x 0 1 6 .Prof. Anderson . x1 x2 Economics 20 .E(y|x) as a linear function of x.

n} denote a random sample of size n from the population For each observation in this sample.yi): i=1.Prof. Anderson 7 . …. it will be the case that yi = β0 + β1xi + ui Economics 20 .Ordinary Least Squares Basic idea of regression is to estimate the population parameters from a sample Let {(xi.

} u1 x1 x2 x3 x4 x 8 Economics 20 . . sample data points and the associated error terms y y4 E(y|x) = β0 + β1x . u4 { y3 y2 u2 {.Prof.} u3 y1 .Population regression line. Anderson .

u) = E(xu) = 0 Why? Remember from basic probability that Cov(X.Y) = E(XY) – E(X)E(Y) Economics 20 . 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.Prof.

Deriving OLS continued We can write our 2 restrictions just in terms of x. β0 and β1 . since u = y – β0 – β1x E(y – β0 – β1x) = 0 E[x(y – β0 – β1x)] = 0 These are called moment restrictions Economics 20 . Anderson 10 . y.Prof.

Deriving OLS using M.O. Anderson 11 . a sample estimator of E(X) is simply the arithmetic mean of the sample Economics 20 .Prof. The method of moments approach to estimation implies imposing the population moment restrictions on the sample moments What does this mean? Recall that for E(X). the mean of a population distribution.M.

Prof.More Derivation of OLS We want to choose values of the parameters that will ensure that the sample versions of our moment restrictions are true The sample versions are as follows: n n − 1 ∑( y n i= 1 n i= 1 i ˆ ˆ − β0 − β1 xi = 0 ) − 1 ˆ ˆ xi yi − β0 − β1 xi = 0 ∑ Economics 20 . Anderson 12 ( ) .

and properties of summation.Prof. or ˆ ˆ β 0 = y − β1 x Economics 20 . we can rewrite the first condition as follows ˆ ˆ y = β 0 + β1 x .More Derivation of OLS Given the definition of a sample mean. Anderson 13 .

Prof.More Derivation of OLS ˆ ˆ xi yi − y − β1 x − β1 xi = 0 ∑ i =1 n n ( ( ) ) ˆ xi ( yi − y ) = β1 ∑ xi ( xi − x ) ∑ i =1 n i =1 2 ˆ ∑ ( xi − x )( yi − y ) = β1 ∑ ( xi − x ) i =1 i =1 Economics 20 . Anderson 14 n n .

Anderson 15 .Prof.So the OLS estimated slope is ˆ β1 = ∑ ( x − x )( y i =1 i n i =1 i n n i − y) 2 ∑( x − x) i =1 provided that ∑ ( xi − x ) > 0 2 Economics 20 .

Summary of OLS slope estimate The slope estimate is the sample covariance between x and y divided by the sample variance of x If x and y are positively correlated. the slope will be positive If x and y are negatively correlated. Anderson 16 .Prof. the slope will be negative Only need x to vary in our sample Economics 20 .

û. Anderson 17 .Prof.More OLS Intuitively. u. is an estimate of the error term. hence the term least squares The residual. OLS is fitting a line through the sample points such that the sum of squared residuals is as small as possible. and is the difference between the fitted line (sample regression function) and the sample point Economics 20 .

} û3 y1 } û1 . sample data points and the associated estimated error terms y y4 û4 { . x1 x2 x3 x4 x 18 Economics 20 . . Anderson .Prof.Sample regression line. ˆ ˆ ˆ y = β 0 + β1 x y3 y2 û2 {.

Anderson n n ( ) 2 19 . we can set up a formal minimization problem That is.Prof. we want to choose our parameters such that we minimize the following: ˆ ˆ ˆi ) = ∑ yi − β 0 − β1 xi ∑ (u 2 i =1 i =1 Economics 20 .Alternate approach to derivation Given the intuitive idea of fitting a line.

which are the same as we obtained before. Anderson 20 ( ) . multiplied by n ˆ (y −β ∑ n i =1 n i ˆ − β1 xi = 0 0 ) ˆ ˆ xi yi − β0 − β1 xi = 0 ∑ i =1 Economics 20 . continued If one uses calculus to solve the minimization problem for the two parameters you obtain the following first order conditions.Prof.Alternate approach.

the sample average of the OLS residuals is zero as well The sample covariance between the regressors and the OLS residuals is zero The OLS regression line always goes through the mean of the sample Economics 20 . Anderson 21 .Algebraic Properties of OLS The sum of the OLS residuals is zero Thus.Prof.

Anderson 22 . i =1 n n ˆ ∑u i =1 n i n =0 ˆ ∑x u i =1 i i =0 ˆ ˆ y = β0 + β1 x Economics 20 .Prof.Algebraic Properties (precise) ˆ ∑ui = 0 and thus.

Prof. Anderson 23 . and an unexplaine d part.More terminology We can think of each observatio n as being made up of an explained part. ˆ ˆ yi = yi + ui We then define the following : Then SST = SSE + SSR ∑ ( y − y ) is the total sum of squares (SST) ˆ ∑ ( y − y ) is the explained sum of squares (SSE) ˆ ∑ u is the residual sum of squares (SSR) 2 2 i i 2 i Economics 20 .

Anderson 2 2 24 .Proof that SST = SSE + SSR ˆ ˆ ∑ ( y − y ) = ∑ [( y − y ) + ( y − y )] ˆ ˆ = ∑ [u + ( y − y ) ] ˆ ˆ ˆ ˆ = ∑ u + 2∑ u ( y − y ) + ∑ ( y − y ) ˆ ˆ = SSR + 2∑ u ( y − y ) + SSE ˆ ˆ and we know that ∑ u ( y − y ) = 0 2 i i i i 2 i i 2 i i i i i i i i Economics 20 .Prof.

call this the R-squared of regression R2 = SSE/SST = 1 – SSR/SST Economics 20 .Prof.Goodness-of-Fit How do we think about how well our sample regression line fits our sample data? Can compute the fraction of the total sum of squares (SST) that is explained by the model. Anderson 25 .

Anderson 26 . just type reg y x Economics 20 .Prof. to run the regression of y on x.Using Stata for OLS regressions Now that we’ve derived the formula for calculating the OLS estimates of our parameters. you’ll be happy to know you don’t have to compute them by hand Regressions in Stata are very simple.

…. yi): i=1.Prof. n}. Anderson 27 .Unbiasedness of OLS Assume the population model is linear in parameters as y = β0 + β1x + u Assume we can use a random sample of size n. 2. from the population model. Thus we can write the sample model yi = β0 + β1xi + ui Assume E(u|x) = 0 and thus E(ui|xi) = 0 Assume there is variation in the xi Economics 20 . {(xi.

where s ≡ ∑ ( xi − x ) 2 Economics 20 .Prof.Unbiasedness of OLS (cont) In order to think about unbiasedness. Anderson 28 . we need to rewrite our estimator in terms of the population parameter Start with a simple rewrite of the formula as ˆ β1 2 x ∑( x − x) y = i i s 2 x .

Anderson 1 i + ui ) = 29 .Unbiasedness of OLS (cont) ∑ ( x − x ) y =∑ ( x − x )( β + β x ∑ ( x − x )β + ∑ ( x − x )β x + ∑ ( x − x )u = β ∑ ( x − x ) + β ∑ ( x − x )x + ∑ ( x − x )u i i i i 0 0 i 1 i i i 0 i 1 i i i i Economics 20 .Prof.

and thus ˆ β1 = β1 ∑ ( x − x )u + i i s 2 x Economics 20 . Anderson 30 . ∑( x − x)x = ∑( x − x) i i i i 2 1 x 2 so. the numerator can be rewritten as β s + ∑ ( xi − x )ui .Prof.Unbiasedness of OLS (cont) ∑ ( x − x ) = 0.

then βi ∑ i i 1 sx ˆ = β + 1 2 d E( u ) = β E β1 ∑ i 1 i 1 sx Economics 20 . Anderson 31 ( ) . so that ˆ = β + 1 2 d u .Prof.Unbiasedness of OLS (cont) let d i = ( xi − x ) .

Anderson 32 . then OLS is not necessarily unbiased Remember unbiasedness is a description of the estimator – in a given sample we may be “near” or “far” from the true parameter Economics 20 .Prof.Unbiasedness Summary The OLS estimates of β1 and β0 are unbiased Proof of unbiasedness depends on our 4 assumptions – if any assumption fails.

Variance of the OLS Estimators Now we know that the sampling distribution of our estimate is centered around the true parameter Want to think about how spread out this distribution is Much easier to think about this variance under an additional assumption. so Assume Var(u|x) = σ2 (Homoskedasticity) Economics 20 .Prof. Anderson 33 .

Prof. so σ2 = E(u2|x) = E(u2) = Var(u) Thus σ2 is also the unconditional variance.Variance of OLS (cont) Var(u|x) = E(u2|x)-[E(u|x)]2 E(u|x) = 0. the square root of the error variance is called the standard deviation of the error Can say: E(y|x)=β0 + β1x and Var(y|x) = σ2 Economics 20 . called the error variance σ. Anderson 34 .

Homoskedastic Case y f(y|x) .Prof. Anderson . E(y|x) = β + β x 0 1 35 . x1 x2 Economics 20 .

E(y|x) = β0 + β1x x 36 .Heteroskedastic Case f(y|x) y . Anderson .Prof. Economics 20 . x1 x2 x3 .

Variance of OLS (cont) ˆ = Var β + 1 2 d u = 1 Var β1 ∑ i i sx 1 1 2 Var ( ∑ d i ui ) = 2 sx sx 1 = 2 sx 2 2 2 i 2 2 2 2 ( ) d i2Var ( ui ) ∑ 2 1 ∑ d σ = σ sx2 2 d i2 = ∑ 1 2 σ2 ˆ σ = Var β1 sx = 2 2 sx sx Economics 20 . Anderson ( ) 37 .Prof.

Prof. the larger the variance of the slope estimate The larger the variability in the xi.Variance of OLS Summary The larger the error variance. Anderson 38 . σ2. the smaller the variance of the slope estimate As a result. a larger sample size should decrease the variance of the slope estimate Problem that the error variance is unknown Economics 20 .

because we don’t observe the errors. is.Prof. ui What we observe are the residuals. Anderson 39 . σ2. ûi We can use the residuals to form an estimate of the error variance Economics 20 .Estimating the Error Variance We don’t know what the error variance.

Anderson 40 . an unbiased estimator of σ 2 is 1 2 ˆ = ˆi2 = SSR / ( n − 2) σ ∑u ( n − 2) Economics 20 .Error Variance Estimate (cont) ˆ ˆ ˆ ui = yi − β 0 − β1 xi ˆ ˆ = ( β 0 + β1 xi + ui ) − β 0 − β1 xi ˆ ˆ =u − β −β − β −β i ( 0 0 ) ( 1 1 ) Then.Prof.

Prof. ( ) ˆ ˆ se β1 = σ / ∑ ( xi − x ) ( ) ( 1 2 ) 1 2 Economics 20 . Anderson 41 .Error Variance Estimate (cont) ˆ ˆ σ = σ 2 = Standard error of the regression ˆ recall that sd β = σ sx ˆ if we substitute σ for σ then we have ˆ the standard error of β .

- Marketing Lesson 1
- ch01
- Fisa Evaluare Riscuri Mecanic Agricol
- Viata Secreta a Viselor
- sinuciderea
- 26953425-Lobsang-Rampa-Grota-Inteleptilor
- Setting Up A High-Availability Load Balancer (With Failover and Session Support) With HAProxy_Heartbeat On Debian Lenny - Page
- Tomoko Fuse - Home Decoration With Origami

- Regression
- error analysis lectures
- 2008Biometrika_FARIMA
- Multi Linear Regression Handout 2x1
- 10[1].1.1.110.383
- 6034 - Classical Linear Regression Model.pptx
- 123S10-3
- ar1.pdf
- Math350S10HW11Sol
- MAT 102
- 2009 L1 Key Formulas
- Kalman Filter
- Estimation Theory
- Regress
- Fikret Isik - Lecture Notes for Statistics Session - IUFRO Genetics of Host-Parasite Interactions in Forestry - 2011
- Wurtz Et Alg Arch
- time series.ppt
- Muli
- A LEAST ABSOLUTE APPROACH TO MULTIPLE FUZZY REGRESSION USING Tw- NORM BASED OPERATIONS
- Reverse Annealing
- Biostat shiz
- New Microsoft Word Document (2)
- Math Stats Text
- Full Text
- Mixed Tweedie
- Formula
- Lect15
- Least Squares Method for Factor Analysis
- Dimension Reduction by Mutual Information Discriminant Analysis
- MOM and MLE

Are you sure?

This action might not be possible to undo. Are you sure you want to continue?

We've moved you to where you read on your other device.

Get the full title to continue

Get the full title to continue listening from where you left off, or restart the preview.

scribd