
William W. answered 12/09/22
Math and science made easy - learn from a retired engineer
Residuals are calculated by taking the actual value minus the predicted value.
For the point (6, 14320) the "actual value" is 14320 (as in $14.320). The predicted value is found by plugging in x = 6 into the line y = 1899.66x + 852.81:
1899.66(6) + 852.81 = 12250.77
So the residual is 14320 - 12250.77 = 2069.23
For the point (6, 7900) the actual is 7900 but the predicted (as found above) is 12250.77 so residual is 7900 - 12250.77 = -4350.77
For the point (6, 13998), the actual is 13998 and the predicted is 12250.77 so the residual is 13998 - 12250.77 = 1747.23
You can think about the "predicted value" as the average a person would expect to pay if they stayed in the hospital for "x" days. So if your cost for staying those number of days was more, you are above the average (or expected). If your cost was less, then you are below the average (or expected).