Topic 3b
Topic 3b
n n n
Y Y Y ˆ Y Y Yˆ
i i i i
i 1 i 1 i 1
Analysis of Variance
Source DF SS MS F P
Regression 1 36464 36464 99.80 0.000
Residual Error 47 17173 365
Total 48 53637
How to find n?
• Recall the degrees of freedom?
( 𝑛 −1 ) =( 𝑘 ) +(𝑛 − 𝑘 −1)
Definitions of Mean Squares
We already know the mean square error (MSE) is defined
as:
MSE
Y Y i
ˆ 2
i
SSE
n k 1 n k 1
MSE
Yi Yˆi
2
SSE
n 2 n 2
𝑀𝑆𝑅=
∑ ^ 2
( 𝑌 𝑖 −𝑌 𝑖 ) 𝑆𝑆𝑅
=
𝑘 𝑘
R- Squared
* MSR
Test statistic F
MSE
22.5
21.5
Men200m
20.5
19.5
Year
Analysis of Variance Table
DFE = n-k-1 = 22-2 = 20 MSE = SSE/(n-2) = 1.8/20 = 0.09
MSR = SSR/1 = 15.8
Analysis of Variance
Source DF SS MS F P
Regression 1 15.8 15.8 177.7 0.000
Residual Error 20 1.8 0.09
Total 21 17.6
Analysis of Variance
Source DF SS MS F P
Regression 1 15.796 15.796 177.7 0.000
Residual Error 20 1.778 0.089
Total 21 17.574
2
( 13.33) 177.7 t *
F
( n k 1)
2 *
(1, n k 1)
Equivalence of F-test to t-test
• For a given α level, the F-test of β1 = 0
versus β1 ≠ 0 is algebraically equivalent to
the two-tailed t-test.
• Will get exactly same P-values, so…
– If one test rejects H0, then so will the other.
– If one test does not reject H0, then so will the
other.
Should I use the F-test or the t-test?
• The F-test is only appropriate for testing
that the slope differs from 0 (β1 ≠ 0).
• Use the t-test to test that the slope is
positive (β1 > 0) or negative (β1 < 0).
• F-test is more useful for multiple regression
model when we want to test that more than
one slope parameter is 0. Test if β1 and β2
are jointly significant
Alternative formula for F-test
• Null hypothesis • F-critical
H0: β1 = β2 = 0
k – Column, n-k-1 – Row
• Alternative hypothesis
• When F*>F-critical,
HA: β1 ≠ β2 ≠ 0
Reject H0
is statistically significant
• Test statistic
When F*<F-critical,
Fail to reject H0
is not statistically significant
P-values