6. Simple Regression and OLS Estimation Chapter 6 will expand on concepts introduced in Chapter 5 to cover the following: 1) Estimating parameters using.

Slides:



Advertisements
Similar presentations
Managerial Economics in a Global Economy
Advertisements

The Multiple Regression Model.
Chap 12-1 Statistics for Business and Economics, 6e © 2007 Pearson Education, Inc. Chapter 12 Simple Regression Statistics for Business and Economics 6.
Hypothesis Testing Steps in Hypothesis Testing:
Chapter 14, part D Statistical Significance. IV. Model Assumptions The error term is a normally distributed random variable and The variance of  is constant.
Inference for Regression
3.2 OLS Fitted Values and Residuals -after obtaining OLS estimates, we can then obtain fitted or predicted values for y: -given our actual and predicted.
Linear regression models
4.3 Confidence Intervals -Using our CLM assumptions, we can construct CONFIDENCE INTERVALS or CONFIDENCE INTERVAL ESTIMATES of the form: -Given a significance.
Objectives (BPS chapter 24)
8. Heteroskedasticity We have already seen that homoskedasticity exists when the error term’s variance, conditional on all x variables, is constant: Homoskedasticity.
Part 1 Cross Sectional Data
The Multiple Regression Model Prepared by Vera Tabakova, East Carolina University.
The Simple Linear Regression Model: Specification and Estimation
Chapter 10 Simple Regression.
2.5 Variances of the OLS Estimators
Chapter 12 Simple Regression
Chapter 13 Introduction to Linear Regression and Correlation Analysis
The Simple Regression Model
SIMPLE LINEAR REGRESSION
Chapter Topics Types of Regression Models
1 Simple Linear Regression Chapter Introduction In this chapter we examine the relationship among interval variables via a mathematical equation.
Chapter 11 Multiple Regression.
Inference about a Mean Part II
Introduction to Probability and Statistics Linear Regression and Correlation.
Inferences About Process Quality
SIMPLE LINEAR REGRESSION
6.4 Prediction -We have already seen how to make predictions about our dependent variable using our OLS estimates and values for our independent variables.
Introduction to Regression Analysis, Chapter 13,
Correlation and Linear Regression
SIMPLE LINEAR REGRESSION
Introduction to Linear Regression and Correlation Analysis
Chapter 13: Inference in Regression
Hypothesis Testing in Linear Regression Analysis
Copyright © 2013, 2010 and 2007 Pearson Education, Inc. Chapter Inference on the Least-Squares Regression Model and Multiple Regression 14.
BPS - 3rd Ed. Chapter 211 Inference for Regression.
7.1 Multiple Regression More than one explanatory/independent variable This makes a slight change to the interpretation of the coefficients This changes.
CHAPTER 14 MULTIPLE REGRESSION
Introduction to Linear Regression
Production Planning and Control. A correlation is a relationship between two variables. The data can be represented by the ordered pairs (x, y) where.
Chapter 11 Linear Regression Straight Lines, Least-Squares and More Chapter 11A Can you pick out the straight lines and find the least-square?
1 Chapter 12 Simple Linear Regression. 2 Chapter Outline  Simple Linear Regression Model  Least Squares Method  Coefficient of Determination  Model.
Inference for Regression Simple Linear Regression IPS Chapter 10.1 © 2009 W.H. Freeman and Company.
Y X 0 X and Y are not perfectly correlated. However, there is on average a positive relationship between Y and X X1X1 X2X2.
Roger B. Hammer Assistant Professor Department of Sociology Oregon State University Conducting Social Research Ordinary Least Squares Regression.
2.4 Units of Measurement and Functional Form -Two important econometric issues are: 1) Changing measurement -When does scaling variables have an effect.
3.4 The Components of the OLS Variances: Multicollinearity We see in (3.51) that the variance of B j hat depends on three factors: σ 2, SST j and R j 2.
© Copyright McGraw-Hill Correlation and Regression CHAPTER 10.
VI. Regression Analysis A. Simple Linear Regression 1. Scatter Plots Regression analysis is best taught via an example. Pencil lead is a ceramic material.
Chapter 9: Introduction to the t statistic. The t Statistic The t statistic allows researchers to use sample data to test hypotheses about an unknown.
BPS - 5th Ed. Chapter 231 Inference for Regression.
The Simple Linear Regression Model: Specification and Estimation  Theory suggests many relationships between variables  These relationships suggest that.
The “Big Picture” (from Heath 1995). Simple Linear Regression.
Bivariate Regression. Bivariate Regression analyzes the relationship between two variables. Bivariate Regression analyzes the relationship between two.
6. Simple Regression and OLS Estimation
Correlation and Simple Linear Regression
Chapter 11: Simple Linear Regression
Chapter 11 Simple Regression
Correlation and Simple Linear Regression
Correlation and Simple Linear Regression
Interval Estimation and Hypothesis Testing
Simple Linear Regression
Basic Practice of Statistics - 3rd Edition Inference for Regression
Simple Linear Regression and Correlation
SIMPLE LINEAR REGRESSION
6.1.1 Deriving OLS OLS is obtained by minimizing the sum of the square errors. This is done using the partial derivative 6.
Correlation and Simple Linear Regression
Correlation and Simple Linear Regression
Presentation transcript:

