> lactgpa = lm(GPA ~ ACT, data = actgpa) > summary(lactgpa) Call: lm(formula = GPA ~ ACT, data = actgpa) Residuals: Min 1Q Median 3Q Max -0.78010 -0.22341 0.05116 0.17520 0.51488 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 1.11263 0.34120 3.261 0.00331 ** ACT 0.08702 0.01290 6.747 5.6e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.2918 on 24 degrees of freedom Multiple R-Squared: 0.6548, Adjusted R-squared: 0.6404 F-statistic: 45.52 on 1 and 24 DF, p-value: 5.6e-07 > actscores = data.frame(ACT = c(19:33)) > predict(lactgpa, newdata = actscores, interval = "confidence") fit lwr upr 1 2.766097 2.543730 2.988464 2 2.853121 2.652810 3.053433 3 2.940146 2.760647 3.119644 4 3.027170 2.866757 3.187583 5 3.114194 2.970451 3.257937 6 3.201219 3.070799 3.331639 7 3.288243 3.166694 3.409792 8 3.375267 3.257130 3.493405 9 3.462292 3.341643 3.582941 10 3.549316 3.420579 3.678053 11 3.636340 3.494891 3.777790 12 3.723365 3.565694 3.881035 13 3.810389 3.633954 3.986824 14 3.897413 3.700395 4.094432 15 3.984438 3.765530 4.203346 > predict(lactgpa, newdata = actscores, interval = "prediction") fit lwr upr 1 2.766097 2.124064 3.408129 2 2.853121 2.218390 3.487852 3 2.940146 2.311673 3.568619 4 3.027170 2.403880 3.650460 5 3.114194 2.494985 3.733404 6 3.201219 2.584966 3.817472 7 3.288243 2.673806 3.902680 8 3.375267 2.761496 3.989038 9 3.462292 2.848032 4.076551 10 3.549316 2.933417 4.165215 11 3.636340 3.017659 4.255022 12 3.723365 3.100775 4.345955 13 3.810389 3.182784 4.437994 14 3.897413 3.263714 4.531113 15 3.984438 3.343595 4.625280