Transcript
Page 1: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

Chapter 13:

SIMPLE LINEAR REGRESSION

Page 2: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

2

SIMPLE LINEAR REGRESSION

Simple Regression Linear Regression

Page 3: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

3

Simple Regression

Definition A regression model is a mathematical

equation that describes the relationship between two or more variables. A simple regression model includes only two variables: one independent and one dependent. The dependent variable is the one being explained, and the independent variable is the one used to explain the variation in the dependent variable.

Page 4: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

4

Linear Regression

Definition A (simple) regression model that

gives a straight-line relationship between two variables is called a linear regression model.

Page 5: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

5

Figure 13.1 Relationship between food expenditure and income. (a) Linear relationship. (b) Nonlinear relationship.

Food

Expendit

ure

Food

Expendit

ure

Income Income

(a) (b)

Linear

Nonlinear

Page 6: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

6

Figure 13.2 Plotting a linear equation.

150

100

50

5 10 15 x

y = 50 + 5x

x = 0

y = 50

x = 10

y = 100

y

Page 7: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

7

Figure 13.3 y-intercept and slope of a line.

Change in y

Change in x

y-intercept

50

5

5

1

1

x

y

Page 8: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

8

SIMPLE LINEAR REGRESSION ANALYSIS

Scatter Diagram Least Square Line Interpretation of a and b Assumptions of the Regression Model

Page 9: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

9

SIMPLE LINEAR REGRESSION ANALYSIS cont.

y = A + Bx

Constant term or y-intercept

Slope

Independent variableDependent variable

Page 10: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

10

SIMPLE LINEAR REGRESSION ANALYSIS cont.

Definition In the regression model y = A + Bx

+ Є, A is called the y-intercept or constant term, B is the slope, and Є is the random error term. The dependent and independent variables are y and x, respectively.

Page 11: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

11

SIMPLE LINEAR REGRESSION ANALYSIS

Definition In the model ŷ = a + bx, a and b,

which are calculated using sample data, are called the estimates of A and B.

Page 12: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

12

Table 13.1 Incomes (in hundreds of dollars) and Food Expenditures of Seven Households

Income Food Expenditure

35 49 21 39 15 28 25

915 711 5 8 9

Page 13: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

13

Scatter Diagram

Definition A plot of paired observations is called

a scatter diagram.

Page 14: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

14

Figure 13.4 Scatter diagram.

Income

Food e

xpend

iture

First householdSeventh household

Page 15: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

15

Figure 13.5 Scatter diagram and straight lines.

Income

Food

expendit

ure

Page 16: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

16

Least Squares Line

Figure 13.6 Regression line and random errors.

Income

F

ood e

xpend

iture

e

Regression line

Page 17: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

17

Error Sum of Squares (SSE)

The error sum of squares, denoted SSE, is

The values of a and b that give the minimum SSE are called the least square estimates of A and B, and the regression line obtained with these estimates is called the least square line.

