Docsity

Simple Linear Regression - Lecture Notes | AEB 6933, Study notes of Introduction to Macroeconomics

Toggle sidebar
bg1
1
Simple Linear Regression
Lecture XXVIII
I. Overview
A. Most of the material for this lecture is from George Casella and Roger L.
Berger Statistical Inference (Belmont, California: Duxbury Press, 1990)
Chapter 12, pp. 554-577.
B. The purpose of regression analysis is to explore the relationship between
two variables.
1. In this course, the relationship that we will be interested in can be
expressed as:
iii xy
where
i
y
is a random variable and
i
x
is a variable hypothesized to
affect or drive
i
y
.
a) The coefficients
and
are the intercept and slope
parameters, respectively.
b) These parameters are assumed to be fixed, but unknown.
c) The residual
i
is assumed to be an unobserved, random
error.
d) Under typical assumptions
0
i
E
.
e) Thus, the expected value of
i
y
given
i
x
then becomes:
ii xyE
2. The goal of regression analysis is to estimate
and
and to say
something about the significance of the relationship.
3. From a terminology standpoint,
y
is typically referred to as the
dependent variable and
x
is referred to as the independent
variable. Cassella and Berger prefer the terminology of
y
as the
response variable and
x
as the predictor variable.
4. This relationship is a linear regression in that the relationship is
linear in the parameters
and
. Abstracting for a moment, the
traditional Cobb-Douglas production function can be written as:
ii xy
taking the natural log of both sides yields:
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download Simple Linear Regression - Lecture Notes | AEB 6933 and more Study notes Introduction to Macroeconomics in PDF only on Docsity!

Simple Linear Regression

Lecture XXVIII

I. Overview

A. Most of the material for this lecture is from George Casella and Roger L. Berger Statistical Inference (Belmont, California: Duxbury Press, 1990) Chapter 12, pp. 554-577. B. The purpose of regression analysis is to explore the relationship between two variables.

  1. In this course, the relationship that we will be interested in can be expressed as: yi   xi   i

where yi is a random variable and xi is a variable hypothesized to affect or drive yi.

a) The coefficients  and  are the intercept and slope

parameters, respectively. b) These parameters are assumed to be fixed, but unknown. c) The residual  i is assumed to be an unobserved, random error.

d) Under typical assumptions E   i   0.

e) Thus, the expected value of yi given xi then becomes:

E  yi     xi

2. The goal of regression analysis is to estimate  and  and to say

something about the significance of the relationship.

  1. From a terminology standpoint, y is typically referred to as the dependent variable and x is referred to as the independent variable. Cassella and Berger prefer the terminology of y as the response variable and x as the predictor variable.
  2. This relationship is a linear regression in that the relationship is

linear in the parameters  and . Abstracting for a moment, the

traditional Cobb-Douglas production function can be written as:   yixi

taking the natural log of both sides yields:

ln yi  ln   ln xi 

Professor Charles Moss Fall 2007

Noting that ln  (^)  *, this relationship is linear in the estimated parameters and, thus, can be estimated using a simple linear regression.

II. Simple Linear Regression

A. The setup for simple linear regression is that we have a sample of n pairs of variables (^)  x 1 (^) , y 1 (^)  ,  xn , yn . Further, we want to summarize this relationship using by fitting a line through the data. B. Based on the sample data, we first describe the data as follows:

  1. The sample means

   

n

i

i

n

i

x (^) n xi y n y 1 1

  1. The sums of squares:

   

^ ^ 

 

 

  

n

i

xy i i

n

i

yy i

n

i

xx i

S x x y y

S x x S y y

1

1

2 1

2

  1. The most common estimators given this formulation are then given by

y bx S

S

b xx

xy   

C. Least Squares: A Mathematical Solution

  1. Following on our theme in the discussion of linear projections

“Our first derivation of estimates of  and  makes no statistical

assumptions about the observations (^)  x 1 (^) , y 1 (^)  ,  xn , yn . Think of drawing through this cloud of points a straight line that comes „as close as possible‟ to all the points.”

  1. This definition involves minimizing the sum of square error in the

choice of  and :

^ ^  

n

i

RSS yi xi 1

2 , min    

Professor Charles Moss Fall 2007

Grape Yields and Number of Clusters

Year

Yield (y)

Cluster Count (x) 1971 5.6 116. 1973 3.2 82. 1974 4.5 110. 1975 4.2 97. 1976 5.2 115. 1977 2.7 80. 1978 4.8 125. 1979 4.9 116. 1980 4.7 117. 1981 4.1 93. 1982 4.4 107. 1983 5.4 122.

Computing the simple least squares representation:

xy

xx S

S

y

x

  1. Graphically, the regression results can be depicted as:

90 100 110 120

4

5

Professor Charles Moss Fall 2007

  1. In order to bring the results from matrix algebra into the

discussion, we are going to use the unity regressor form of  and

rewrite the x matrix as:

X y

First, we derive the projection matrix

 '  ' 1 Pc X X X X  

which is a 12 x 12 matrix. The projection of y onto the space can then be calculated as:

Pc yXX ' X  ^1 X ' y

The numerical results of this projection are

Pc y

Professor Charles Moss Fall 2007

This implies that

 

 

 

 

1

1

1 1

1

1

1

n

i

i i

n

i

i

n

i

i i

n

i

i

n

i

i i

n

i

i i

n

i

i i

d x

d

d dx

d x

dEy

E dy

  1. The linear estimator that satisfies these unbiasedness conditions and yields the smallest variance of the estimate is referred to as the best linear unbiased estimator (or BLUE). In this example, we need to show that

 

 

xx

n

i

i i

xx

i i (^) S

x x y

S

x x d

 

 ˆ^1

Minimizes the variance for all such linear models. Given that the yi s are uncorrelated, the variance of linear model can be written as:

  ^ ^    

n i

i

n

i

i i

n

i

V di yi d V y d 1

2 2 1

2 1

The problem of minimizing the variance then becomes choosing the di s to minimize this sum subject to the unbiasedness constraints

min

1

1

1

2 2

n

i

i

n

i

i i

n

i d i

d

st dx

d i

Professor Charles Moss Fall 2007

Transforming this to Lagrangian form:

1

1

2 2

2

1 1 1

2 2

  

  

n

i

i

n

i

i i

i i

i i i

n

i

i

n

i

i i

n

i

i

d

L

dx

L

d x

d x d

L

L d dx d

Using the results from the first n first-order conditions and the second constraint first, we have

x n

x

n x

x

n

i

i

n

i

i

n

i

i

 

 

 

1

2 1

2

1 2 2

Substituting this result into the first n first-order conditions yields:

x x

d x x

i

i i

2

2 2

Substituting these conditions into the first constraint, we get

 

 

 

 

  xx

i n

i

i i

i i

n

i

i i

n

i

i i

S

x x

x x x

x x d

x xx

x x x

1

1

2

1

2

2