# Probability and Statistics for Engineering and the Sciences (with CD-ROM and InfoTrac )

• Notes
• PresidentHackerCaribou10582
• 1

This preview shows page 1 out of 1 page.

Stat 312: Lecture 19 Inference on Slope Moo K. Chung [email protected] April 3, 2003 Concepts 1. Given a model Y j = β 0 + β 1 x j + j , we wish to test if H 0 : β 1 = 0 . Assume that N (0 , σ 2 ) . The least squares estimator of β 1 is ˆ β 1 = S xy S xx = n j =1 c j Y j , where c j = ( x j - ¯ x ) /S xx . 2. From n j =1 c j = 0 , n j =1 c j x j = 1 and n j =1 c 2 j = S - 1 xx we can show that ˆ β 1 N ( β 1 , σ 2 /S xx ) . 3. Inference on the slope parameter β 1 is based on T = ˆ β 1 - β 1 S ˆ β 1 t n - 2 , where S ˆ β 1 = ˆ σ/ S xx = q SSE ( n - 2) S xx . From Lec- ture 18 formula, SSE = S yy - S 2 xy /S xx , we get S ˆ β 1 = 1 n - 2 q S yy S xx - ( S xy S xx ) 2 . There is a reason S ˆ β 1 is written in this way (see example 1). We reject H 0 if | t | > t α/ 2 ,n - 2 at 100(1 - α ) sig- nificance. In-class problems Example 1. 10 students took tow midterm exams. > x<-c(80, 75, 60, 90, 99, 60, 55, 85, 65, 70) > y<-c(70, 60, 70, 72, 95, 66, 60, 80, 70, 60) > 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.23 0.056 x 0.55 0.18 3.14 0.014 The P -value here is based on two-sided test. Let’s see if we are getting the same P -value using Concept 3. Under H 0 , β 1 = 0 . So t = ˆ β 1 /S ˆ β 1 . ˆ β 1 = 0 . 55 . In R, we first compute S yy S xx - ( S xy S xx ) 2 : >cov(y,y)/cov(x,x)-