22 )ˆ(SSE yye

Page 18: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

18

The Least Squares Line

For the least squares regression line ŷ = a + bx,

xbyabxx

xy and SS

SS

Page 19: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

19

The Least Squares Line cont.

where

and SS stands for “sum of squares”. The least squares regression line ŷ = a + bx us also called the regression of y on x.

n

xx

n

yxxy xxxy

2

2SS and SS

Page 20: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

20

Example 13-1

Find the least squares regression line for the data on incomes and food expenditure on the seven households given in the Table 13.1. Use income as an independent variable and food expenditure as a dependent variable.

Page 21: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

21

Table 13.2

Income x

Food Expenditure

yxy x²

35492139152825

915 711 5 8 9

315735147429 75224225

12252401 4411521 225 784 625

Σx = 212 Σy = 64 Σxy = 2150

Σx² = 7222

Page 22: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

22

Solution 13-1

1429.97/64/

2857.307/212/

64 212

nyy

nxx

yx

Page 23: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

23

Solution 13-1

4286.801

7

)212(7222SS

7143.2117

)64)(212(2150SS

22

2

n

xx

n

yxxy

xx

xy

Page 24: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

24

Solution 13-1

1414.1)2857.30)(2642(.1429.9

2642.4286.801

7143.211

xbya

SS

SSb

xx

xy

Thus,

ŷ = 1.1414 + .2642x

Page 25: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

25

Figure 13.7 Error of prediction.

ePredicted = $1038.84

Error = -$138.84

Actual = $900

ŷ = 1.1414 + .2642x

Income

F

ood e

xpend

iture

Page 26: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

26

Interpretation of a and b

Interpretation of a Consider the household with zero

income ŷ = 1.1414 + .2642(0) = $1.1414 hundred

Thus, we can state that households with no income is expected to spend $114.14 per month on food

The regression line is valid only for the values of x between 15 and 49

Page 27: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

27

Interpretation of a and b cont.

Interpretation of b The value of b in the regression

model gives the change in y due to change of one unit in x

We can state that, on average, a $1 increase in income of a household will increase the food expenditure by $.2642

Page 28: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

28

Figure 13.8 Positive and negative linear relationships between x and y.

(a) Positive linear relationship.

(b) Negative linear relationship.

b > 0 b < 0

y

x

y

x

Page 29: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

29

Assumptions of the Regression Model

Assumption 1: The random error term Є has a mean

equal to zero for each x

Page 30: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

30

Assumptions of the Regression Model cont.

Assumption 2: The errors associated with different

observations are independent

Page 31: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

31

Assumptions of the Regression Model cont.

Assumption 3: For any given x, the distribution of

errors is normal

Page 32: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

32

Assumptions of the Regression Model cont.

Assumption 4: The distribution of population errors

for each x has the same (constant) standard deviation, which is denoted σЄ.

Page 33: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

33

Figure 13.11 (a) Errors for households with an income of $2000 per month.

Normal distribution with

(constant) standard deviation σЄ

E(ε) = 0

(a)

Errors for households with income = $2000

Page 34: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

34

Figure 13.11 (b) Errors for households with an income of $ 3500 per month.

Normal distribution with

(constant) standard deviation σЄ

E(ε) = 0

(b)

Errors for households with income = $3500

Page 35: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

35

Figure 13.12 Distribution of errors around the population regression line.

16

12

8

4

10 30 40 50x = 35 x = 20Income

Food e

xpend

iture

Population regression line

Page 36: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

36

Figure 13.13 Nonlinear relations between x and y.

(a) (b)

y

x

y

x

Page 37: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

37

Figure 13.14 Spread of errors for x = 20 and x = 35.

16

12

8

4

10 30 40 50x = 35 x = 20Income

Food e

xpend

iture

Population regression line

Page 38: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

38

STANDARD DEVIATION OF RANDOM ERRORS

Degrees of Freedom for a Simple Linear Regression Model

The degrees of freedom for a simple linear regression model are

df = n – 2

Page 39: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

39

STANDARD DEVIATION OF RANDOM ERRORS cont.

The standard deviation of errors is calculated as

where

2

n

bSSSSs xyyy

e

n

yySS yy

22

)(

Page 40: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

40

Example 13-2

Compute the standard deviation of errors se for the data on monthly incomes and food expenditures of the seven households given in Table 13.1.

Page 41: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

41

Table 13.3

Income x

Food Expenditure y y2

35492139152825

915711589

8122549

121256481

Σx = 212 Σy = 64 Σy2 =646

Page 42: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

42

Solution 13-2

9922.27

)7143.211(2642.8571.60

2

8571.607

)64(646

22

2

n

bSSSSs

n

yySS

xyyye

yy

Page 43: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

43

COEFFICIENT OF DETERMINATION

Total Sum of Squares (SST) The total sum of squares, denoted

by SST, is calculated as

n

yySST

2

2

Page 44: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

44

Figure 13.15 Total errors.

Food e

xpend

iture

Income

16

12

8

4

10 30 40 50 20

1429.9y

Page 45: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

45

Table 13.4

x y ŷ = 1.1414 + .2642x e = y – ŷ 35492139152825

915 711 5 8 9

10.388414.0872 6.689611.4452 5.1044 8.5390 7.7464

-1.3884 .9128 .3104 -.4452 -.1044 -.5390 1.2536

1.9277 .8332 .0963 .1982 .0109 .29051.5715

22 yye

9283.4ˆ22 yye

Page 46: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

46

Figure 13.16 Errors of prediction when regression model is used.

Food e

xpend

iture

Income

ŷ = 1.1414 + .2642x

Page 47: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

47

COEFFICIENT OF DETERMINATION cont.

Regression Sum of Squares (SSR) The regression sum of squares ,

denoted by SSR, is

SSESSTSSR

Page 48: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

48

COEFFICIENT OF DETERMINATION cont.

Coefficient of Determination The coefficient of determination,

denoted by r2, represents the proportion of SST that is explained by the use of the regression model. The computational formula for r2 is

and 0 ≤ r2 ≤ 1

yy

xy

SS

bSSr 2

Page 49: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

49

Example 13-3

For the data of Table 13.1 on monthly incomes and food expenditures of seven households, calculate the coefficient of determination.

Page 50: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

50

Solution 13-3

92.8571.60

)7143.211)(2642(.2 yy

xy

SS

bSSr

From earlier calculations

b = .2642, SSxx = 211.7143, and SSyy = 60.8571

Page 51: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

51

INFERENCES ABOUT B

Sampling Distribution of b Estimation of B Hypothesis Testing About B

Page 52: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

52

Sampling Distribution of b

Mean, Standard Deviation, and Sampling Distribution of b

The mean and standard deviation of b, denoted by and , respectively, are

xx

bbSS

B

and

b b

Page 53: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

53

Estimation of B

Confidence Interval for B The (1 – α)100% confidence interval

for B is given by

where

btsb

xx

eb

SS

ss

Page 54: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

54

Example 13-4

Construct a 95% confidence interval for B for the data on incomes and food expenditures of seven households given in Table 13.1.

Page 55: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

55

Solution 13-4

.35 to17.0900.2642.

)0350(.571.22642.

571.2

025.)2/95(.5.2/

5272

0350.4286.801

9922.

b

xx

eb

tsb

t

ndf

SS

ss

Page 56: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

56

Hypothesis Testing About B

Test Statistic for b The value of the test statistic t for b

is calculated as

The value of B is substituted from the null hypothesis.

bs

Bbt

Page 57: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

57

Example 13-5

Test at the 1% significance level whether the slope of the regression line for the example on incomes and food expenditures of seven households is positive.

Page 58: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

58

Solution 13-5

H0: B = 0 The slope is zero

H1: B > 0 The slope is positive

Page 59: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

59

Solution 13-5

n = 7 < 30 is not known Hence, we will use the t distribution

to make the test about B Area in the right tail = α = .01 df = n – 2 = 7 – 2 = 5 The critical value of t is 3.365

Page 60: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

60

Figure 13.17

Reject H0Do not reject H0

0 3.365

Critical value of t

α = .01

t

Page 61: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

61

Solution 13-5

549.70350.

02642.

bs

Bbt

From H0

Page 62: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

62

Solution 13-5

The value of the test statistic t = 7.549 It is greater than the critical value of t It falls in the rejection region

Hence, we reject the null hypothesis

Page 63: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

63

LINEAR CORRELATION

Linear Correlation Coefficient Hypothesis Testing About the Linear

Correlation Coefficient

Page 64: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

64

Linear Correlation Coefficient

Value of the Correlation Coefficient The value of the correlation

coefficient always lies in the range of –1 to 1; that is,

-1 ≤ ρ ≤ 1 and -1 ≤ r ≤ 1

Page 65: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

65

Figure 13.18 Linear correlation between two variables.

(a) Perfect positive linear correlation, r = 1

r = 1

x

y

Page 66: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

66

Figure 13.18 Linear correlation between two variables.

(b) Perfect negative linear correlation, r = -1

r = -1

x

y

Page 67: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

67

Figure 13.18 Linear correlation between two variables.

(c) No linear correlation, , r ≈ 0

r ≈ 0

x

y

Page 68: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

68

Figure 13.19 Linear correlation between variables.

(a) Strong positive linear correlation (r is close to 1)

x

y

Page 69: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

69

Figure 13.19 Linear correlation between variables.

(b) Weak positive linear correlation (r is positive but close to 0)

x

y

Page 70: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

70

Figure 13.19 Linear correlation between variables.

(c) Strong negative linear correlation (r is close to -1)

x

y

Page 71: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

71

Figure 13.19 Linear correlation between variables.

(d) Weak negative linear correlation (r is negative and close to 0)

x

y

Page 72: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

72

Linear Correlation Coefficient cont.

Linear Correlation Coefficient The simple linear correlation,

denoted by r, measures the strength of the linear relationship between two variables for a sample and is calculated as

yyxx

xy

SSSS

SSr

Page 73: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

73

Example 13-6

Calculate the correlation coefficient for the example on incomes and food expenditures of seven households.

Page 74: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

74

Solution 13-6

96.)8571.60)(4286.801(

7143.211

yyxx

xy

SSSS

SSr

Page 75: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

75

Hypothesis Testing About the Linear Correlation Coefficient

Test Statistic for r If both variables are normally

distributed and the null hypothesis is H0: ρ = 0, then the value of the test statistic t is calculated as

Here n – 2 are the degrees of freedom.

21

2

r

nrt

Page 76: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

76

Example 13-7

Using the 1% level of significance and the data from Example 13-1, test whether the linear correlation coefficient between incomes and food expenditures is positive. Assume that the populations of both variables are normally distributed.

Page 77: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

77

Solution 13-7

H0: ρ = 0 The linear correlation coefficient is zero

H1: ρ > 0 The linear correlation coefficient is

positive

Page 78: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

78

Solution 13-7

Area in the right tail = .01 df = n – 2 = 7 – 2 = 5 The critical value of t = 3.365

Page 79: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

79

Figure 13.20

Reject H0Do not reject H0

0 3.365

Critical value of t

α = .01

t

Page 80: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

80

Solution 13-7

667.7)96(.1

2796.

1

2

2

2

r

nrt

Page 81: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

81

Solution 13-7

The value of the test statistic t = 7.667 It is greater than the critical value of t It falls in the rejection region

Hence, we reject the null hypothesis

Page 82: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

82

REGRESSION ANALYSIS: COMPLETE EXAMPLE

Example 13-8 A random sample of eight drivers

insured with a company and having similar auto insurance policies was selected. The following table lists their driving experience (in years) and monthly auto insurance premiums.

Page 83: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

83

Example 13-8

Driving Experience (years)

Monthly Auto InsurancePremium

5 212 915 62516

$64 87 50 71 44 56 42 60

Page 84: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

84

Example 13-8

a) Does the insurance premium depend on the driving experience or does the driving experience depend on the insurance premium? Do you expect a positive or a negative relationship between these two variables?

Page 85: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

85

Solution 13-8

a) The insurance premium depends on driving experience

