Lecture 5
Lecture 5
Model
Dr. Frank Wood
2
2 σ
σ {b1 } = (Xi −X̄)2
(Yi −Ŷi )2
SSE
σ2 = σ2 ∼ χ2 (n − 2)
s{b1 } s2 {b1 }
σ{b1 } = σ 2 {b1 }
0.2 0.5 0
0.4
0.15
0.3 -1
0.1
0.2
-2
0.05
0.1
0 0
-10 -8 -6 -4 -2 0 2 4 6 8 10 -10 -8 -6 -4 -2 0 2 4 6 8 10 -3
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
∗ b1 −0
t = Ŝ(b1 )
∗ b1 −0
t = s{b1 }
Test statistic
0.4
0.35
0.3
0.25
0.2
0.15
0.1
0.05
p-value is value of α
0 that moves the green line
-10 -8 -6 -4 -2 0 2 4 6 8 10
( β est. - β) / σ est.
to the blue line
β
Frank Wood, [email protected] Linear Regression Models Lecture 5, Slide 17
Calculating the p-value
• The p-value, or attained significance level, is
the smallest level of significance α for which
the observed data indicate that the null
hypothesis should be rejected.
• This can be looked up using the CDF of the
test statistic.
• In Matlab
– Two-sided p-value
• 2*(1-tcdf(|t*|,ν))
b0 = Ȳ − b1 X̄
E(b0 ) = β0
2
2 2 1 X̄
σ {b0 } = σ (n + (Xi −X̄) 2
)
Ŷh = b0 + b1 Xh
We are interested in the sampling distribution
of this quantity
Ŷh = b0 + b1 Xh
• Since this quantity is itself a linear
combination of the Yi’s it’s sampling
distribution is itself normal.
• The mean of the sampling distribution is
2 1
2 nσ 2 σ2
σ {Ȳ } = n2 σ {Ȳ } = n2 = n
2 σ2 2
σ {Ŷh } = n + σ
(Xi −X̄)2
(X h − X̄)2
• Or
2
1 (X − X̄)
σ 2 {Ŷh } = σ 2 n + h
(Xi −X̄)2
Ŷh −E{Yh }
s{Ŷh }
∼ t(n − 2)