Docsity

Simple and Multiple Linear Regressions - Applied Regression Analysis - Lecture Notes, Study notes of Mathematical Statistics

Toggle sidebar
bg1
Chapters 2 and 3: Simple and Multiple Linear Regressions
This chapter provides the standard results for least-square model fitting in the multiple
linear regressions. In this chapter, we will talk, in a multiple regression model, about
• Estimation of the Model Parameters,
• Hypothesis Testing,
• Confidence Intervals,
• Correlation coefficients.
A regression model that involves more than one regressor variable is called a multiple
regression model. The general form of a regression model of independent variable is
given by
k
ε
β
β
β
β
+++++=
XXX k
k
YL
2
2
1
10 ,
where
β
β
β
k
L,,
10 are the regression coefficients. The term linear is used because the
above equation is a linear function of the unknown parameters
β
β
β
k
L,,
10 .
The parameter
β
j
represents the expected change in the response
Y
per unit change in
X
j
when all of the remaining regressor variables
)( ji
X
i
≠
are held constant. For this
reason the parameters ,,2,1, kj
j
L
=
β
are often called partial regression coefficients.
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a

Partial preview of the text

Download Simple and Multiple Linear Regressions - Applied Regression Analysis - Lecture Notes and more Study notes Mathematical Statistics in PDF only on Docsity!

Chapters 2 and 3: Simple and Multiple Linear Regressions

This chapter provides the standard results for least-square model fitting in the multiple linear regressions. In this chapter, we will talk, in a multiple regression model, about

  • Estimation of the Model Parameters,
  • Hypothesis Testing,
  • Confidence Intervals,
  • Correlation coefficients.

A regression model that involves more than one regressor variable is called a multiple regression model. The general form of a regression model of independent variable is given by

k

= (^) β + β X + β X + + β Xk + ε k

Y 2 L

where β 0 , (^) β 1 , L β k are the regression coefficients. The term linear is used because the

above equation is a linear function of the unknown parameters β 0 , (^) β 1 , L β k.

The parameter β j represents the expected change in the response Y per unit change in

X j when all of the remaining regressor variables^ X i (^ i ≠^ j )are held constant. For this

reason the parameters (^) β (^) j , j = 1 , 2 ,L k ,are often called partial regression coefficients.

Suppose, for each specific combination of independent variables (^) X 1 , (^) X 2 ,L , (^) Xk , the

variable is a random variable with certain probability distribution having finite mean and variance. In addition, we assume

Y

μ (^) { Y | X 1 , X 2 ,L , Xk }=^ β 0 + β 1 X (^) 1 + β 2 X 2 +L+ β k Xk

Assumptions:

  • Normality: For any fixed combination , the variable is normally distributed

X (^) 1 ,^ X 2 ,L^ , Xk

  • Homoscedasticity:
    • ( ) σ σ 2 (^12) | , , ,

| , , ,^2

1 2

X X X

Var Y X X Xk Y L k

L

  • Independence: The Y observations are statistically independent.

The least-squares function is

( ) (^) ∑ (^) ⎟ ⎠

⎞ ⎜ ⎝

⎛ ∑ − − = =

n

i

n k i

k

j

S (^) i 1 yi jxij

2

1

2 0 1 2 1

β ,β ,β ,L,β ε β 0 β

The function S must be minimized with respect to β 0 , (^) β 1 , L β k. The least-squares

estimators of β 0 , (^) β 1 , L β k must satisfy the following equations:

and for j = 1 , 2 ,L, k ,

∂ β (^0)

∂ S

β β β β

) ) ) ) L k

0 1 2

= − (^) ∑ ∑ = =

n

i

k i (^) j j ij y x 1 0 1

(^2) β β 0

) )

β (^) j

S

1 0 1

⎟⎟^ =

= − ∑ − −∑ = =

y (^) x xij

n

i

k

j i β^ β j ij

) )

β β β β

) ) ) ) L k

0 1 2

The least-squares normal equations are:

∑ ∑ ∑ ∑ = = = =

n

i i

n

i k ik

n

i i

n

i

n (^) xi x x y 1 1 1 2 2 1

β 0 β 1 1 β β

) ) ) ) L

∑ ∑ ∑ ∑ ∑ = = = = =

n

i i

n ki ik

n

i i

n

i

n

i

xi (^) xi xi x xi x xi y 1 2 1 2 1 1

2 β 0 1 1 β 1 1 β 1 β 1 1

) ) ) ) L

∑ ∑ ∑ ∑ ∑ = = = = =

n

i i

n ki ik

n

i i

n

i i

n

i

xi x x xi xi x xi y 1 1 1

2 β 0 1 2 β 1 1 2 1 β 2 2 β 2 2

) ) ) ) L