The insurance premium is the dependent variable

The driving experience is the independent variable

Page 86: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

86

Example 13-8

b) Compute SSxx, SSyy, and SSxy.

Page 87: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

87

Table 13.5Experience

x

Premium

y xy x ² y²

5 212 915 62516

6487507144564260

320 174 600 639 660 3361050 960

25 4144 81225 36625256

40967569250050411936313617643600

Σx = 90 Σy = 474 Σxy = 4739

Σx² = 1396

Σy² = 29,642

Page 88: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

88

Solution 13-8

b)

25.598/474/

25.118/90/

nyy

nxx

5000.15578

)474(642,29

)(

5000.3838

)90(1396

)(

5000.5938

)474)(90(4739

))((

222

222

n

yySS

n

xxSS

n

yxxySS

yy

xx

xy

Page 89: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

89

Example 13-8

c) Find the least squares regression line by choosing appropriate dependent and independent variables based on your answer in part a.

Page 90: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

90

Solution 13-8

c)

6605.76)25.11)(5476.1(25.59

5476.15000.383

5000.593

xbya

SS

SSb

xx

xy

xy 547.16605.76ˆ

Page 91: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

91

Example 13-8

d) Interpret the meaning of the values of a and b calculated in part c.

Page 92: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

92

Solution 13-8

d) The value of a = 76.6605 gives the value of ŷ for x = 0Here, b = -1.5476 indicates that, on average, for every extra year of driving experience, the monthly auto insurance premium decreases by $1.55.