6. Simple Regression and OLS Estimation Chapter 6 will expand on concepts introduced in Chapter 5 to cover the following: 1) Estimating parameters using Ordinary Least Squares (OLS) Estimation 2) Hypothesis tests of OLS coefficients 3) Confidence intervals of OLS coefficients 4) Excel Regressions

2 6. Regression & OLS 6.1 The OLS Estimator and its Properties 6.2 OLS Estimators and Goodness of Fit 6.3 Confidence Intervals for Simple Regression Models 6.4 Hypothesis Testing in a Simple Regression Context 6.6 Examples of Simple Regression Models 6.7 Conclusion

3 6.1 The OLS Estimator and its Properties We’ve seen the true economic relationship: Y i = β 1 + β 2 X i + є i Where є i and therefore Y i are random and the other terms are non-random When this relationship is unknown, we’ve seen how to estimate the relationship Using:

4 6.1 Properties of the OLS Estimator  There exist a variety of methods to estimate the coefficients of our model (β 1 and β 2 )  Why use Ordinary Least Squares (OLS)? 1) OLS minimizes the sum of squared errors, creating a line that fits best with the observations 2) With certain assumptions, OLS exhibits beneficial statistical properties. In particular, OLS is BLUE.

5 6.1 The OLS Estimator These OLS estimates create a straight line going through the “middle” of the estimates:

Fitted or Predicted Values From the above we see that often the actual data points lie above or below the estimated line. Points on the line give us ESTIMATED y values for each given x. The predicted or fitted y values are found using our x data and our estimated β’s:

Estimators Example Ols Estimation (From Chapter 5) Price4336Pbar = 4 Quantity Qbar=15

Estimating Errors or Residuals The estimated y values (yhat) are rarely equal to their actual values (y). The difference is the estimated error term: Since we are indifferent whether our estimates are above or below the actual, we can square these estimated errors. A higher squared error means an estimate farther from the actual

Estimators Example Price4336Pbar = 4 Quantity Qbar=15

6.1.1 Deriving OLS OLS is obtained by minimizing the sum of the square errors. This is done using the partial derivative

6.1.1 Deriving OLS These can simplify to:

6.1.1 Deriving OLS These can be expressed in their normal equations form: Notice that we have two equations with two unknowns (β2hat and β1hat). All other components come from our data set. After some math, we get the OLS estimates of β1hat and β2hat

6.1.1 Deriving OLS Finally, we should check the second derivative to confirm a minimum.

Statistical Properties of OLS In our model: Y, the dependent variable, is made up of two components: a) β 1 + β 2 X i – a non-random component that indicates the effect of X on Y. In this course, X is non-random. b) Є i – a random error term representing other influences on Y.

Statistical Properties of OLS Error Assumptions: a) E(є i ) = 0; we expect no error; we assume the model is complete b) Var(є i ) = σ 2 ; the error term has a constant variance c) Cov(є i, є j ) = 0; error terms from two different observations are uncorrelated. If the last error was positive, the next error need not be negative.

Statistical Properties of OLS OLS Estimators are Random Variables: a) Y depends on є and is thus random. b) β1hat and β2hat depend on Y… c) Therefore they are random d) All random variables have probability distributions, expected values, and variances e) These characteristics give rise to certain OLS estimator properties.

OLS is BLUE We use Ordinary Least Squares estimation because, given certain assumptions, it is BLUE: B est L inear U nbiased E stimator

