Unit content
Simple linear regression
When two quantitative variables show an approximately linear association, simple linear regression describes the average relationship with a straight line.
For predictor $X$ and response $Y$, the fitted line is
$$\hat y=b_0+b_1x,$$
where $b_0$ is the intercept and $b_1$ the slope.
Residuals
For observation $(x_i,y_i)$, the fitted value is
$$\hat y_i=b_0+b_1x_i,$$
and the residual is
$$e_i=y_i-\hat y_i.$$
A positive residual means the observed response lies above the fitted line; a negative residual means it lies below.
Least squares
The ordinary least-squares line chooses $b_0$ and $b_1$ to minimize
$$\sum_{i=1}^n e_i^2.$$
Squaring prevents positive and negative residuals from cancelling and gives a unique criterion for the best-fitting line under ordinary conditions.
Interpreting the coefficients
The slope $b_1$ is the predicted change in $Y$ associated with a one-unit increase in $X$. The intercept $b_0$ is the predicted response at $x=0$, but that interpretation may be meaningless if zero lies far outside the observed predictor range.
Correlation and slope
For data with nonzero sample standard deviations,
$$b_1=r\frac{s_y}{s_x}.$$
Correlation is dimensionless, while regression slope carries units of response per unit predictor.
Checking the model
Residual plots can reveal curvature, changing spread or unusual observations that a straight-line model misses.
Predictions far outside the observed range are extrapolations and can be unreliable even when the fitted line describes the observed data well.
Regression quantifies predictive association. A fitted slope does not by itself imply that changing $X$ would causally change $Y$.