Page 93: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

93

Example 13-8

e) Plot the scatter diagram and the regression line.

Page 94: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

94

Figure 13.21 Scatter diagram and the regression line.

e)

Insu

ran

ce p

rem

ium

Experience

xy 547.16605.76ˆ

Page 95: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

95

Example 13-8

f) Calculate r and r2 and explain what they mean.

Page 96: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

96

Solution 13-8

59.5000.1557

)5000.593)(5476.1(

77.)5000.1557)(5000.383(

5000.593

2

yy

xy

yyxx

xy

SS

bSSr

SSSS

SSr

f)

Page 97: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

97

Solution 13-8

f) The value of r = -0.77 indicates that the driving experience

Monthly auto insurance premium are negatively related

The (linear) relationship is strong but not very strong

The value of r² = 0.59 states that 59% of the total variation in insurance premiums is explained by years of driving experience and 41% is not

Page 98: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

98

Example 13-8

g) Predict the monthly auto insurance for a driver with 10 years of driving experience.

Page 99: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

99

Solution 13-8

g) The predict value of y for x = 10 is

ŷ = 76.6605 – 1.5476(10) = $61.18

Page 100: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

100

Example 13-8

h) Compute the standard deviation of errors.

Page 101: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

101

Solution 13-8

h)

3199.10 28

)5000.593)(5476.1(5000.1557

2

n

bSSSSs xyyy

e

Page 102: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

102

Example 13-8

i) Construct a 90% confidence interval for B.

Page 103: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

103

Solution 13-8

i)

