{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

PDB_Stat_100_Lecture_25_Printable

# PDB_Stat_100_Lecture_25_Printable - STA 100 Lecture 25 Paul...

This preview shows pages 1–8. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: STA 100 Lecture 25 Paul Baines Department of Statistics University of California, Davis March 7th, 2011 Admin for the Day I Final project due Friday, 3pm I Office Hours – project questions please! I Office hours Monday – 9.30-11.30am, 3.00-4.30pm I Office hours Tuesday – 11.00-12.00pm References for Today: Rosner, Ch 11 (7th Ed.) References for Wednesday: Rosner, Ch 11 (7th Ed.) Testing Regression Parameters We assumed that the the response was a linear function of the explanatory variable. Did we need the intercept? Did we need the slope? Would a simpler model have been ok? We need to be able to test whether the regression parameters are necessary i.e., is β = 0? Testing Model Parameters Recall that our linear model is: Y i = α + β X i + i , i iid ∼ N ( ,σ 2 ) . Two simpler models would be: Y i = β X i + i , i iid ∼ N ( ,σ 2 ) , [ α = ] (1) Y i = α + i , i iid ∼ N ( ,σ 2 ) , [ β = ] (2) We can test the hypothesis that α = 0 or the hypothesis that β = 0, and see if a simpler model would suffice. Testing the Slope 1. H : β = 0 vs . H 1 : β 6 = 0 2. Test statistic: t = ˆ β SE ( ˆ β ) = ˆ β ˆ σ/ √ s xx where s xx = ∑ n i =1 ( x i- ¯ x ) 2 . 3. Reference distribution: under H , the test statistic t follows a t- distribution with n- 2 degrees of freedom. 4. The p- value as usual is p = P ( | t n- 2 | > t ) 5. Decide to reject or not depending on the value of p 6. Interpret the meaning for your example Testing the Slope: Brain-Body Example 1. H : β = 0 , vs . H 1 : β 6 = 0 2. Test statisic: t = ˆ β SE ( ˆ β ) = . 43580 . 08751 = 4 . 980 . The estimate, standard error and test statistic are given in columns 1, 2 and 3 of the R output. 3. Reference distribution: under H , the test statistic t follows a t- distribution with 25 degrees of freedom. 4. The p- value is p = P ( | t n- 2 | > t ) = 0 . 0000392. The p- value is listed in column 4 of the R output . 5. Reject H since p < α = 0 . 05. 6. The log-brain and log-body weights of animals appear to have a linear relationship (log-body weight is a statistically significant explanatory variable). Doing Linear Regression For the brain-body weight example we get: > RegModel.2 <- lm(log(brain)~log(body), data=animals) > summary(RegModel.2) [snipped] Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 2.99064 0.47051 6.356 1.18e-06 *** log(body) 0.43580 0.08751 4.980 3.93e-05 ***--- Signif. codes: 0 ’***’ 0.001 ’**’ 0.01 ’*’ 0.05 ’.’ 0.1 ’ ’ 1 [snipped] I The asterisks in the last column make it easy to see whether or not each variable is necessary or not. I No asterisk (or dot) means that you can probably do without that variable (not much evidence it is not equal to zero)....
View Full Document

{[ snackBarMessage ]}

### Page1 / 45

PDB_Stat_100_Lecture_25_Printable - STA 100 Lecture 25 Paul...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online