Docsity

Lecture Notes on Simple Linear Regression | ESE 302, Study notes of Electrical and Electronics Engineering

Toggle sidebar
bg1
ESE 302 Tony E. Smith
NOTES ON SIMPLE LINEAR REGRESSION
1. INTRODUCTION
The purpose of these notes is to supplement the mathematical development of linear
regression in Devore (2008). This development also draws on the treatment in Johnston (1963)
and Larsen and Marx (1986). We begin with the basic least squares estimation problem, and
next develop the moments of the estimators. Finally the fundamental optimality property of
these estimators is established in terms of the Gauss-Markov Theorem.
2. LINEAR LEAST SQUARES ESTIMATION
The basic linear model assumes the existence of a linear relationship between two
variables, and
x
y, which is disturbed by some random error,
ε
. Hence for each value of
x
the
corresponding
y
-value is a random variable of the form
(2.1) 01
Yx
β
βε
=+ +
where 0
β
and 1
β
are designated, respectively, as the intercept parameter and the slope parameter
of the linear function, 01
x
β
+ . If n values ( : 1,.., )
i
x
in
=
of
x
are observed, with
corresponding errors ( : 1,.., )
iin
ε
=, then the resulting random variables, ( : 1,.., )
i
Yi n=, are given
by
(2.2) 01iii
Yx
β
βε
=+ + , i = 1,…,n
In this context it is assumed that the random errors, ( : 1,.., )
iin
ε
=
, are independently and
identically distributed ( iid ) with mean zero and variance 2
σ
, so that
(2.3) E( ) 0
i
ε
= , i = 1,…,n
(2.4) var 2
()
i
ε
σ
= , i = 1,…,n
If values of y corresponding to ( : 1,.., )
i
x
in
=
are also observed, and are denoted by
( : 1,..., )
i
y
in=, then the least squares estimation problem is to find estimates, 0
ˆ
β
and 1
ˆ
β
, of the
unknown parameter values, 0
β
and 1
β
, which minimize the sum of squared residuals
[designated as 01
(,)
f
bb in Devore , p. 455]:
pf3
pf4
pf5
pf8

Partial preview of the text

Download Lecture Notes on Simple Linear Regression | ESE 302 and more Study notes Electrical and Electronics Engineering in PDF only on Docsity!

ESE 302 Tony E. Smith

NOTES ON SIMPLE LINEAR REGRESSION

1. INTRODUCTION

The purpose of these notes is to supplement the mathematical development of linear

regression in Devore (2008). This development also draws on the treatment in Johnston (1963)

and Larsen and Marx (1986). We begin with the basic least squares estimation problem, and

next develop the moments of the estimators. Finally the fundamental optimality property of

these estimators is established in terms of the Gauss-Markov Theorem.

2. LINEAR LEAST SQUARES ESTIMATION

The basic linear model assumes the existence of a linear relationship between two

variables, x and y , which is disturbed by some random error, ε. Hence for each value of x the

corresponding y -value is a random variable of the form

0 1

Y = β + β x +ε

where 0

β and

1

β are designated, respectively, as the intercept parameter and the slope parameter

of the linear function, 0 1

β + β x. If n values ( : 1,.., )

i

x i = n of x are observed, with

corresponding errors ( : 1,.., ) i

ε i = n , then the resulting random variables, ( : 1,.., )

i

Y i = n , are given

by

i 0 1 i i

Y = β + β x + ε , i = 1,…, n

In this context it is assumed that the random errors, ( : 1,.., ) i

ε i = n , are independently and

identically distributed ( iid ) with mean zero and variance

2

σ , so that

(2.3) E( ) 0

i

ε = , i = 1,…, n

(2.4) var

2

( ) i

ε = σ , i = 1,…, n

If values of y corresponding to ( : 1,.., ) i

x i = n are also observed, and are denoted by

i

y i = n , then the least squares estimation problem is to find estimates, 0

β and

1

β , of the

unknown parameter values, 0

β and

1

β , which minimize the sum of squared residuals

[designated as 0 1

f ( b , b )in Devore , p. 455]:

2

0 1 0 1 1

n

i i i

S β β y β β x

=

This function is easily seen to be convex and differentiable in 0

β and

1

β , so that the

unique solution ( 0

1

β ) is given by the first-order conditions:

0 1 0 1

0

i i i

S β β y β β x

0 1 0 1

1

i i i i

S β β y β β x x

If we let

i (^) i

x x

n

and

i (^) i

y y

n

, then by (2.6)

0 1 0 1

i i i i i i i i

y n x y x

n n

0 1

⇒ y − β − β x = 0

0 1

⇒ y = β +β x

and by (2.7)

i i i i

y − β − β x x =

To simplify (2.9) let the estimated y -value corresponding to ( 0

1

β ) be defined by

0 1

i i

y = β + β x , i = 1,…, n

and rewrite (2.9) as

i i i i

y − y x =

Note also from (2.8) that

i i i i i i i i i

y − y = y − y = β + β x − ny

i i

= n β + β x − ny = n β + β x − ny

( )(^ )

(^1 )

i i i

i i

Y Y x x

x x

∑

∑

and, similarly, that 0

β is a random variable of the form

0 1

β = Y −β x

To compute the moments of the slope estimator, 1

β , it is convenient to simplify

expression (3.2) as follows. By breaking (3.2) into two terms

1 2 2

i i i i i

i i i i

Y x x Y x x

x x x x

∑ ∑

∑ ∑

and observing that

i i i i i i

x x x nx n x x

n

∑ ∑ ∑

we see that the second term vanishes, and hence that the estimator 1

β can be written as a linear

combination of the i

Y ’s

1

i i^ i

β = wY

∑

