introduction to linear regression. wake forest men’s bball heightweightheightweight...

10
Introduction to Linear Regression

Upload: katherine-harper

Post on 05-Jan-2016

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Introduction to Linear Regression. Wake Forest Men’s BBall HeightWeightHeightWeight 74”17579”205 74”19584”235 78”20084”230 73”18577”210 79”20572”170 80”25072”175

Introduction to Linear Regression

Page 2: Introduction to Linear Regression. Wake Forest Men’s BBall HeightWeightHeightWeight 74”17579”205 74”19584”235 78”20084”230 73”18577”210 79”20572”170 80”25072”175

Wake Forest Men’s BBall Height Weight Height Weight

74” 175 79” 205

74” 195 84” 235

78” 200 84” 230

73” 185 77” 210

79” 205 72” 170

80” 250 72” 175

80” 215 78” 195

77” 235

Height (in inches)

Wei

ght

(in p

ound

s)

Page 3: Introduction to Linear Regression. Wake Forest Men’s BBall HeightWeightHeightWeight 74”17579”205 74”19584”235 78”20084”230 73”18577”210 79”20572”170 80”25072”175

Correlation vs. Causation

• What type of correlation is there between height and weight?

• Does that mean causation?

• Turn Diagnostics On and Find the Linear Regression for

the data. Pearson’s Correlation Coefficient:

“r- value”

-1 0 +1

Strong negative No Strong Positive

Correlation Correlation Correlation

Page 4: Introduction to Linear Regression. Wake Forest Men’s BBall HeightWeightHeightWeight 74”17579”205 74”19584”235 78”20084”230 73”18577”210 79”20572”170 80”25072”175

Graph and Residuals Residual – The distance from the data points to the line.

Which points have positive residual?

Which points have negative residual?

To find the “Least Squares Regression” statisticians try to minimize the distance between the residuals and the line of best fit. (Tomorrow’s activity)

Page 5: Introduction to Linear Regression. Wake Forest Men’s BBall HeightWeightHeightWeight 74”17579”205 74”19584”235 78”20084”230 73”18577”210 79”20572”170 80”25072”175

Interpolation vs. Extrapolation

• If another basketball player joined the team and he was 69 inches tall, how much would he weigh according to the linear regression line? – Approximately 163 pounds

• This is EXTRAPOLATION because we are using a value

outside of the data’s range.

May or may not be a good

prediction.

Page 6: Introduction to Linear Regression. Wake Forest Men’s BBall HeightWeightHeightWeight 74”17579”205 74”19584”235 78”20084”230 73”18577”210 79”20572”170 80”25072”175

Interpolation vs. Extrapolation

• What if a player weighed 225 pounds, how tall would he be?Then according to the

data he would be around 81 inches tall.This is INTERPOLATION, becausethe value is within the ranges of the data.

The answer would be more likely to be correct for a prediction.

Page 7: Introduction to Linear Regression. Wake Forest Men’s BBall HeightWeightHeightWeight 74”17579”205 74”19584”235 78”20084”230 73”18577”210 79”20572”170 80”25072”175

NFL Avg Points per Game and Yards/Completion

Team Points

per Game

Yards

per Completion

New England Patriots

32.4 11.62

Atlanta Falcons 25.9 9.88

Pittsburgh Steelers 23.4 12.8

Green Bay Packers 24.3 11.72

Chicago Bears 20.9 10.92

Buffalo Bills 17.7 10.64

Dallas Cowboys 24.6 10.66

Philadelphia Eagles 27.4 11.21

Minnesota Vikings 17.6 10.15

New York Jets 22.9 11.26

Page 8: Introduction to Linear Regression. Wake Forest Men’s BBall HeightWeightHeightWeight 74”17579”205 74”19584”235 78”20084”230 73”18577”210 79”20572”170 80”25072”175

Pearson’s Correlation Coefficient

• How strong is the correlation? Is there one?

• Would this be a good model for prediction? Why or why not?

Page 9: Introduction to Linear Regression. Wake Forest Men’s BBall HeightWeightHeightWeight 74”17579”205 74”19584”235 78”20084”230 73”18577”210 79”20572”170 80”25072”175

GPA and TV Hours per week# of hours

of TV per week

GPA

14 3.1

10 2.4

20 2.0

7 3.8

25 2.2

9 3.4

15 2.9

13 3.2

4 3.7

21 3.5

Page 10: Introduction to Linear Regression. Wake Forest Men’s BBall HeightWeightHeightWeight 74”17579”205 74”19584”235 78”20084”230 73”18577”210 79”20572”170 80”25072”175

Predict

• What would someone’s GPA be if he/she watched 5 hours of TV. Is this a good model to use for this prediction?

• If someone’s GPA was a 3.1, what would this data say about the number of hours he/she watched TV?