4. Centred Model & Anova Derivations
Expectation & Variance of Estimators
Model: y i = β 0 + β 1 x i + ε i
For Slope Parameter
We know:
β ^ 1 = S X Y S X X WTS:
β ^ 1 = ∑ c i y i where c i = x i − x ¯ S X X in unbiased
Lemma:
∑ ( x i − x ¯ ) ( y i − y ¯ ) = ∑ ( x i − x ¯ ) y i − ∑ ( x i − x ¯ ) y ¯ (1) n o t e : ∑ ( x i − x ¯ ) = ∑ x i − n x ¯ = 0 = ∑ ( x i − x ¯ ) y i since y i ∼ normal ⟹ β ^ 1 ∼ normal
E [ β ^ 1 ] = E [ ∑ c i y i ] = ∑ E [ y i ( x i − x ¯ ) S X X ] ( c i constant) = ∑ ( x i − x ¯ S X X ) E [ y i ] = ∑ ( x i − x ¯ S X X ) ( β 0 + β 1 x i ) = β 0 S X X ∑ ( x i − x ¯ ) = 0 by ( 1 ) + β 1 S X X ∑ ( x i − x ¯ ) x i = β 1 S X X ∑ x i 2 − n x ¯ 2 (unbiased) = β 1 V a r [ β ^ 1 ] = V a r [ ∑ c i y i ] = ∑ c i 2 V a r [ y i ] = σ 2 ∑ [ x i − x ¯ S X X ] 2 = σ 2 S X X 2 ∑ ( x i − x ¯ ) 2 = σ 2 S X X β ^ 1 = ∑ x i − x ¯ S x x y i = ∑ c i y i ∼ N ( β , σ 2 S x x ) Thus,
β ^ 1 − β 1 σ S x x ∼ N ( 0 , 1 ) S x x ( β ^ 1 − β 1 ) 2 σ 2 ∼ χ 1 2 General Testing Parameters
Assumptions
F ∗ = ⟨ y , u 2 ⟩ 2 ⟨ y , u 3 ⟩ 2 + ⋯ + ⟨ y , u n ⟩ 2 n − 2 ∼ F ( 1 , n − 2 ) by 16.5
and that s 2 = ∑ ( y i − y ^ i ) 2 n − 2 = S S E n − 2 is unbiased
Centred Model
traditionally y i = β 0 ⋅ ( 1 1 1 ⋮ 1 ) + β 1 x i + ε i take w 1 = ( 1 1 1 ⋮ 1 ) , w 2 = ( x 1 − x ¯ x 2 − x ¯ ⋮ x n − x ¯ ) centred model y i ∗ = β 0 ∗ w 1 + β 1 ∗ w 2 + ε i ∗ note: β 0 ∗ w 1 and β 1 ∗ w 2 + ε i ∗ will be orthogonal
Estimates:
y ^ i = β ^ 0 + β ^ 1 x i ― = ( y ¯ − β ^ 1 x ¯ ) + β ^ 1 x i = y ¯ + β ^ 1 ( x i − x ¯ ) = β ^ 0 ∗ + β ^ 1 ∗ ( x i − x ¯ ) = y ^ i ∗ So they are equivalent models
Centered Model LSE
min β 0 ∗ , β 1 ∗ ⟨ y − y ^ , y − y ^ ⟩ ∂ Q ∂ β 0 ∗ = − 2 ( ∑ y i − n β 0 ∗ − β 1 ∗ ∑ ( x i − x ¯ ) 0 ) = 0 = ∑ y i − n β 0 ∗ = 0 ⟹ β ^ 0 ∗ = y ¯ ∂ Q ∂ β 1 ∗ = − 2 ( ∑ ( x i − x ¯ ) y i − β 0 ∗ ∑ ( x i − x ¯ ) − β 1 ∗ ∑ ( x i − x ¯ ) 2 ) = 0 β ^ 1 ∗ = ∑ ( x i − x ¯ ) y i ∑ ( x i − x ¯ ) 2 Anova Derivation
( y 1 y 2 ⋮ y n ) = β 0 ( 1 1 ⋮ 1 ) + β 1 ( x 1 − x ¯ x 2 − x ¯ ⋮ x n − x ¯ ) + ( ε 1 ε 2 ⋮ ε n ) ( y 1 y 2 ⋮ y n ) = n β 0 ( 1 n 1 n ⋮ 1 n ) u 1 + S x x ⋅ β 1 ( x 1 − x ¯ S x x x 2 − x ¯ S x x ⋮ x n − x ¯ S x x ) u 2 + ( ε 1 ε 2 ⋮ ε n ) to get an orthonormal basis { u 1 , u 2 , … , u n }
y = ⟨ y , u 1 ⟩ u 1 + ⟨ y , u 2 ⟩ u 2 + ⟨ y , u 3 ⟩ u 3 ⋯ + ⟨ y , u n ⟩ u n ― Residual also | | y | | 2 = ∑ i n ⟨ y , u i ⟩ 2 , since orthonormal ⟨ y , u 2 ⟩ = S x x β ^ 1 ⟹ 1 S x x ∑ ( x i − x ¯ ) y i = S x x β ^ 1 ⟹ β ^ 1 = ∑ ( x i − x ¯ ) y i S x x β ^ 1 = 1 S x x ( ∑ ( x i − x ¯ ) y i ) S x x = 1 S x x ⟨ y , u 2 ⟩ ⟹ β ^ 1 2 S x x = ⟨ y , u 2 ⟩ 2 = S S R y = y ¯ ( 1 1 ⋮ 1 ) + β ^ 1 ( x 1 − x ¯ ⋮ x n − x ¯ ) + ε i ⟹ ( y 1 − y ¯ y 2 − y ¯ ⋮ y n − y ¯ ) = β ^ 1 ( x 1 − x ¯ ⋮ x n ) + ε i ⟨ y → − y ¯ , y → − y ¯ ⟩ = ⟨ β 1 ( x − x ¯ ) + ε , β 1 ( x − x ¯ ) + ε ⟩ = ⟨ β 1 ( x − x ¯ ) , β 1 ( x − x ¯ ) ⟩ + 2 ⟨ β 1 ( x − x ¯ ) , ε ⟩ 0 , orthogonal + ⟨ ε , ε ⟩ | | y − y ¯ | | 2 = β ^ 1 2 | | x − x ¯ | | 2 + | | Residual Vector | | 2 y = ⟨ y , u 1 ⟩ u 1 + ⋯ + ⟨ y , u n ⟩ u n | | y − y ^ | | 2 = ⟨ y , u 3 ⟩ 2 + ⋯ + ⟨ y , u n ⟩ 2 = ∑ y − ( u n ) 2 SST = SSR + SSE ⟹ S S T = ∑ ( y i − y ¯ ) 2 = ( n − 1 ) ⋅ Sample Variance of y
S X X = | | x − x ¯ | | 2 = ( n − 1 ) Sample var. of x ⟹ S S E = S S T − S S R = S Y Y − β ^ 1 2 S x x = | | Residual vector | | 2 F-Test Restated
F ∗ = β ^ 1 2 S x x | | Residual Vector | | 2 n − 2 = S S R S S E n − 2 Anova
Source d f S S M S F ∗ Regression 1 S S R = β ^ 1 2 S x x M S R = S S R 1 M S R M S E Error n − 2 S S E = S S T − S S R M S E = S S E n − 2 Total n − 1 S y y = S S T P value of rejection region P [ F ( 1 , n − 2 ) > F ∗ ]
Example
The following data show the brand, price ($), and the overall score for six
stereo headphones that were tested by Consumer Reports. The overall
score is based on sound quality and effectiveness of ambient noise
reduction. Scores range from 0 (lowest) to 100 (highest).
Brand Bose Skullcandy Koss Phillips Denon JVC Price (x) 180 150 95 70 70 35 Score (y) 76 71 61 56 40 26 Need to find x ¯ , y ¯ , S x x , S x y , S y y , ∑ x i y i
x ¯ = 100 , y ¯ = 55 , S x x = 14 , 950 , S y y = 1800 , S x y = 4755 β ^ 1 = S x y S x x = 0.3180 S S R = β ^ 1 2 S x x = 1512.376 S S T = S y y = 1800 S S E = S S T − S S R = 287.264 F ∗ = S S R S S E 4 = 21.0327 P-value = P [ F ( 1 , 4 ) > F ∗ = 21.0327 ]
⟹ 0.01 < p-value<0.025
Rejection region R R = { F such that F > F 0.05 ( 1 , 4 ) = 7.71 }
and F ∗ ∈ R R ⟹ reject H 0 at the 5% significant level.
Hypothesis Testing Summary
Let
(16.4,5) W n − 2 = 1 σ 2 ∑ 3 n ⟨ y , u i ⟩ 2 = 1 σ 2 | | y − y ^ | | 2 ∼ χ n − 2 2 ⟹ 1 σ 2 E [ ∑ [ y i − y ^ ] 2 ] = n − 2 ⟹ E [ ∑ [ y i − y ^ ] 2 n − 2 ] = σ 2 Therefore S S E n − 2 is unbiased for σ 2
(1) W n − 2 = n − 2 σ 2 S S E n − 2 = n − 2 σ 2 s 2 by the var and expectation of Beta1
S x x ( β ^ 1 − β 1 ) σ ∼ N ( 0 , 1 ) ⟹ S x x ( β ^ 1 − β 1 ) σ ( n − 2 ) s 2 ( n − 2 ) σ 2 = S x x ( β ^ 1 − β 1 ) s ∼ t n − 2 note ( t d f ) 2 ∼ F d f
⟹ t ∗ = β ^ 1 s s x x Types of Tests
For two-sided alternatives H 0 : β 1 = 0 , H a : β 1 ≠ 0
F ∗ = β ^ 1 2 S x x S S E n − 2 = t ∗ 2 For H 0 : β 1 = β 10 , H a : β 1 ≠ β 10 , β 1 > β 10 , β 1 < β 10
t ∗ = S x x ( β ^ 1 − β 10 ) s