Linear Regression II - Lecture Notes | STAT 312, Study notes of Mathematical Statistics

Material Type: Notes; Class: Introduction to Mathematical Statistics; Subject: STATISTICS; University: University of Wisconsin - Madison; Term: Fall 2004;

Typology: Study notes

Pre 2010

Uploaded on 09/02/2009

koofers-user-7cl
koofers-user-7cl 🇺🇸

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Stat 312: Lecture 21
Linear Regression II.
Moo K. Chung
Dec 7, 2004
Concepts
1. Maximum likelihood estimation. Given a linear
model
Yj=β0+β1xj+²j
with ²jN(0, σ2), we will estimate β0, β1using
the maximum likelihood estimation. Note that
YjN(β0+β1xj, σ2).
The density function for Yjare
f(yj) = 1
2πσ exp h(yjβ0βjxj)2
2σ2i.
The loglikelihood is
L(β0, β1) = const 1
2σ2
n
X
j=1
(yjβ0β1xj)2.
We maximize the loglikelihood which is equivalent
to minimizing the sum of the residuals
1
2σ2
n
X
j=1
(yjβ0β1xj)2.
Hence MLE is LSE in linear regression.
2. The least squares estimation for β1are given by
ˆ
β1=Sxy
Sxx
where Sxy =n(xy ¯x¯y). It can be shown that
ˆ
β1=Sxy
Sxx
=
n
X
j=1
cjYj,
where
cj= (xj¯x)/Sxx.
So LSE is a linear estimation. From Pn
j=1 cj= 0,
Pn
j=1 cjxj= 1 and Pn
j=1 c2
j=S1
xx we can show
that
Eˆ
β1=β1
showing unbiasness. Further, Vˆ
β1=σ2/Sxx.
Since ˆ
β1is a linear combination of normals, ˆ
β1
N(β1, σ2/Sxx).
3. We are interested in hypothesis testing
H0:β1= 0 vs. H1:β16= 0.
Inference on the slope parameter β1is based on test
statistic
T=ˆ
β1β1
Sˆ
β1tn2,
where Sˆ
β1= ˆσ/Sxx and ˆσ=SSE/(n2).
It can be shown that SSE =Syy S2
xy/Sxx , we
get Sˆ
β1=1
n2qSyy
Sxx (Sxy
Sxx )2. Then we reject
H0if |t|> tα/2,n2at 100(1 α)% significance.
We don’t usually compute the test statistic by hand.
Use R-package.
Example. We continue Lecture 19 example.
>summary(lm(y˜x))
Call: lm(formula = y ˜ x)
Residuals:
Min 1Q Median 3Q Max
-10.908 -6.312 1.758 4.354 10.836
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 29.48 13.23 2.22 0.06
x 0.55 0.17 3.12 0.01 *
---
Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 ‘.’ 0.1 1
Residual standard error: 7.647 on 8 degrees
of freedom Multiple R-Squared: 0.5519,
Adjusted R-squared:0.4959 F-statistic:9.854on
1 and 8 DF, p-value: 0.01383

Partial preview of the text

Download Linear Regression II - Lecture Notes | STAT 312 and more Study notes Mathematical Statistics in PDF only on Docsity!

Stat 312: Lecture 21

Linear Regression II.

Moo K. Chung

[email protected]

Dec 7, 2004

Concepts

  1. Maximum likelihood estimation. Given a linear model Yj = β 0 + β 1 xj + ≤j with ≤j ∼ N (0, σ^2 ), we will estimate β 0 , β 1 using the maximum likelihood estimation. Note that

Yj ∼ N (β 0 + β 1 xj , σ^2 ).

The density function for Yj are

f (yj ) =

2 πσ

exp

[ (^) (yj − β 0 − βj xj ) 2 2 σ^2

]

The loglikelihood is

L(β 0 , β 1 ) = const −

2 σ^2

∑^ n

j=

(yj − β 0 − β 1 xj )^2.

We maximize the loglikelihood which is equivalent to minimizing the sum of the residuals

1 2 σ^2

∑^ n

j=

(yj − β 0 − β 1 xj )^2.

Hence MLE is LSE in linear regression.

  1. The least squares estimation for β 1 are given by

β^ ˆ 1 = Sxy Sxx where Sxy = n(xy − x¯y¯). It can be shown that

β^ ˆ 1 = Sxy Sxx

∑^ n

j=

cj Yj ,

where cj = (xj − x¯)/Sxx. So LSE is a linear estimation. From

∑n ∑ j=1^ cj^ = 0, n j=1 cj^ xj^ = 1^ and^

∑n j=1 c 2 j =^ S − xx (^1) we can show that E βˆ 1 = β 1

showing unbiasness. Further, V βˆ 1 = σ^2 /Sxx. Since βˆ 1 is a linear combination of normals, βˆ 1 ∼ N (β 1 , σ^2 /Sxx).

  1. We are interested in hypothesis testing H 0 : β 1 = 0 vs. H 1 : β 1 6 = 0. Inference on the slope parameter β 1 is based on test statistic T = βˆ 1 − β 1 S (^) βˆ 1

∼ tn− 2 ,

where S (^) βˆ 1 = ˆσ/

Sxx and σˆ = SSE/(n − 2). It can be shown that SSE = Syy − S^2 xy/Sxx, we get S (^) βˆ 1 = √n^1 − 2

Syy Sxx −^ (^

Sxy Sxx ) (^2). Then we reject H 0 if |t| > tα/ 2 ,n− 2 at 100(1 − α)% significance. We don’t usually compute the test statistic by hand. Use R-package. Example. We continue Lecture 19 example.

summary(lm(y˜x))

Call: lm(formula = y ˜ x)

Residuals: Min 1Q Median 3Q Max -10.908 -6.312 1.758 4.354 10.

Coefficients: Estimate Std. Error t value Pr(>|t|)

(Intercept) 29.48 13.23 2.22 0. x 0.55 0.17 3.12 0.01 *


Signif. codes: 0 ‘’ 0.001 ‘’ 0.01 ‘

Residual standard error: 7.647 on 8 degrees of freedom Multiple R-Squared: 0.5519, Adjusted R-squared:0.4959 F-statistic:9.854o 1 and 8 DF, p-value: 0.