+ - 0:00:00
Notes for current slide
Notes for next slide

Simple Linear Regression

Introduction

Prof. Maria Tackett

1

Topics

  • Use simple linear regression to describe the relationship between a quantitative predictor and quantitative response variable.
3

Topics

  • Use simple linear regression to describe the relationship between a quantitative predictor and quantitative response variable.

  • Estimate the slope and intercept of the regression line using the least squares method.

3

Topics

  • Use simple linear regression to describe the relationship between a quantitative predictor and quantitative response variable.

  • Estimate the slope and intercept of the regression line using the least squares method.

  • Interpret the slope and intercept of the regression line.

3

Movie ratings data

The data set contains the "Tomatometer" score (critics) and audience score (audience) for 146 movies rated on rottentomatoes.com.

4

Movie ratings data

We want to fit a line to describe the relationship between the critics score and audience score.

5

Terminology

The response, Y, is the variable describing the outcome of interest.


The predictor, X, is the variable we use to help understand the variability in the response.

6

Regression model

A regression model is a function that describes the relationship between the response, Y, and the predictor, X.

Y=Model+Error=f(X)+ϵ=μY|X+ϵ

7

Y=Model+Error=f(X)+ϵ=μY|X+ϵ

8

Y=Model+Error=f(X)+ϵ=μY|X+ϵ

9

Simple linear regression

When we have a quantitative response, Y, and a single quantitative predictor, X, we can use a simple linear regression model to describe the relationship between Y and X.

Y=β0+β1X+ϵ

β1:Slopeβ0:Intercept

10

ˆY=ˆβ0+ˆβ1X

11

ˆY=ˆβ0+ˆβ1X

12

How do we choose values for ˆβ1 and ˆβ0?

13

Residuals

residual=observedpredicted=yˆy

14

Least squares line

15

Least squares line

  • The residual for the ith observation is

ei=observedpredicted=yiˆyi

15

Least squares line

  • The residual for the ith observation is

ei=observedpredicted=yiˆyi

  • The sum of squared residuals is

e21+e22++e2n

15

Least squares line

  • The residual for the ith observation is

ei=observedpredicted=yiˆyi

  • The sum of squared residuals is

e21+e22++e2n

  • The least squares line is the one that minimizes the sum of squared residuals
15

Estimating the slope

ˆβ1=rsYsX

16

Estimating the slope

ˆβ1=rsYsX

sX=30.169sY=20.024r=0.781

16

Estimating the slope

ˆβ1=rsYsX

sX=30.169sY=20.024r=0.781

ˆβ1=0.781×20.02430.169=0.518

16

Estimating the intercept

ˆβ0=ˉYˆβ1ˉX

17

Estimating the intercept

ˆβ0=ˉYˆβ1ˉX

ˉx=60.850ˉy=63.877ˆβ1=0.518

17

Estimating the intercept

ˆβ0=ˉYˆβ1ˉX

ˉx=60.850ˉy=63.877ˆβ1=0.518

ˆβ0=63.8770.518×60.850=32.296

17

Interpreting slope & intercept

^audience=32.296+0.518×critics


18

Interpreting slope & intercept

^audience=32.296+0.518×critics


Slope: For every one point increase in the critics score, we expect the audience score to increase by 0.518 points, on average.

18

Interpreting slope & intercept

^audience=32.296+0.518×critics


Slope: For every one point increase in the critics score, we expect the audience score to increase by 0.518 points, on average.

Intercept: If the critics score is 0 points, we expect the audience score to be 32.296 points.

18

Does it make sense to interpret the intercept?

19

Does it make sense to interpret the intercept?

Interpret the intercept if

  • the predictor can feasibly take values equal to or near zero.
  • there are values near zero in the data.
19

Does it make sense to interpret the intercept?

Interpret the intercept if

  • the predictor can feasibly take values equal to or near zero.
  • there are values near zero in the data.


🛑 Otherwise, don't interpret the intercept!

19

Recap

20

Recap

  • Used simple linear regression to describe the relationship between a quantitative predictor and quantitative response variable.
20

Recap

  • Used simple linear regression to describe the relationship between a quantitative predictor and quantitative response variable.

  • Used the least squares method to estimate the slope and intercept.

20

Recap

  • Used simple linear regression to describe the relationship between a quantitative predictor and quantitative response variable.

  • Used the least squares method to estimate the slope and intercept.

  • We interpreted the slope and intercept.
    • Slope: For every one unit increase in x, we expect y to change by ˆβ1 units, on average.
    • Intercept: If x is 0, then we expect y to be ˆβ0 units.
20
Paused

Help

Keyboard shortcuts

, , Pg Up, k Go to previous slide
, , Pg Dn, Space, j Go to next slide
Home Go to first slide
End Go to last slide
Number + Return Go to specific slide
b / m / f Toggle blackout / mirrored / fullscreen mode
c Clone slideshow
p Toggle presenter mode
t Restart the presentation timer
?, h Toggle this help
Esc Back to slideshow