U nbiased An estimator is unbiased if it expects the true value: E(dhat) = d β2hat = ∑(X i -Xbar)(Y i -Ybar) ∑(X i -Xbar) 2 β2hat = ∑(X i -Xbar)(Y i ) ∑(X i -Xbar)X i By a mathematical property.

U nbiased β2hat = ∑(X i -Xbar)(Y i ) ∑(X i -Xbar)X i E(β2hat) = ∑(X i -Xbar)E(Y i ) ∑(X i -Xbar)X i Since only Y i is variable.

U nbiased E(β2hat) = ∑(X i -Xbar)E(β 1 + β 2 X i + є i ) ∑(X i -Xbar)X i Since Y i = β 1 + β 2 X i + є i E(β2hat) = ∑(X i -Xbar)(β 1 + β 2 X i + 0) ∑(X i -Xbar)X i Since β 1, β 2, and X i are non-random and E(є i )=0.

U nbiased E(β2hat) = β 1 ∑(X i -Xbar) + β 2 ∑(X i -Xbar) X i ∑(X i -Xbar)X i By simple algebra. E(β2hat) = β 1 ∑(X i -Xbar) + β 2 ∑(X i -Xbar) X i ∑(X i -Xbar)X i ∑(X i -Xbar)X i Since there exists a common denominator.

U nbiased E(β2hat) = β 1 (0) + β ∑(X i -Xbar)X i Since the sum of the difference between an observation and its mean is zero, by definition, E(β2hat) = 0 + β 2 = β 2 The proof that E(β1hat)= β 1 is similar.

U nbiased E(β2hat) = β 2 This means that on average, OLS estimation will estimate the correct coefficients. Definition: If the expected value of an estimator is equal to the parameter that it is being used to estimate, the estimator is unbiased.

L inear The OLS estimators are linear in the dependent variable (Y): -Y’s are never raised to a power other than 1 -no non-linear operations are performed on the Y’s Note: Since X’s are squared in the β1hat and β2hat formulae, OLS is not linear in the X’s (which doesn’t matter for BLUE)

B est Of all linear unbiased estimators, OLS has the smallest variance. -there is a greater likelihood of obtaining an estimate close to the actual parameter Large variance => High probability of obtaining an estimate far from the center Small variance => Low probability of obtaining an estimate far from the center

E stimator By definition, the OLS estimator is an estimator; it estimates values for β 1 and β 2.

6.1.2 Normality of Y In order to conduct hypothesis tests and construct confidence intervals from OLS, we need to know the exact distributions of β1hat and β2hat (Otherwise, we can’t use statistical tables..) We will see that if 1) The error term is normally distributed Then 2) Y is normally distributed Then 3) β1hat and β2hat are normally distributed

6.1.2 Normality of Y So far, we have assumed:  The error term, є i, is random with  E(є i )=0; no expected error  Var(єi)=σ 2 ; constant variance  Cov(є i, є j )=0; no covariance between errors Now we add the assumption that the error term is normally distributed. Therefore: iid  Є i ~ N(0,σ 2 ) (iid means identically and independently distributed)

6.1.2 Normality of Y If the error is normally distributed, so will be the Y term (since the randomness of Y depends on the randomness of the error term). Therefore: E(Y i ) = E(β 1 + β 2 X i +є i )= β 1 + β 2 X i Var(Y i ) = Var(β 1 + β 2 X i +є i )=Var(є i ) = σ 2 (Given all our previous assumptions.) Therefore: Y i ~ N( β 1 + β 2 X i, σ 2 ) (Y is normally distributed with mean β 1 + β 2 X i and variance σ 2.)

6.1.2 Normality of OLS Since β1hat and β2hat are linear functions of Y:

6.1.2 Normality of OLS If we know σ, we can construct standard normal variables (z=(x-μ)/σ):

6.1.2 Normality of OLS Since we don’t know σ 2, we can estimate it: This gives us estimates of the variance of our coefficients:

6.1.2 Normality of OLS The square root of the estimated variance is referred to as the standard error (se) (as opposed to standard deviation) Using our assumptions:  (β1hat- β1)/se(β1hat) has a t distribution with N-2 degrees of freedom  (β2hat- β2)/se(β2hat) has a t distribution with N-2 degrees of freedom

6.2 OLS Estimators and Goodness of Fit On average, OLS works well:  The average of the estimated errors is zero  The average of the estimated Y’s is always the average of the observed Y’s Proof: Note: This comes from our derivation of OLS as the sum of squared errors.

