Statistics / Testing and modelling
Correlation and Linear Regression
Fit the best straight line to a cloud of points, measure how well it fits, and resist reading causation into it.
Contents 2 sections
By the end you can
- Compute and interpret the correlation coefficient
- Find the least-squares line
- Interpret and residuals
Helps to know: Describing Data
§1The least-squares line
The line minimises the sum of squared vertical distances to the points and always passes through . is the fraction of the variation in that the line explains. See least squares for the linear algebra behind it.
Check yourself
- Q1If , what fraction of the variation in does the line explain?