.....

i i ki i i i i ik i ik x (^) ik xik xiky (^21 ) 1 (^0111) β β β β

∑ + ∑ + ∑ + + ∑ = ∑

n n n n n x x x x

) ) ) ) 2 L = = = = =

ote that there are normal equations, one for each of the unknown regression lution to

N p = k + 1

coefficients. The so the normal equations will be the least-squares estimators

β β β β

) ) ) ) , , ,L,. 0 1 2 k

It is more convenient to deal with multiple regression models if they are expressed in matrix notation.

Example 1: Consider the following data:

y x 1 x 2 16 7 5 11 3 4 12 3 6 14 4 1

y

X ⎥

β

β

β

β

2

1

0 ,

⎥

ε

ε

ε

ε

ε

4

3

2

1

,

⎥

e

e

e

e

e

4

3

2

1

⎡ n^ n ⎤

∑

∑

∑

=

=

=

1 2

1 1

1 /

n

i i i

n

i i i

n

i i

x y

x y

y

X y

∑ ∑ ∑

∑ ∑ ∑

∑ ∑

= =

= = =

= =

1

2 2 1 1 2

2 1 1 1

2 1 1

1 1 1 2

/

n

i i i

n

i i

i

n

i i

n

i

n

i i

i i i i

x x x x

x x x x

x x

X X

i

i

n

( )

−

1 X^ X

Therefore,

( )

−

  1. 22

/ 1 / y β X X X

Y = 9. 41 + 1. (^11) X 1 − 0. (^22) X 2

y 1 =^9.^41 +^1.^11 (^7 )−^0.^22 (^5 )=^16.^08

) y 2 =^9.^41 +^1.^11 (^3 )−^0.^22 (^4 )=^11.^86

)

y 3 =^9.^41 +^1.^11 (^3 )−^0.^22 (^6 )=^11.^42

) y 4 =^9.^41 +^1.^11 (^4 )−^0.^22 (^1 )=^13.^63

)

Note that should be zero.

e y^ y

) ∑ =

n

i i e 1

( ) ( ) (^ )

( ) ( ) ( )⎥

Cov (^) Y 2 , Y 1 VarY 2 L CovY 2 , Yn

( ) ( ) ( ) ⎥

Y Y Y Y Y

Y Y Y Y Y

n n n

n

Cov Cov Var

Var Cov Cov

L

M M M

L

1 2

1 1 2 1

Properties of the Least-Squares Estimators:

Since the least-squares estimator β

) is a linear combination of the observations, it

follows that β

) is normally distributed with mean vector (^) β and covariance matrix

Cov Var ( (^) X /^ X ) 2 −^1 ⎟= ⎠

β β σ

) )

. This implies that the distribution β

) j

is normal

with mean β j and variance (^) σ C (^) ij where is the th diagonal element of the 2 C (^) ij j

( (^) X /^ X )

1 ma

− trix. Let

SE β (^) j MS (^) sCij σ Cij

) (^) ) ⎟= = ⎠

.. Re

Example 1 (cont.):

The estimate of the covariance matrix i

−

σ X^ X

)

s

⎥ ⎢^ − −

2. 8645 712 0 92.^49180.^45250.^3160

( )^1.^219

.. ( ) 3. 4918 1. 868. .( ) 0. 1141 0. 3378 1 β =^ =

) S E , 0 β =^ =

) S E ,

.. ( ) 0. 0876 0. 2960 2 β =^ =

) S E

Gauss-Markov theorem states that the least-squares estimators are unbiased and have minimum variance when compared with all other unbiased estimators that are linear

combinations of the. Hence, the least-squares estimators are best linear unbiased

estimators , where “best” implies minimum variance.

ypothesis Testing:

The test statistic for testing

y (^) i

H

H (^) 0 :^ β^ j =^ β j 0 is

t S E j

⎝β

TS j^ j^0 ~ ⎛ ⎞

β β )

) )

-distribution, with df = n − p

Example 1 (cont.): The test statistic for testing (^) H 0 : (^) β 1 = 1 versus (^) H 1 : (^) β 1 > 1 is

( )

1

β

β )

)

= E

. Then df = 4 − 3 = 1

and

P − value = P ( TS > 0. 3256 )≅

S

TS

T he test statistic for testing (^) H 0 : (^) β 2 = 0 versus (^) H 1 : (^) β 2 ≠ 0 is

( )

2

β

β )

)

S E

TS. Then df = 4 − 3 = 1

and

P − value = 2 P ( TS > 0. 7432 )=

Analys ay use an analysis-of variance approach to test significance f regression. The analysis of variance is based on a partitioning of total variability in the esponse variabl.

is of Variance: We m o r e y

y i y^^ (^ yi y )^ (^ yi yi )

