Coefficient of Determination Section 4.3 Alan Craig 770-274-5242 [email protected].

16
Coefficient of Determination Section 4.3 Alan Craig 770-274-5242 [email protected]

Transcript of Coefficient of Determination Section 4.3 Alan Craig 770-274-5242 [email protected].

Page 1: Coefficient of Determination Section 4.3 Alan Craig 770-274-5242 acraig@gpc.edu.

Coefficient of DeterminationSection 4.3

Alan Craig770-274-5242

[email protected]

Page 2: Coefficient of Determination Section 4.3 Alan Craig 770-274-5242 acraig@gpc.edu.

2

Objectives 4.3

1. Compute and interpret the coefficient of determination.

Page 3: Coefficient of Determination Section 4.3 Alan Craig 770-274-5242 acraig@gpc.edu.

3

Coefficient of Determination

• The coefficient of determination, R2, measures the percentage of the total variation in the response variable that is explained by the least-squares regression.

• R2 is calculated by squaring the linear correlation coefficient, r.

Page 4: Coefficient of Determination Section 4.3 Alan Craig 770-274-5242 acraig@gpc.edu.

4

On the Calculator

r and R2 are part of the calculator output for a linear regression with DiagnosticsOn.

Page 5: Coefficient of Determination Section 4.3 Alan Craig 770-274-5242 acraig@gpc.edu.

5

Least-Squares Regression

• Recall that the least-squares regression line minimizes the sum of the squared

errors (residuals) = residuals2

Error or residual = actual - predicted

Page 6: Coefficient of Determination Section 4.3 Alan Craig 770-274-5242 acraig@gpc.edu.

6

Estimating y

If I have no information about values of the predictor variable x, then my best guess for y is the mean of y:

and the deviation is the actual value minus the mean.

y

Page 7: Coefficient of Determination Section 4.3 Alan Craig 770-274-5242 acraig@gpc.edu.

7

Actual

Deviation

yMean

yy

Total Deviation

y

Page 8: Coefficient of Determination Section 4.3 Alan Craig 770-274-5242 acraig@gpc.edu.

8

Estimating y

However, if I have additional data on the values of x and corresponding values of y, I can often do better by calculating the regression of y on x.

Part of the total deviation is now explained by the regression equation although some of the deviation is still unexplained (unless there is a perfect linear correlation).

Page 9: Coefficient of Determination Section 4.3 Alan Craig 770-274-5242 acraig@gpc.edu.

9

Actual

Deviation

yMean

Predictedyy ˆ

yy ˆ

Unexplained Deviation

Deviation explained

by the regression

y

y

Page 10: Coefficient of Determination Section 4.3 Alan Craig 770-274-5242 acraig@gpc.edu.

10

Deviation

Note that

That is,

y = mean of y

+ explained deviation

+ unexplained deviation

)ˆ()ˆ( yyyyyy

Page 11: Coefficient of Determination Section 4.3 Alan Craig 770-274-5242 acraig@gpc.edu.

11

Deviation

Or

That is,

Total deviation = explained deviation

+ unexplained deviation

)ˆ()ˆ( yyyyyy

Page 12: Coefficient of Determination Section 4.3 Alan Craig 770-274-5242 acraig@gpc.edu.

12

Variation

The total variation of y is

The explained variation is

The unexplained variation is

1

2

n

yy

1

ˆ 2

n

yy

1

ˆ 2

n

yy

Page 13: Coefficient of Determination Section 4.3 Alan Craig 770-274-5242 acraig@gpc.edu.

13

Variation

variationtotal

variationdunexplaine1

variationtotal

variationexplained

variationtotal

variationdunexplaine

variationtotal

variationexplained1

variationdunexplaine variationexplained variationtotal

R2

Page 14: Coefficient of Determination Section 4.3 Alan Craig 770-274-5242 acraig@gpc.edu.

14

Interpreting R2

Thus, R2 is the percentage of variation in the response variable, y, that is explained by the predictor variable x.

variationtotal

variationdunexplaine1

variationtotal

variationexplained2 R

Page 15: Coefficient of Determination Section 4.3 Alan Craig 770-274-5242 acraig@gpc.edu.

15

Interpreting R2

Using our example from Sections 4.1 and 4.2 (problem 10, p. 172), R2 =0.9835=98.35%, so the predictor variable, Carats, explains 98.35% of the variation in the response variable, Price.

Page 16: Coefficient of Determination Section 4.3 Alan Craig 770-274-5242 acraig@gpc.edu.

16

Questions

• ???????????????