52. to57.20240.15476.1

)5270(.943.15476.1

943.1

6282

05.)2/90(.5.2/

5270.5000.383

3199.10

tsb

t

ndf

SS

ss

b

xx

eb

Page 104: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

104

Example 13-8

j) Test at the 5% significance level whether B is negative.

Page 105: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

105

Solution 13-8

j) H0: B = 0

B is not negative H1: B < 0

B is negative

Page 106: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

106

Solution 13-5

Area in the left tail = α = .05 df = n – 2 = 8 – 2 = 6 The critical value of t is -1.943

Page 107: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

107

Figure 13.22

α = .01

Do not reject H0Reject H0

Critical value of t

t -1.943 0

Page 108: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

108

Solution 13-8

937.25270.

05476.1

bs

Bbt

From H0

Page 109: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

109

Solution 13-8

The value of the test statistic t = -2.937 It falls in the rejection region

Hence, we reject the null hypothesis and conclude that B is negative

Page 110: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

110

Example 13-8

k) Using α = .05, test whether ρ is difference from zero.

Page 111: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

111

Solution 13-8

k) H0: ρ = 0

The linear correlation coefficient is zero H1: ρ ≠ 0

The linear correlation coefficient is different from zero

Page 112: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

112

Solution 13-8

Area in each tail = .05/2 = .025 df = n – 2 = 8 – 2 = 6 The critical values of t are -2.447 and