Squaring both sides of the above equation and summing over all observatio ns produces

∑ (^ )^ ∑(^ )^ ∑ (^ − )

= = =

i i i

y i y yi y yi yi

1

2 1 1

n 2 n ) 2 n )

L et

∑ (^ − )

=

n

i

SS T 1 yi y

2

=

n

i

SS R 1 yi y

=

n

i

SS s 1 yi yi

2 Re

The fundamental a alyn sis-of-variance identity for a regression model is

SS T = SSR^ + SS Re s

I t can be shown that

n

n

i i

n

n

i i i

y

y y

y

SS y

n

i T

=

2

/

2

1

2

SS s ee ( y X )( y X ) y y X y

/ / / /

Re β β^ β

So n

n

i

yi

SS R X y

2

/

Example 1 (cont.):

( )

( )

  1. 75 4

(^1611121453) 16 11 12 11

(^22) 2 2 2 14 = + + + − = − =

SST

( ) 1.^219

/ 1 1

(^22) Re =^ ∑^ − =∑ = = = = SS y y e e e

n

i

n

i s (^) i i i

)

SS (^) R =^ SST − SS Re s =^14.^75 −^1.^219 =^13.^531

df

SS MS R

R R ,^ 1 1.^219

Re

Re Re = = = df

SS MS s

s s

Re

MS

MS s

TS = F − test R , P − value = P ( TS > 5. 55 )

ource of ariation

Degrees of Freedom

Sum of Squares

Mean Square F-Value P-value

S

V

Regression p − (^1) SS (^) R MS (^) R

MS

MS s

R Re

Residual n^ −^ p SS Re s MS^ Re s

Total n − (^1) SS T MS^ T

Analysis of Variance

SAS Output:

Source DF Sum of Squares

Mean Square F Value Pr > F

Model 2 13.53094 6.76547 5.55 0.

Error 1 1.21906 1.

Corrected Total 3 14.

Root MSE 1.10411 R-Square 0.

Dependent Mean 13.25000 Adj R-Sq 0.

Coeff Var 8.

Parameter Estimates

Variable DF Parameter tim

Standard Err t Va ue Pr |t| Es ate or l >

Intercept 1 9.40635 1.86871 5.03 0.

x1 1 1.11371 0.33788 3.30 0.

x2 1 -0.22241 0.29607 -0.75 0.

Confidence Intervals:

A 100 ( 1 − α)percen t confid ence intervalfor β (^) j is

β (^) α β

) ) j t j

A 90% confidence interval for

/ 2 , df S^. E.

Example 1 (cont.): (^) β 1 is

  1. 11 ± 6. 314 ( 0. 3378 )⇒(− 1. 02 , 3. 24 )

. ( ) 0. 1141 0. 0876 0. 0082 ) 0. 2181 0. 4670 1 2 . (^) β −β = + − 2 ( − = =

) ) S E

A 90% c0nfidence interval for β β 1 2 − is

.. ( ) 1. 11 ( 0. 22 ) 6. 314 ( 0. 4670 ) ( 1. 6186 , 4. 2786 ) 1 2 /^2 , 1 2 β −β ± α β −β = − − ± ⇒^ −

) ) ) ) t (^) dfSE

A 100 ( 1 − α)percent prediction interval to predict future observation the

orresponding to the point is

y 0

x

x

x x

0 k

02

01 0

M

c

( ) ⎟ ⎠

± ⎛^ + −

y (^) t df x X X x 0

2 /^1 0 /^2 ,

α^ σ^10

) )

E xample 1 (cont.): A 90% prediction interval for (^) y 0 for (^) x 1 = 4 and (^) x 2 = 5 is

  1. 75 ± 6. 314 1. 219 ( 1 + 0. 33 )⇒( 4. 71 , 20. 79 )

Example 2: In the data set of the following table denotes the weight (in pounds) and e snout vent length (distance in inches from back of head to end of nose) for 15 lligators captured in central Florida. Because is easier to observe than for alligators el ing we to snout vent length. Such a model can be used to predict the weight of alligators with particular snout vent lengths. Fit a model to the data. Find a 90% prediction interval for

Alligator

w l th a l w in their natural habitat, we want to construct a mod relat ight

W if l = 54. 598.

l w 1 47.942 130. 2 36.966 50. 3 75.944 639. 4 30.877 27. 5 45.150 79. 6 46.063 109. 7 31.817 33. 8 42.948 90. 9 33.115 35. 10 35.874 38. 11 66.027 365. 12 43.816 83. 13 40.854 79. 14 41.679 83. 15 43.816 70.

Scat t er pl ot of Wei ght vs. Lengt h w

0

200

300

400

500

600

700

100

l

30 40 50 60 70 80