Linear Regression and Correlation -...

23
©The McGraw-Hill Companies, Inc. 2008 McGraw-Hill/Irwin Chapter 13 Linear Regression and Correlation

Transcript of Linear Regression and Correlation -...

Page 1: Linear Regression and Correlation - staff.uob.edu.bhstaff.uob.edu.bh/files/640437672_files/Chap13-19-12-11.pdf · Chapter 13 Linear Regression and Correlation. ... a Y n b X n = −

©The McGraw-Hill Companies, Inc. 2008McGraw-Hill/Irwin

Chapter 13

Linear Regression and Correlation

Page 2: Linear Regression and Correlation - staff.uob.edu.bhstaff.uob.edu.bh/files/640437672_files/Chap13-19-12-11.pdf · Chapter 13 Linear Regression and Correlation. ... a Y n b X n = −

Regression Analysis - Uses

2

Some examples.� Is there a relationship between the amount Healthtex spends per

month on advertising and its sales in the month?� Can we base an estimate of the cost to heat a home in January on

the number of square feet in the home?� Is there a relationship between the miles per gallon achieved by

large pickup trucks and the size of the engine?� Is there a relationship between the number of hours that students

studied for an exam and the score earned?

Page 3: Linear Regression and Correlation - staff.uob.edu.bhstaff.uob.edu.bh/files/640437672_files/Chap13-19-12-11.pdf · Chapter 13 Linear Regression and Correlation. ... a Y n b X n = −

Correlation Analysis

3

� Correlation Analysis is the study of the relationship between variables. It is also defined as group of techniques to measure the association between two variables.

� A Scatter Diagram is a chart that portrays the relationship between the two variables. It is the usual first step in correlations analysis� The Dependent Variable is the variable being predicted or estimated.

� The Independent Variable provides the basis for estimation. It is the predictor variable.

Page 4: Linear Regression and Correlation - staff.uob.edu.bhstaff.uob.edu.bh/files/640437672_files/Chap13-19-12-11.pdf · Chapter 13 Linear Regression and Correlation. ... a Y n b X n = −

Regression Example

The sales manager of Copier Sales of America, which has a large sales force

throughout the United States and Canada, wants to determine whether

there is a relationship between the number of sales calls made in a month

and the number of copiers sold that month. The manager selects a random

sample of 10 representatives and determines the number of sales calls each representative made last month

and the number of copiers sold.

4

Page 5: Linear Regression and Correlation - staff.uob.edu.bhstaff.uob.edu.bh/files/640437672_files/Chap13-19-12-11.pdf · Chapter 13 Linear Regression and Correlation. ... a Y n b X n = −

Scatter Diagram

5

Page 6: Linear Regression and Correlation - staff.uob.edu.bhstaff.uob.edu.bh/files/640437672_files/Chap13-19-12-11.pdf · Chapter 13 Linear Regression and Correlation. ... a Y n b X n = −

The Coefficient of Correlation, r

6

The Coefficient of Correlation (r) is a measure of the strength of the relationship between two variables. It requires interval or ratio-scaled data.

� It can range from -1.00 to 1.00.

� Values of -1.00 or 1.00 indicate perfect and strong correlation.

� Values close to 0.0 indicate weak correlation.

� Negative values indicate an inverse relationship and positive values indicate a direct relationship.

Page 7: Linear Regression and Correlation - staff.uob.edu.bhstaff.uob.edu.bh/files/640437672_files/Chap13-19-12-11.pdf · Chapter 13 Linear Regression and Correlation. ... a Y n b X n = −

Perfect Correlation

7

Page 8: Linear Regression and Correlation - staff.uob.edu.bhstaff.uob.edu.bh/files/640437672_files/Chap13-19-12-11.pdf · Chapter 13 Linear Regression and Correlation. ... a Y n b X n = −

Correlation Coefficient - Interpretation

8

Page 9: Linear Regression and Correlation - staff.uob.edu.bhstaff.uob.edu.bh/files/640437672_files/Chap13-19-12-11.pdf · Chapter 13 Linear Regression and Correlation. ... a Y n b X n = −

Correlation Coefficient - Formula

9

Page 10: Linear Regression and Correlation - staff.uob.edu.bhstaff.uob.edu.bh/files/640437672_files/Chap13-19-12-11.pdf · Chapter 13 Linear Regression and Correlation. ... a Y n b X n = −

Coefficient of Determination

10

The coefficient of determination (r2) is the proportion of the total variation in the dependent variable (Y) that is explained or accounted for by the variation in the independent variable (X). It is the square of the coefficient of correlation.

� It does not give any information on the direction of the relationship between the variables.

