# Linear regression and correlation

14 videos

3 skills

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.

### Correlation and causality

VIDEO
10:45 minutes

Understanding why correlation does not imply causality (even though many in the press and some researchers often imply otherwise)

### Fitting a line to data

VIDEO
7:48 minutes

Sal creates a scatter plot and then fits a line to data on the median California family income.

### Estimating the line of best fit exercise

VIDEO
1:17 minutes

Sal solves a problem where he has to estimate the line of best fit for a scatter plot.

### Eyeballing the line of best fit

PRACTICE PROBLEMS

Given a random assortment of points, draw a line of best fit through them.

### Estimating slope of line of best fit

PRACTICE PROBLEMS

Given a scatter plot, can you estimate the slope of the line of best fit that goes through the data points?

### Squared error of regression line

VIDEO
6:47 minutes

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

VIDEO
10:35 minutes

Proof (Part 1) Minimizing Squared Error to Regression Line

### Proof (part 2) minimizing squared error to regression line

VIDEO
9:54 minutes

Proof Part 2 Minimizing Squared Error to Line

### Proof (part 3) minimizing squared error to regression line

VIDEO
10:54 minutes

Proof (Part 3) Minimizing Squared Error to Regression Line

### Proof (part 4) minimizing squared error to regression line

VIDEO
4:18 minutes

Proof (Part 4) Minimizing Squared Error to Regression Line

### R-squared or coefficient of determination

VIDEO
12:41 minutes

R-Squared or Coefficient of Determination

### Example: Correlation coefficient intuition

VIDEO
7:21 minutes

Sal explains the intuition behind correlation coefficients and does a problem where he matches correlation coefficients to scatter plots.

### Correlation coefficient intuition

PRACTICE PROBLEMS

Match correlation coefficients to scatterplots to build a deeper intuition behind correlation coefficients.

### Calculating R-squared

VIDEO
9:45 minutes

Calculating R-Squared to see how well a regression line fits data

### Covariance and the regression line

VIDEO
15:08 minutes

Covariance, Variance and the Slope of the Regression Line