If you're seeing this message, it means we're having trouble loading external resources for Khan Academy.
If you're behind a web filter, please make sure that the domains
*.kastatic.org and *.kasandbox.org are unblocked.
Linear regression and correlation
Even when there might be a rough linear relationship between two variables, the data in the real-world is never as clean as you want it to be. This tutorial helps you think about how you can best fit a line to the relationship between two variables.
Understanding why correlation does not imply causality (even though many in the press and some researchers often imply otherwise)
Given a random assortment of points, draw a line of best fit through them.
Given a scatter plot, can you estimate the slope of the line of best fit that goes through the data points?
Introduction to the idea that one can find a line that minimizes the squared distances to the points
Proof (Part 1) Minimizing Squared Error to Regression Line
Proof Part 2 Minimizing Squared Error to Line
Proof (Part 3) Minimizing Squared Error to Regression Line
Proof (Part 4) Minimizing Squared Error to Regression Line
Regression Line Example
Second Regression Example
R-Squared or Coefficient of Determination
Sal explains the intuition behind correlation coefficients and does a problem where he matches correlation coefficients to scatter plots.
Match correlation coefficients to scatterplots to build a deeper intuition behind correlation coefficients.
Calculating R-Squared to see how well a regression line fits data
Covariance, Variance and the Slope of the Regression Line