Page 11: Linear Regression and Correlation - staff.uob.edu.bhstaff.uob.edu.bh/files/640437672_files/Chap13-19-12-11.pdf · Chapter 13 Linear Regression and Correlation. ... a Y n b X n = −

Correlation Coefficient - Example

Using the Copier Sales of America data which a

scatterplot was developed earlier, compute the

correlation coefficient and coefficient of determination.

11

Page 12: Linear Regression and Correlation - staff.uob.edu.bhstaff.uob.edu.bh/files/640437672_files/Chap13-19-12-11.pdf · Chapter 13 Linear Regression and Correlation. ... a Y n b X n = −

Correlation Coefficient - Example

12

Page 13: Linear Regression and Correlation - staff.uob.edu.bhstaff.uob.edu.bh/files/640437672_files/Chap13-19-12-11.pdf · Chapter 13 Linear Regression and Correlation. ... a Y n b X n = −

Correlation Coefficient - Example

13

It is positive relationship

Page 14: Linear Regression and Correlation - staff.uob.edu.bhstaff.uob.edu.bh/files/640437672_files/Chap13-19-12-11.pdf · Chapter 13 Linear Regression and Correlation. ... a Y n b X n = −

Coefficient of Determination (r2) - Example

14

•The coefficient of determination, r2 ,is 0.576,

found by (0.759)2

•This is a proportion or a percent; we can say that

57.6 percent of the variation in the number of

copiers sold is explained, or accounted for, by the

variation in the number of sales calls.

Page 15: Linear Regression and Correlation - staff.uob.edu.bhstaff.uob.edu.bh/files/640437672_files/Chap13-19-12-11.pdf · Chapter 13 Linear Regression and Correlation. ... a Y n b X n = −

Linear Regression Model

15

Page 16: Linear Regression and Correlation - staff.uob.edu.bhstaff.uob.edu.bh/files/640437672_files/Chap13-19-12-11.pdf · Chapter 13 Linear Regression and Correlation. ... a Y n b X n = −

Computing the Slope of the Line

16

Page 17: Linear Regression and Correlation - staff.uob.edu.bhstaff.uob.edu.bh/files/640437672_files/Chap13-19-12-11.pdf · Chapter 13 Linear Regression and Correlation. ... a Y n b X n = −

Computing the Y-Intercept

17

Page 18: Linear Regression and Correlation - staff.uob.edu.bhstaff.uob.edu.bh/files/640437672_files/Chap13-19-12-11.pdf · Chapter 13 Linear Regression and Correlation. ... a Y n b X n = −

Regression Analysis – Least Squares

Principle

18

� The least squares principle is used to obtain a and b.

� The equations to determine a and b are:

bn XY X Y

n X X

aY

nb

X

n

=−

= −

( ) ( )( )

( ) ( )

Σ Σ Σ

Σ Σ

Σ Σ

2 2

Page 19: Linear Regression and Correlation - staff.uob.edu.bhstaff.uob.edu.bh/files/640437672_files/Chap13-19-12-11.pdf · Chapter 13 Linear Regression and Correlation. ... a Y n b X n = −

Illustration of the Least Squares Regression

Principle

19

Page 20: Linear Regression and Correlation - staff.uob.edu.bhstaff.uob.edu.bh/files/640437672_files/Chap13-19-12-11.pdf · Chapter 13 Linear Regression and Correlation. ... a Y n b X n = −

Regression Equation - Example

Recall the example involving Copier Sales of America. The sales manager gathered information on the number of sales calls

made and the number of copiers sold for a random sample of 10 sales

representatives. Use the least squares method to determine a linear equation to express the relationship between the

two variables.

What is the expected number of copiers sold by a representative who made 20

calls?

20

Page 21: Linear Regression and Correlation - staff.uob.edu.bhstaff.uob.edu.bh/files/640437672_files/Chap13-19-12-11.pdf · Chapter 13 Linear Regression and Correlation. ... a Y n b X n = −

Finding the Regression Equation - Example

6316.42

)20(1842.19476.18

1842.19476.18

:isequation regression The

^

^

^

^

=

+=

+=

+=

Y

Y

XY

bXaY

21

Page 22: Linear Regression and Correlation - staff.uob.edu.bhstaff.uob.edu.bh/files/640437672_files/Chap13-19-12-11.pdf · Chapter 13 Linear Regression and Correlation. ... a Y n b X n = −

Plotting the Estimated and the Actual Y’s

22

Page 23: Linear Regression and Correlation - staff.uob.edu.bhstaff.uob.edu.bh/files/640437672_files/Chap13-19-12-11.pdf · Chapter 13 Linear Regression and Correlation. ... a Y n b X n = −

End of Chapter 13

23