2.447

Page 113: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

113

Figure 13.23

-2.447 0 2.447 t

α/2 = .025 α/2 = .025

Do not reject H0Reject H0

Reject H0

Two critical values of t

Page 114: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

114

Solution 13-8

956.2)77.(1

2877.

1

2

2

2

r

nrt

Page 115: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

115

Solution 13-8

The value of the test statistic t = -2.956 It falls in the rejection region

Hence, we reject the null hypothesis

Page 116: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

116

USING THE REGRESSION MODEL

Using the Regression Model for Estimating the Mean Value of y

Using the Regression Model for Predicting a Particular Value of y

Page 117: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

117

Figure 13.24 Population and sample regression lines.

y

x

Population regression line

BxAxy |

Regression lines ŷ = a +bx estimated from different samples

Page 118: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

118

Using the Regression Model for Estimating the Mean Value of y

Confidence Interval for μy|x

The (1 – α)100% confidence interval for μy|x for x = x0 is

mytsy ˆˆ

Page 119: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

119

Confidence Interval for μy|x

Where the value of t is obtained from the t distribution table for α/2 area in the right tail of the t distribution curve and df = n – 2. The value of is calculated as follows:

mys ˆ

xxey SS

xx

nss

m

20

ˆ

)(1

Page 120: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

120

Example 13-9

Refer to Example 13-1 on incomes and food expenditures. Find a 99% confidence interval for the mean food expenditure for all households with a monthly income of $3500.

Page 121: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

121

Solution 13-9

Using the regression line, we find the point estimate of the mean food expenditure for x = 35 ŷ = 1.1414 + .2642(35) = $10.3884 hundred

Area in each tail = α/2 = .5 – (.99/2) = .005 df = n – 2 = 7 – 2 = 5 t = 4.032

Page 122: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

122

Solution 13-9

4098.4286.801

)2857.3035(

7

1)9922(.

)(1

4286.801 and ,2857.30 ,9922.

2

20

ˆ

xxey

xxe

SS

xx

nsS

SSxs

m

Page 123: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

123

Solution 13-9

12.0407 to7361.86523.13884.10

)4098(.032.43884.10ˆ

is for interval confidence 99% theHence,

ˆ

35

my

y|

tsy

μ

Page 124: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

124

Using the Regression Model for Predicting a Particular Value of y

Prediction Interval for yp

The (1 – α)100% prediction interval for the predicted value of y, denoted by yp, for x = x0 is

pytsy ˆˆ

Page 125: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

125

Prediction Interval for yp

The value of is calculated as follows:pys ˆ

xxey SS

xx

nss

p

20

ˆ

)(11

Page 126: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

126

Example 13-10

Refer to Example 13-1 on incomes and food expenditures. Find a 99% prediction interval for the predicted food expenditure for a randomly selected household with a monthly income of $3500.

Page 127: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

127

Solution 13-10

Using the regression line, we find the point estimate of the predicted food expenditure for x = 35 ŷ = 1.1414 + .2642(35) = $10.3884 hundred

Area in each tail = α/2 = .5 – (.99/2) = .005 df = n – 2 = 7 – 2 = 5 t = 4.032

Page 128: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

128

Solution 13-10

0735.14286.801

)2857.3035(

7

11)9922(.

)(11

4286.801 and ,2857.30 ,9922.

2

20

ˆ

xxey

xxe

SS

xx

nsS

SSxs

p

Page 129: Chapter 13: SIMPLE LINEAR REGRESSION. 2 Simple Regression Linear Regression

129

Solution 13-10

14.7168 to0600.63284.43884.10

)0735.1(032.43884.10ˆ

is 35for for interval prediction 99% theHence,

ˆ

py

p

tsy

xy


Top Related