In: Statistics and Probability
** Remember, there are examples in your notes at the end of each section**
The data set "cars" in R has 2 variables with 50
observations.
speed: numeric Speed (mph)
dist: numeric Stopping distance (ft)
Fill in the missing boxes below in the R code and then the corresponding predictor table from R.
Assume we want to test if dist a car travels can be determined by speed.
dat.lm = lm( __ ~ __ , data = __ )summary( __ )
Estimate | Std. Error | t | Pr(>|t|) | |
Intercept | 0.0123 | |||
speed | 1.49e-12 |
a) Write the least squares line from the table above in the form
?̂= a + bx but filling the with the estimates of the
coefficients.
?̂= __ + __x
b) Is there evidence to support that dist increases as the speed
increases? Use ?=0.05.
1. ?0 : ?1 = 0 vs. ?? : ?1>
0
2. ? = 0.05
3. t = __
4. Critical t0.05,48 = t0.05,40 = __
5. Conclusion:
Reject H0 OR Fail to reject H0
Interpretation:
There is sufficient evidence to support that dist increases as
speed increases. OR
There is not sufficient evidence to support that dist increases as
speed increases.
c) Find the 90% confidence interval for ?.
confint(dat.lm, 'speed', level = 0.90)
( __ , __ )
d) Find the 95% prediction interval for the mean when speed = 22.
newdat = data.frame( __ = __ )
predict( __ , __ , interval = 'prediction')
fit = __ , lwr = __ , upr = __