Fitting a line to points. Linear regression. R-squared.

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.
10:45
Correlation and causality
Understanding why correlation does not imply causality (even though many in the press and some researchers often imply otherwise)
7:48
Fitting a line to data
Sal creates a scatter plot and then fits a line to data on the median California family income.
1:17
Estimating the line of best fit exercise
Sal solves a problem where he has to estimate the line of best fit for a scatter plot.
Exercise
Eyeballing the line of best fit
Given a random assortment of points, draw a line of best fit through them.
Exercise
Estimating slope of line of best fit
Given a scatter plot, can you estimate the slope of the line of best fit that goes through the data points?
6:47
Squared error of regression line
Introduction to the idea that one can find a line that minimizes the squared distances to the points
10:35
Proof (part 1) minimizing squared error to regression line
Proof (Part 1) Minimizing Squared Error to Regression Line
9:54
Proof (part 2) minimizing squared error to regression line
Proof Part 2 Minimizing Squared Error to Line
10:54
Proof (part 3) minimizing squared error to regression line
Proof (Part 3) Minimizing Squared Error to Regression Line
4:18
Proof (part 4) minimizing squared error to regression line
Proof (Part 4) Minimizing Squared Error to Regression Line
9:27
Regression line example
Regression Line Example
9:15
Second regression example
Second Regression Example
12:41
R-squared or coefficient of determination
R-Squared or Coefficient of Determination
7:21
Example: Correlation coefficient intuition
Sal explains the intuition behind correlation coefficients and does a problem where he matches correlation coefficients to scatter plots.
Exercise
Correlation coefficient intuition
Match correlation coefficients to scatterplots to build a deeper intuition behind correlation coefficients.
9:45
Calculating R-squared
Calculating R-Squared to see how well a regression line fits data
15:08
Covariance and the regression line
Covariance, Variance and the Slope of the Regression Line