Confidence interval: Confidence interval can be used for both estimation and hypothesis testing. The two 1001 % confidence intervals for 0 and 1 are b0 t n2,1 / 2 s.e.(b0 ) [b0 t n2,1 / 2 s.e.(b0 ), b0 t n2,1 / 2 s.e.(b0 )] and , b1 t n2,1 / 2 s.e.(b1 ) [b1 t n2,1 / 2 s.e.(b1 ), b1 t n2,1 / 2 s.e.(b1 )] , where P(| Tn2 | t n2,1 / 2 ) . To test H 0 : 0 c and H 0 : 1 c , we only need to examine if c falls into the above two confidence intervals. The interrelation between testing hypothesis and confidence interval can be explained in the following simple case. Let X 1 , X 2 ,, X n ~ N (u,1) . Suppose we want to test H 0 : u c , then we reject H 0 as random variable and n ( X c) z / 2 , where Z is the standard normal P( Z z / 2 ) 2 . Therefore, according the above rule, we do not reject H 0 as n ( X c ) z / 2 n ( c X ) z / 2 X z / 2 n c X That is we do not reject H 0 as c falls into the interval [ X matter of fact, [ X [X z / 2 n ,X z / 2 n z / 2 n ,X z / 2 n z / 2 n z / 2 ,X n z / 2 n . ] . As a ] is a 100(1 )% confidence interval for c. ] Example Yi 0 1 X i i , i 1,2,,20. Use F-test, T-test, and confidence interval to test H 0 : 1 0 given level of significance equal to 0.05 and 20 X i 1 i 20 20 20 20 i 1 i 1 i 1 i 1 1330, Yi 1862.8, X i2 90662, Yi 2 173554.26, X i Yi 124206.9. 1 [solution] 1. (a) F-test: 20 20 i 1 i 1 20 X i Yi i 1 20 S XY X i Yi 124206.9 1330 * 1862.8 330.7. 20 2 20 Xi 20 1330 2 S XX X i2 i 1 90662 2217. 20 20 i 1 20 20 20 2 S 330.7 b1 XY 0.149, Yˆi Y b12 S XX 49.22, (Yi Y ) 2 Yi 2 S XX 2217 i 1 i 1 i 1 2 20 Yi 2 20 i 1 173554.26 (1862.8) 53.068 (Y Yˆ ) 2 53.068 49.22 3.848. i i 20 20 i 1 Then, we have the following ANOVA table Source SS( b1 | b0 ) residual Total(corrected) As H 0 is true, F df SS MS 1 18 19 49.22 3.848 53.068 49.22 0.214 49.22 230 f1,18,0.05 4.41 , where P( F1,18 f1,18, 0.05 ) 0.05 . 0.214 reject H 0 (b) T-test: S 1XX/ 2 b1 t s 2217 * 0.149 0.214 15.16 t18,0.975 2.10 reject H 0 . 2. 95% confidence interval: The 95% confidence interval for 1 is b1 t18, 0.975 s S 1/ 2 XX 0.149 (2.101 * 0.214 2217 ) 0.149 0.021 0.128,0.179 . Since 0 does not fall into the above interval, we reject H 0 . 2 Example: Suppose the model is yi 0 1 xi i , i 1, ,10, i ~ N 0, 2 , and 10 x i 1 10 10 i 1 i 1 320, yi 462, xi2 11550, i 10 y i 1 2 i 10 21710, xi yi 15390 i 1 (a) Find the least square estimate and the fitted regression equation (b) Provide an ANOVA table and use F statistic to test H 0 : 1 0 at 0.05 . (c) Find the 95% confidence interval for 1 .and use the confidence interval to test H 0 : 1 0 . (d) Find the ANOVA table for the hypothesis H 0 : 0 1 0 and use F statistic to test H 0 : 0 1 0 at 0.01. [solution:] (a) 2 320 X 10 X 11550 10 1310 10 i 1 10 320 462 X iYi 10 XY 15390 10 606 10 10 i 1 10 S XX S XY 2 i 2 Then, the least square estimate is b1 S XY 606 462 320 0.4626, b0 Y b1 X 0.4626 31.3968 S XX 1310 10 10 The fitted regression equation is Yˆ 31.3968 0.4626 X . (b) Since 3 2 462 SYY Yi 10 Y 21710 10 365.6 10 i 1 SS (b1 | b0 ) b1 S XY 0.4626 606 280.3356 10 2 2 SS ( residual ) SYY SS b1 | b0 365.6 280.3356 85.2644 The ANOVA table is Source df SS MS F Regression 1 280.3356 SS (b1 | b0 ) 1 280.3356 Residual (Error) n-2=8 85.26444 SS (residual ) 10.6581 8 Total (corrected) 9 365.6 F 280.3356 10.6581 26.3026 Since F 26.3026 5.3177 f1,8, 0.05 , we reject H 0 : 1 0 . (c) The 95% confidence interval for 1 is s2 b1 t n2, 2 S XX 1 10.6581 0.4626 t8,0.025 1310 2 1 2 0.2546,0.6706 . Since 0 0.2546,0.6706, we reject H 0 : 1 0 . (d) Since 10 10 10 i 1 i 1 i 1 Yˆi 2 Yi 2 Yi Yˆi 2 21710 85.2644 21624.74 , the ANOVA table for H 0 : 0 1 0 is Source df SS MS Regression 2 21624.74 21624.74 10812.37 2 Residual (Error) n-2=8 85.26444 SS (residual ) 10.6581 8 Total 10 21710 F F Since F 1014.474 8.65 f 2,8, 0.01 , we reject H 0 : 0 1 0 . 4 10812.37 10.6581 1014.474