A confidence interval is a range around an estimate that expresses uncertainty about the actual value. In NBA regression, it surrounds predicted regular-season wins. section 5.7.7
Use confidence intervals to:
- Report a fitted value together with lower and upper bounds, rather than treating the prediction as exact. section 5.7.7
- Display uncertainty visually around a regression line or predicted values. section 14.4.1 section 5.7.7
- Compare groups with notched boxplots, where the notch displays a confidence interval around the median. section 14.5.1
Predicting NBA wins
A fitted model predicts 44.04 wins for one test observation, with a 95% confidence interval from 37.34 to 50.74 wins. Combining these results with actual wins allows analysts to calculate prediction differences, summarize their average magnitude, and plot actual wins against predictions with shaded intervals. section 5.7.7
fit2_pred <- predict(fit2, data.frame(test), interval = "confidence") print(fit2_pred) ## fit lwr upr ## 1 44.03632 37.33518 50.73746 ## 2 32.32559 27.22836 37.42282 ## 3 36.66966 31.99864 41.34067 ## 4 33.97327 29.54744 38.39910 ## 5 34.30091 28.39030 40.21152 ## 6 43.32909 35.93216 50.72603 ## 7 41.24102 35.64396 46.83807 ## 8 44.46051 40.78216 48.13886 ## 9 38.46246 34.58980 42.33511 ## 10 41.12360 36.88138 45.36582 ## 11 44.69284 40.73769 48.64799 ## 12 37.34022 33.95924 40.72119 ## 13 45.32616 39.41971 51.23261 ## 14 50.02897 43.31042 56.74753 ## 15 37.18162 33.31884 41.04439 ## 16 42.25199 35.84835 48.65562 ## 17 33.46908 27.89836 39.03979 ## 18 34.15238 26.87326 41.43151 ## 19 41.70479 36.39175 47.01783 ## 20 34.30830 28.03565 40.58094 ## 21 33.20151 27.19351 39.20951 ## 22 43.30823 36.75603 49.86043 ## 23 36.77234 29.78770 43.75698
Inspect the R output showing predicted wins in fit and the interval endpoints in lwr and upr. section 5.7.7









