Source: xkcd.com/1725
Lecture 31
Least Squares
DATA 8
Fall 2022
Announcements
Regression Roadmap
Linear Regression
Prediction
Goal: Predict y using x
Examples:
Regression Estimate
Goal: Predict y using x
To find the regression estimate of y:
Slope and Intercept (in original units)
estimate of y = slope * x + intercept
Discussion Question
A course has a midterm (average 70; standard deviation 10)�and a really hard final (average 50; standard deviation 12)
If the scatter diagram comparing midterm & final scores for students has an oval shape with correlation 0.75, then...
What do you expect the average final score would be for students who scored 60 on the midterm?
Discussion Question
Suppose we use linear regression to predict candy prices (in dollars) from sugar content (in grams). What are the units of each of the following?
Least Squares
(Demo)
Error in Estimation
(Demo)
Numerical Optimization
(Demo)
Least Squares Line
Non-Linear Regression
(Demo)