introduction to linear regression

22
Introduction to Linear Regression Conceptual Data Analysis Series

Upload: frances-bowers

Post on 03-Jan-2016

70 views

Category:

Documents


1 download

DESCRIPTION

Introduction to Linear Regression. Conceptual Data Analysis Series. Episode Objectives. What is linear regression? When would I use linear regression? How is a regression line calculated?. Correlation. Correlation. Correlation. Regression. Regression. Application. Application. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Introduction to Linear Regression

Introduction to Linear

Regression

Conceptual Data Analysis Series

Page 2: Introduction to Linear Regression

Episode Objectives

What is linear regression?

When would I use linear regression?

How is a regression line calculated?

Page 3: Introduction to Linear Regression

Correlation

rX X Y Y

X X Y Y

( )( )

( ) ( )2 2

Page 4: Introduction to Linear Regression

Correlation

0

20

40

60

80

100

120

0 2 4 6 8 10 12

Age

Weight

Page 5: Introduction to Linear Regression

Correlation

0

20

40

60

80

100

120

0 2 4 6 8 10 12

Age

Weight

Page 6: Introduction to Linear Regression

Regression

0

20

40

60

80

100

120

0 2 4 6 8 10 12

Age

Weight

Page 7: Introduction to Linear Regression

Regression

0

20

40

60

80

100

120

0 2 4 6 8 10 12

Age

Weight

Page 8: Introduction to Linear Regression

Application

600 620 640 660 680 700 720 740 760 780 8000.00

2.00

4.00

6.00

8.00

10.00

12.00

Credit Rating

Pro

babilit

y o

f M

akin

g a

C

laim

wit

hin

Tw

o

Years

Page 9: Introduction to Linear Regression

Application

600 620 640 660 680 700 720 740 760 780 8000.00

2.00

4.00

6.00

8.00

10.00

12.00

Credit Rating

Pro

babilit

y o

f M

akin

g a

C

alim

wit

hin

Tw

o

Years

Page 10: Introduction to Linear Regression

Application

200 250 300 350 400 450 500 550 6000

2

4

6

8

10

12

SAT Score Senior High School Year

Fre

shm

an C

ollege Y

ear

GP

A

Page 11: Introduction to Linear Regression

Application

200 250 300 350 400 450 500 550 6000

2

4

6

8

10

12

SAT Score Senior High School Year

Fre

shm

an C

ollege Y

ear

GP

A

Page 12: Introduction to Linear Regression

Application

200 250 300 350 400 450 500 550 6000

2

4

6

8

10

12

SAT Score Senior High School Year

Fre

shm

an C

ollege Y

ear

GP

A

Page 13: Introduction to Linear Regression

Regression Lines

Y = mX + b

Y’ = bX + a

Page 14: Introduction to Linear Regression

Regression Lines

Y = mX + b

Y’ =

0 1 2 3 4 5 6 7 8 9 100

2

4

6

8

10

12

14

16

18

20

X

Y'

Page 15: Introduction to Linear Regression

Regression Lines

Y = mX + b

Y’ = 2X + 0

0 1 2 3 4 5 6 7 8 9 100

2

4

6

8

10

12

14

16

18

20

X

Y'

Page 16: Introduction to Linear Regression

Regression Lines

Y = mX + b

Y’ = 2X + 0

Y’ = 2(5) + 0 = 10

Page 17: Introduction to Linear Regression

Regression Lines

Y = mX + b

Y’ = 2X + 0

Y’ = 2(5) + 0 = 10

Y’ = 2(6.2) + 0 = 12.4

Page 18: Introduction to Linear Regression

Regression Lines

Y = mX + b

Y’ = 1.9791x + 0.1773

0 1 2 3 4 5 6 7 8 9 100

2

4

6

8

10

12

14

16

18

20

X

Y'

Page 19: Introduction to Linear Regression

Residuals

0 1 2 3 4 5 6 7 8 9 100

2

4

6

8

10

12

14

16

18

20

X

Y'

Page 20: Introduction to Linear Regression

Residuals

0 1 2 3 4 5 6 7 8 9 100

2

4

6

8

10

12

14

16

18

20

X

Y'

residual

residual

Page 21: Introduction to Linear Regression

Calculating the Equation

0 1 2 3 4 5 6 7 8 9 100

2

4

6

8

10

12

14

16

18

20f(x) = 1.97909090909091 x + 0.177272727272728R² = 0.977995897613682

X

Y'

Page 22: Introduction to Linear Regression

Review

Regression is an extension of correlation

Regression permits us to can predict values of Y based on X, and vice versa

Causal statements still requires good experimental research design