6.2 Measuring Goodness of Fit These conditions hold regardless of the quality of the model. Ie: You could estimate average grades as a function of locust population in Mexico. OLS would be a good estimator even though the model is useless. “Goodness of Fit” measures how well the economic model fits the data. R 2 is the most common measure of goodness of fit. R 2 CANNOT be compared across models.

6.2 Measuring Goodness of Fit R 2 is constructed by dividing the variation of Y into two parts: 1) Variation in fitted Yhat terms. This is explained by the model 2) Variation in the estimated errors. This is NOT explained by the model.

6.2 Measuring Goodness of Fit R 2 is the proportion of variation explained by the model. It is expressed as: a) The ratio of explained variation to total variation in Y Or b) 1 minus the ratio of unexplained variation to total variation in Y 0<R 2 <1 R 2 =0; model has no explanatory power R 2 =1; model completely explains variations in Y (and generally that means you did something wrong)

6.3 Confidence Intervals for Simple Economic Models As covered previously, ordinary least squares estimation derives POINT ESTIMATES for our coefficients (β 1 and β 2 ). -These are unlikely to be perfectly accurate. Alternately, Confidence Intervals provide for us an estimate of a range for our coefficients. -We are reasonably certain that our value lies within that range.

6.3.1 Deriving a Confidence Interval Step 1: Recall Distribution We know that: (β 1 hat-β 1 )/se(β 1 hat) has a t distribution with N-2 degrees of freedom (β 2 hat- β 2 )/se(β 2 hat) has a t distribution with N- 2 degrees of freedom

6.3.1 Deriving a Confidence Interval Step 2: Establish Probability: Using t-tables with N-2 degrees of freedom, we find t* such that: P(-t*<t<t*)=1-α Note that ±t* cuts off α/2 of each tail. Ie: if N=25 and α=0.10, t*=1.71

6.3.1 Deriving a Confidence Interval Step 3: Combine Steps 1 and 2 combine to give us: -t*t* (1-α)% t

6.3.1 Deriving a Confidence Interval Step 4: Rearrange for CI: OR By repeatedly calculating Confidence Intervals using OLS, 100(1- α)% of these CI’s will contain the true value of the parameter (β 1 ).

6.3.1 Confident Example Suppose OLS Gives us the Output: If N=400, construct a 95% CI for B 1 : To cut off 2.5% of each tail with df=infinity, t*=1.96

6.3.1 Confident Example Suppose OLS Gives us the Output: If N=25, construct a 90% CI for B 2 : To cut off 5% of each tail with df=23, t*=1.71

6.3.1 Confident Example Suppose OLS Gives us the Output: In repeated samples, 95% (90%) of such confidence intervals will contain the true parameter β 1 (β 2 ). Here, we are confident that X has a positive effect on Y. We are confident that when X=0, Y is positive.

6.4 Hypothesis Testing in a Simple Regression Context As econometricians, we have questions. -Do intelligent baby toys affect baby intellect? -Do scarves have an elastic or inelastic demand? Data has answers. -Through hypothesis testing

6.4.1 Setting Up the Hypothesis Test 1) State null and alternate hypotheses: H o : β 2 =2 H a : β 2 ≠2 2) Select a level of significance α=Prob(Type 1 Error) Let α=0.05 3) Determine critical t values (df=n-2) If N=25, t* = ±2.069

6.4.1 Setting Up the Hypothesis Test 4) Calculate test statistic If β 2 hat=6.465 and se(β 2 hat)=1.034, t=(β 2 hat- β 2 )/se(β 2 hat) =( )/1.034) = ) Decide (Reject and do not reject regions) Since t=4.318>t*=2.069, reject H 0

6.4.1 Setting Up the Hypothesis Test 6) Interpret At a 5% level of significance, the change in Y due to a 1 unit change in X is not equal to 2.

6.4.1 Example 2 Given a sample size of 26, we estimate the formula: We want to test whether studying has any effect on grades. H 0 : β 2 =0 H a : β 2 ≠0

6.4.1 Example 2 Given α=0.01 and n-2=24, t*=±2.80 t=(0.01-0)/0.005 =2 Since t<t*, Do not reject H 0 At a 1% level of significance, studying has no effect on mark.

6.6 OLS Estimation Often the calculation required for OLS estimation is greater than pen and paper is capable of. When this occurs, an econometric program (such as Excel) is used to make the calculations. The results are commonly expressed in this form: For Example: