In: Statistics and Probability
As part of a research program for a new cholesterol drug, a pharmaceutical company would like to investigate the relationship between the ages and LDL (low-density lipoprotein) cholesterol of men. The accompanying data set shows the ages and LDL cholesterol levels of seven randomly selected men. Construct a 95% prediction interval to estimate the LDL cholesterol level of a 25 year old man.
Age | 24 38 26 32 43 30 41
Cholesterol | 141 175 155 197 158 144 207
Determine the upper and lower limits of the prediction interval.
Age = c(24 ,38,26,32,43,30,41)
> Cholestrol = c(141,175,155,197,158,144,207)
model = lm (Cholestrol~ Age)
> summary (model)
Call:
lm(formula = Cholestrol ~ Age)
Residuals:
1
2
3
4
5
6 7
-9.2023 -1.8413 0.9922 31.5754 -28.3553 -17.6190
24.4503
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 104.535 44.591
2.344 0.066 .
Age
1.903 1.307
1.456 0.205
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 23.66 on 5 degrees of freedom
Multiple R-squared: 0.2978, Adjusted R-squared:
0.1573
F-statistic: 2.12 on 1 and 5 DF, p-value: 0.2052
predict(model , data.frame(Age=25),interval="prediction")
fit
lwr upr
1 152.1051 81.19513 223.015
the upper and lower limits of the prediction interval. = (223.015 and 81.19513)