where the coefficients i

w are of the form

( )

2

i

i

j j

x x

w

x x

∑

, i = 1,…, n

and hence are non-random (i.e., depend only on the given values of the i

x ’s). To analyze (3.6)

we begin with several observations about the coefficient values in (3.7). First observe from

(3.5) that

2

i i

i i

i i

x x

w

x x

∑

∑

∑

and moreover that

2

2

i i

i i^ i

i i

x x

w x x

x x

∑

∑

∑

which together with (3.8) also implies

i i i i i i i i i i i

w x = w x − x w = w x − x = ∑ ∑ ∑ ∑

To compute the mean of 1

β , observe from (2.2) and (2.3) that

0 1 0 1

E( ) E( )

i i i i

Y = β + β x + ε = β +β x

so that by (3.6) , together with (3.8) and (3.10) ,

1 0 1

E( ) E( ) =

i i i i i i

β = w Y w β +β x ∑ ∑

0 1 1

i i i i i

= β w + β w x = +β

∑ ∑

1

Thus 1

β is an unbiased estimator of

1

β. Moreover, since (3.1) and (2.3) imply that

0 1 0 1

E( ) E( )

i i i

Y x x

n

= β + β + ε = β +β ∑

it follows from (3.3) together with (3.13) that

(3.14) [ ]

0 1 0 1 1 0

E( β) = E( Y ) − E( β) x = β + β x − β x = β

and thus that 0

β is also an unbiased estimator of

0

To compute the variance of 1

β , we again observe from (3.6) that

1 0 1 0 1

i i^ i^ i i i^ i^ i i^ i

β = w β + β x + ε = w β + β x + w ε

∑ ∑ ∑

i i i

= const + w ε

∑

and hence (from the independence of the i

ε ’s that

( )

2

1

var( ) var var( ) i i i i i i

β = w ε = w ε

∑ ∑

Hence we may conclude from (2.4) and (3.7) that

( )

2

2 2 2

1 2

var( ) =

i

i

i i

j j

x x

w

x x

∑ ∑

∑

This result, known as the Gauss-Markov Theorem , provides the single strongest justification for

linear least-squares estimation, and can be stated as follows:

GAUSS MARKOV THEOREM. For any linear function, 0 0 1 1

L = a β + a β, of

0

1

β ), the least squares estimator ,

0 0 1 1

ˆ ˆ^ ˆ

L = a β + a β, has minimum variance

among all linear unbiased estimators of L.

Proof: We shall prove this assertion only for the linear function with coefficients

0 1

( a = 0, a = 1),i.e., for the estimate, 1

β , of the slope parameter,

1

β , (which is by far the most

important of the two individual parameters). The argument for any linear function of 0

β and

1

is essentially the same. To begin with, observe from (3.6) that 1

β is indeed a linear estimator,

i.e., is a linear function of the random variables ( i

Y : i = 1,…, n ). Moreover, it was shown in (3.12)

that 1

β is also an unbiased estimator of

1

β. Hence it remains only to show that the variance of

1

β never exceeds that of any other linear unbiased estimator. To do so, consider any other linear

estimator, say

1

i i i

β c Y

∑

and suppose that 1

is also unbiased estimator. Then by (3.12) we must have

1 1

= E( ) = E( )

i i i

β β c Y

∑

0 1 0 1

i i i i i i i i

c β + β x = β c +β c x

∑ ∑ ∑

But since unbiasedness requires that (4.2) hold for all values of the unknown parameters 0

β and

1

β , it follows by setting

0

β = 1 and

1

β = 0 that

i i

c = ∑

and in turn, by setting 1

β = 1 , that

i i^ i

c x = ∑

Hence, in a manner identical with (3.15), these two conditions are seen to imply that

1 1 i i 1 i i i i

β − β = c Y −β = c ε

∑ ∑

and thus that the variance of 1

is given by

2 2 2

1

var( ) var( )

i

i i i i

β = c ε =σ c ∑ ∑

To compare this with var( 1

β ) , observe first that if the differences between the coefficients of

1

and 1

β in (4.1) and(3.6) are denoted by , 1,.., ,

i i i

d = c − w i = n then (4.6) can be rewritten as

2 2 2 2 2

1

var( ) ( ) ( 2 )

i

i i i i i i i i i

β = σ w + d = σ w + d w + d

∑ ∑ ∑ ∑

But by (4.3) and (4.4) together with (3.8) and (3.10) we must have

i i i i i i i i i i

= c = w + d = + d ⇒ d = ∑ ∑ ∑ ∑ ∑

i i i i i i i i i i i i i i i

= c x = w x + d x = + d x ⇒ d x = ∑ ∑ ∑ ∑ ∑

which together imply that

2 2

i i i^ i^ i i

i i i i i

j j j j

d x x d x x

d w d

x x x x

∑ ∑

∑ ∑

∑ ∑

Hence, recalling (3.7) , we see that (4.7) reduces to

2 2 2 2 2 2

1 1

var( ) var( )

i

i i i i i

β = σ w + σ d = β +σ d ∑ ∑ ∑

and may conclude from the nonnegativity of

2 2

i i

σ d

∑

that

1 1

var( β) ≥var( β)

Thus 1

β has minimum variance among all linear unbiased estimators, and the result is

established.

5. REFERENCES

Devore, J.L., (2008) Probability and Statistics for Engineering and the Sciences ,

Seventh Edition, Duxbury Press, Belmont, California.

Larsen, R.J. and M.L. Marx, (1986) An Introduction to Mathematical Statistics and its

Applications , Second Edition, Prentice-Hall, Englewood Cliffs, N.J.

Johnston, J., (1963) Econometric Methods , McGraw-Hill, N.Y.