In: Statistics and Probability
The following sample observations were randomly selected. (Do not round the intermediate values. Negative amount should be indicated by a minus sign. Round your answers to 3 decimal places.)
X: 4 4 3 6 10
Y: 5 2 6 7 7
Determine the 0.95 confidence interval for the mean predicted when x = 5.
Determine the 0.95 prediction interval for an individual predicted when x = 5.
code in R
x <- c(4,4,3,6,10)
y <- c(5,2,6,7,7)
model = lm (y ~ x)
summary(model)
#a
predict(model,data.frame(x=5),interval = "confidence")
#b
predict(model,data.frame(x=5),interval = "prediction")
95% confidence interval for mean at x = 5 is (2.3097,8.1775)
95% prediction interval for individual predicted when x= 5 is (-1.8676,12.3548)
Please rate