Week 8 — Regression (Oct. 11–15)

In this week, we are learning about linear regression with StatsModels. All the examples will use the StatsModels OLS (ordinary least squares) model, generally with the formula interface.

🧐 Content Overview

Element Length

🎥 Introducing Regression


🎥 Modeling


🎥 Single Regression


🎥 Prediction and Inference


🎥 Categorical Predictors


🎥 Testing Assumptions


📃 Regression Model Assumptions

964 words

🎥 Multiple Regression


🎥 Prediction Accuracy


🎥 Instances and Sampling


📃 Bootstrapping for Linear Regression

1950 words

This week has 1h23m of video and 2914 words of assigned readings. This week’s videos are available in a Panopto folder and as a podcast.

📅 Deadlines

  • Week 8 Quiz Thursday Oct. 14 at 8AM

🎥 Introducing Regression

🎥 Statistical Modeling

🎥 Single Regression

In this video, I introduce single-variable regression.

Slide Clarification

On slide 6, where I show the slope, intercept, and variance in a model, I have extended the plot to include 0 at the left end of the x-axis. This is to highlight the meaning of the intercept. It is important to note that the intercept is where the line crosses zero, not where it crosses the left Y-axis.

Also, when discussing this slide, I am imprecise but make it sound like the unexplained variance is the remainder after projecting the data onto the line. It is the variance remaining after subtracting the line. A video in Week 9 provides more clarity on this relationship.

🎥 Prediction and Inference

🎥 Categorical Predictors

🎥 Testing Assumptions

📃 Regression Model Assumptions

Read Regression Model Assumptions from JMP.

🎥 Multiple Regression

🎥 Measuring Prediction Accuracy

🎥 Instances and Sampling

📓 Supporting Notebooks

🚩 Week 8 Quiz

Complete the Week 8 quiz in Canvas.

📃 StatsModels Examples and User Guide

The following StatsModels pages document its OLS model:

📃 Bootstrapping Linear Regression

Read Bootstrapping for Linear Regression.

📩 Assignment 4

Assignment 4 is due October 24, 2020.