The method of ordinary least squares chooses the line minimizing squared residuals:
\[\operatorname*{min}_{b_0,b_1}\; \sum_{i=1}^{n}(y_i-b_0-b_1x_i)^2\]
For a fitted observation, its residual is:
\[e_i = y_i - \widehat{y}_i\] In other words, the residual \(e_i\) is the difference between the observed data point \(y_i\) and the predicted data point \(\widehat{y}_i\).
For the mtcars dataset, the fitted model is:
\[\widehat{\mathrm{MPG}} = 37.29 - 5.34 \times \mathrm{weight}\]
The slope suggests that an extra 1,000 lbs is associated with approximately 5.34 fewer MPG in this sample.