# Regression

Contents

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

## Scatter plots

2:26

Scatter plots: studying, shoe size, and test scores

Sal answers a question about scatter plots that show the relationship between study time, shoe size, and test score.

2:35

Scatter plot: smokers

Sal chooses the scatter plot that shows that smoking rate drops by 0.5 point each year.

Exercise

Describing trends in scatter plots

Practice making sense of trends in scatter plots. That is, explain what trends mean in terms of real-world quantities.

2:32

Constructing a scatter plot

Sal shows how to construct a scatter plot.

Exercise

Constructing scatter plots

Practice plotting points to construct a scatter plot.

4:05

Comparing models to fit data example

Sal determines if a quadratic or exponential model fits the data better, then uses the model to make a prediction.

Exercise

Fitting quadratic and exponential functions to scatter plots

Determines if a quadratic or exponential model fits a data set better, then use the model to make a prediction.

## 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