Paper Assignment

profileyueyuehou
Lesson_05BUS501.pptx

Quantitative Analysis for Management

Thirteenth Edition

Lesson 5

Regression Models

(Based on Chapter 4)

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Learning Objectives (1 of 2)

After completing this lesson, students will be able to:

4.1 Identify variables, visualize them in a scatter diagram, and use them in a regression model.

4.2 Develop simple linear regression equations from sample data and interpret the slope and intercept.

4.3 Calculate the coefficient of determination and the coefficient of correlation and interpret their meanings.

4.4 List the assumptions used in regression and use residual plots to identify problems.

4.5 Interpret the F test in a linear regression model.

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Learning Objectives (2 of 2)

After completing this lesson, students will be able to:

4.6 Use computer software for regression analysis.

4.7 Develop a multiple regression model and use it for prediction purposes.

4.8 Use dummy variables to model categorical data.

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Lesson Outline

4.1 Scatter Diagrams

4.2 Simple Linear Regression

4.3 Measuring the Fit of the Regression Model

4.4 Assumptions of the Regression Model

4.5 Testing the Model for Significance

4.6 Using Computer Software for Regression

4.7 Multiple Regression Analysis

4.8 Binary or Dummy Variables

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Introduction (1 of 2)

Regression analysis – very valuable tool for a manager

Understand the relationship between variables

Predict the value of one variable based on another variable

Simple linear regression models have only two variables

Multiple regression models have more than one independent variable

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Introduction (2 of 2)

Variable to be predicted is called the dependent variable or response variable

Value depends on the value of the independent variable(s)

Explanatory or predictor variable

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Scatter Diagram

Scatter diagram or scatter plot often used to investigate the relationship between variables

Independent variable normally plotted on X axis

Dependent variable normally plotted on Y axis

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Triple A Construction (1 of 7)

Triple A Construction renovates old homes

The dollar volume of renovation work is dependent on the area payroll

TABLE 4.1 Triple A Construction Company Sales and Local Payroll

TRIPLE A’S SALES ($100,000s) LOCAL PAYROLL ($100,000,000s)
6 3
8 4
9 6
5 4
4.5 2
9.5 5

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Triple A Construction (2 of 7)

FIGURE 4.1 Scatter Diagram of Triple A Construction Company Data

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Simple Linear Regression (1 of 2)

Regression models used to test relationships between variables

Random error

where

Y = dependent variable (response)

X = independent variable (predictor or explanatory)

β0 = intercept (value of Y when X = 0)

β1 = slope of the regression line

e = random error

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Simple Linear Regression (2 of 2)

True values for the slope and intercept are not known

Estimated using sample data

where

Ŷ = predicted value of Y

b0 = estimate of β0, based on sample results

b1 = estimate of β1, based on sample results

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Triple A Construction (3 of 7)

Predict sales based on area payroll

Y = Sales X = Area payroll

The line Figure 4.1 minimizes the errors

Error = (Actual value) − (Predicted value

Regression analysis minimizes the sum of squared errors

Least-squares regression

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Triple A Construction (4 of 7)

Formulas for simple linear regression, intercept and slope

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Triple A Construction (5 of 7)

TABLE 4.2 Regression Calculations for Triple A Construction

Y X (X − X̅)2 (X − X̅)(Y − Y̅)
6 3 (3 − 4)2 = 1 (3 − 4)(6 − 7) = 1
8 4 (4 − 4)2 = 0 (4 − 4)(8 − 7) = 0
9 6 (6 − 4)2 = 4 (6 − 4)(9 − 7) = 4
5 4 (4 − 4)2 = 0 (4 − 4)(5 − 7) = 0
4.5 2 (2 − 4)2 = 4 (2 − 4)(4.5 − 7) = 5
9.5 5 (5 − 4)2 = 1 (5 − 4)(9.5 − 7) = 2.5
ΣY = 42 Y̅ = 42÷6 = 7 ΣX = 24 X̅ = 24÷6 = 4 Σ(X − X̅)2 = 10 Σ(X − X̅)(Y − Y̅) = 12.5

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Triple A Construction (6 of 7)

Regression calculations

Therefore

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Triple A Construction (7 of 7)

Regression calculations

Therefore

sales = 2 + 1.25(payroll)

If the payroll next year is $600 million

Ŷ = 2 + 1.25(6) = 9.5 or $ 950,000

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Measuring the Fit of the Regression Model (1 of 5)

Regression models can be developed for any variables X and Y

How helpful is the model in predicting Y?

With average error positive and negative errors cancel each other out

Three measures of variability

SST – Total variability about the mean

SSE – Variability about the regression line

SSR – Total variability that is explained by the model

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Measuring the Fit of the Regression Model (2 of 5)

Sum of squares total

Sum of squares error

Sum of squares regression

An important relationship

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Measuring the Fit of the Regression Model (3 of 5)

TABLE 4.3 Sum of Squares for Triple A Construction

Y X (Y − Y̅)2 (Y − Ŷ)2 (Ŷ − Y̅)2
6 3 (6 − 7)2 = 1 2 + 1.25(3) = 5.75 0.0625 1.563
8 4 (8 − 7)2 = 1 2 + 1.25(4) = 7.00 1 0
9 6 (9 − 7)2 = 4 2 + 1.25(6) = 9.50 0.25 6.25
5 4 (5 − 7)2 = 4 2 + 1.25(4) = 7.00 4 0
4.5 2 (4.5 − 7)2 = 6.25 2 + 1.25(2) = 4.50 0 6.25
9.5 5 (9.5 − 7)2 = 6.25 2 + 1.25(5) = 8.25 1.5625 1.563
Y̅ = 7 Blank ∑(Y − Y̅)2 = 22.5 Blank ∑(Y − Ŷ)2 = 6.875 ∑(Ŷ − Y̅)2 = 15.625
Blank Blank SST = 22.5 Blank SSE = 6.875 SSR = 15.625

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Measuring the Fit of the Regression Model (4 of 5)

For Triple A Construction

SST = 22.5

SSE = 6.875

SSR = 15.625

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Measuring the Fit of the Regression Model (5 of 5)

FIGURE 4.2 Deviations from the Regression Line and from the Mean

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Coefficient of Determination (1 of 2)

The proportion of the variability in Y explained by the regression equation

The coefficient of determination is r2.

For Triple A Construction

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Coefficient of Determination (2 of 2)

About 69% of the variability in Y is explained by the equation based on payroll (X)

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Correlation Coefficient

An expression of the strength of the linear relationship

Always between +1 and −1

The correlation coefficient is r

For Triple A Construction

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Four Values of the Correlation Coefficient

FIGURE 4.3 Four Values of the Correlation Coefficient

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Assumptions of the Regression Model

With certain assumptions about the errors, statistical tests can be performed to determine the model’s usefulness

Errors are independent

Errors are normally distributed

Errors have a mean of zero

Errors have a constant variance

A plot of the residuals (errors) often highlights glaring violations of assumptions

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Residual Plots (1 of 3)

FIGURE 4.4A Pattern of Errors Indicating Randomness

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Residual Plots (2 of 3)

FIGURE 4.4B Nonconstant Error Variance

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Residual Plots (3 of 3)

FIGURE 4.4C Pattern of Errors Indicating Relationship Is Not Linear

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Estimating the Variance (1 of 2)

Errors are assumed to have a constant variance (σ2), usually unknown

Estimated using the mean squared error (MSE), s2

where

n = number of observations in the sample

k = number of independent variables

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Estimating the Variance (2 of 2)

For Triple A Construction

Estimate the standard deviation, s

The standard error of the estimate or the standard deviation of the regression

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Testing the Model for Significance (1 of 4)

When the sample size is too small, you can get good values for MSE and r2 even if there is no relationship between the variables

Testing the model for significance helps determine if the values are meaningful

Performing a statistical hypothesis test

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Testing the Model for Significance (2 of 4)

We start with the general linear model

If β1 = 0, the null hypothesis is that there is no relationship between X and Y

The alternate hypothesis is that there is a linear relationship (β1 ≠ 0)

If the null hypothesis can be rejected, we have proven there is a relationship

We use the F statistic

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Testing the Model for Significance (3 of 4)

The F statistic is based on the MSE and MSR

where

k = number of independent variables in the model

The F statistic is

Describes an F distribution with:

degrees of freedom for the numerator = df1 = k

degrees of freedom for the denominator = df2 = n − k − 1

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Testing the Model for Significance (4 of 4)

If there is very little error, MSE would be small and the F statistic would be large – model is useful

If the F statistic is large, the significance level (p-value) will be low, – unlikely would have occurred by chance

When the F value is large, we can reject the null hypothesis and accept that there is a linear relationship between X and Y and the values of the MSE and r2 are meaningful

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Steps in a Hypothesis Test (1 of 2)

Specify null and alternative hypotheses

Select the level of significance (α)

Common values are 0.01 and 0.05.

Calculate the value of the test statistic

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Steps in a Hypothesis Test (2 of 2)

Make a decision using one of the following methods

Reject the null hypothesis if the test statistic is greater than the F value from the table in Appendix D. Otherwise, do not reject the null hypothesis:

Reject the null hypothesis if the observed significance level, or p-value, is less than the level of significance (α). Otherwise, do not reject the null hypothesis:

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Triple A Construction (1 of 3)

Step 1

H0: β1 = 0 (no linear relationship between X and Y)

H1: β1 ≠ 0 (linear relationship exists between X and Y)

Step 2

Select α = 0.05

Step 3

– Calculate the value of the test statistic

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Triple A Construction (2 of 3)

Step 4

Reject the null hypothesis if the test statistic is greater than the F value in Appendix D

df1 = k = 1

df2 = n − k − 1 = 6 − 1 − 1 = 4

The value of F associated with a 5% level of significance and with degrees of freedom 1 and 4 is found in Appendix D.

F0.05,1,4 = 7.71

Fcalculated = 9.09

Reject H0 because 9.09 > 7.71

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Triple A Construction (3 of 3)

FIGURE 4.5 F Distribution for Triple A Construction Test for Significance

We can conclude there is a statistically significant relationship between X and Y

The r2 value of 0.69 means about 69% of the variability in sales (Y) is explained by local payroll (X)

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Analysis of Variance (ANOVA) Table

With software models, an ANOVA table is typically created that shows the observed significance level (p-value) for the calculated F value

This can be compared to the level of significance (α) to make a decision

TABLE 4.4 Analysis of Variance Table for Regression

Blank DF SS MS F SIGNIFICANCE F
Regression k SSR MSR = SSR÷k MSR÷MSE P(F > MSR÷MSE)
Residual n − k − 1 SSE MSE = SSE÷(n − k − 1) Blank Blank
Total n − 1 SST Blank Blank Blank

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

ANOVA for Triple A Construction

PROGRAM 4.1C Excel 2016 Output for Triple A Construction Example

P(F > 9.0909) = 0.0394

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Using Software (1 of 10)

PROGRAM 4.1A Accessing the Regression Option in Excel 2016

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Using Software (2 of 10)

PROGRAM 4.1B Data Input for Regression in Excel 2016

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Using Software (3 of 10)

PROGRAM 4.1C Excel 2016 Output for Triple A Construction Example

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Using Software (4 of 10)

PROGRAM 4.2A Using Excel QM for Regression

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Using Software (5 of 10)

PROGRAM 4.2B Initializing the Spreadsheet in Excel QM

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Using Software (6 of 10)

PROGRAM 4.2C Input and Results for Regression in Excel QM

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Using Software (7 of 10)

PROGRAM 4.3A QM for Windows Regression Option in Forecasting Module

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Using Software (8 of 10)

PROGRAM 4.3B QM for Windows Screen to Initialize the Problem

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Using Software (9 of 10)

PROGRAM 4.3C Data Input for Triple A Construction Example

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Using Software (10 of 10)

PROGRAM 4.3D QM for Windows Output for Triple A Construction Example

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Multiple Regression Analysis (1 of 2)

Extensions to the simple linear model

Models with more than one independent variable

Y = β0 + β1X1 + β2X2 + … + βkXk + ε

where

Y = dependent variable (response variable)

Xi = ith independent variable (predictor or explanatory variable)

β0 = intercept (value of Y when all Xi = 0)

βi = coefficient of the ith independent variable

k = number of independent variables

ε = random error

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Multiple Regression Analysis (2 of 2)

To estimate these values, a sample is taken the following equation developed

where

Ŷ= predicted value of Y

b0 = sample intercept (an estimate of β0)

bi = sample coefficient of the ith variable (an estimate of βi)

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Jenny Wilson Realty (1 of 9)

Develop a model to determine the suggested listing price for houses based on the size and age of the house

where

Ŷ = predicted value of dependent variable (selling price)

b0 = Y intercept

X1 and X2 = value of the two independent variables (square footage and age) respectively

b1 and b2 = slopes for X1 and X2 respectively

Selects a sample of houses that have sold recently and records the data

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Jenny Wilson Real Estate Data

TABLE 4.5 Jenny Wilson Real Estate Data

SELLING PRICE ($) SQUARE FOOTAGE AGE CONDITION
95,000 1,926 30 Good
119,000 2,069 40 Excellent
124,800 1,720 30 Excellent
135,000 1,396 15 Good
142,000 1,706 32 Mint
145,000 1,847 38 Mint
159,000 1,950 27 Mint
165,000 2,323 30 Excellent
182,000 2,285 26 Mint
183,000 3,752 35 Good
200,000 2,300 18 Good
211,000 2,525 17 Good
215,000 3,800 40 Excellent
219,000 1,740 12 Mint

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Jenny Wilson Realty (2 of 9)

PROGRAM 4.4A Input Screen for Jenny Wilson Realty Multiple Regression in Excel 2016

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Jenny Wilson Realty (3 of 9)

PROGRAM 4.4B Excel 2016 Output Screen for Jenny Wilson Realty Multiple Regression Example

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Evaluating the Multiple Regression Model (1 of 2)

Similar to simple linear regression models

The p-value for the F test and r2 interpreted the same

The hypothesis is different because there is more than one independent variable

The F test is investigating whether all the coefficients are equal to 0 at the same time

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Evaluating the Multiple Regression Model (2 of 2)

To determine which independent variables are significant, tests are performed for each variable

The test statistic is calculated and if the p-value is lower than the level of significance (α), the null hypothesis is rejected

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Jenny Wilson Realty (4 of 9)

Full model is statistically significant

Useful in predicting selling price

p-value for F test = 0.002 r2 = 0.6719

Are both variables significant?

For X1 (square footage)

For a = 0.05, p-value = 0.0013 null hypothesis is rejected

For X1 (age)

For a = 0.05, p-value = 0.0039 null hypothesis is rejected

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Jenny Wilson Realty (5 of 9)

Both square footage and age are helpful in predicting the selling price

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Binary or Dummy Variables

Binary (or dummy or indicator) variables are special variables created for qualitative data

A dummy variable is assigned a value of 1 if a particular condition is met and a value of 0 otherwise

The number of dummy variables must equal one less than the number of categories of the qualitative variable

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Jenny Wilson Realty (6 of 9)

A better model can be developed if information about the condition of the property is included

X3 = 1 if house is in excellent condition

= 0 otherwise

X4 = 1 if house is in mint condition

= 0 otherwise

Two dummy variables are used to describe the three categories of condition

No variable is needed for “good” condition since if both X3 and X4 = 0, the house must be in good condition

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Jenny Wilson Realty (7 of 9)

PROGRAM 4.5A Input Screen for Jenny Wilson Realty Example

with Dummy Variables in

Excel 2016

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Jenny Wilson Realty (8 of 9)

PROGRAM 4.5B Output Screen for Jenny Wilson Realty Example with Dummy Variables in Excel 2016

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

Jenny Wilson Realty (9 of 9)

PROGRAM 4.5B Output Screen for Jenny Wilson Realty Example with Dummy Variables in Excel 2016

Coefficient of determination, r2 = 0.898

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

End of Lesson 5

Copyright © 2018, 2015, 2012 Pearson Education, Inc. All Rights Reserved.

01

YX

bbe

=++

01

ˆ

YbbX

=+

ˆ

eYY

=-

01

ˆ

YbbX

=+

1

2

01

average (mean) of values

average (mean) of values

()()

()

X

XX

n

Y

YY

n

XXYY

b

XX

bYbX

==

==

--

=

-

=-

å

å

å

å

24

4

66

X

X

===

å

42

7

66

Y

Y

===

å

1

2

01

()()

12.5

1.25

10

()

7 – (1.25)(4)2

X–XY–Y

b

X–X

bYbX

===

=-==

å

å

ˆ

2+1.25

YX

=

24

4

66

X

X

===

å

42

7

66

Y

Y

===

å

1

2

01

()()

12.5

1.25

10

()

7 – (1.25)(4)2

X–XY–Y

b

X–X

bYbX

===

=-==

å

å

ˆ

2 + 1.25

YX

=

2

SST()

YY

=-

å

22

ˆ

SSE()

eYY

==-

åå

2

ˆ

SSR()

YY

=-

å

SSTSSR + SSE

=

2

SSRSSE

1–

SSTSST

r

==

2

15.625

0.6944

22.5

r

==

2

rr

0.69440.8333

r

==

2

SSE

MSE

1

s

nk

==

--

2

SSE6.87506.8750

MSE1.7188

16114

s

nk

=====

----

MSE 1.71881.31

s

===

01

YX

bbe

=++

SSR

MSR

k

=

MSR

MSE

F

=

01

11

:0

:0

H

H

b

b

=

¹

MSR

MSE

F

=

12

,,

1

2

Reject if

1

calculateddfdf

FF

k

nk

a

>

=

=--

df

df

-value(calculated test statistic)

Reject if -value

pPF

p

a

=>

<

SSR15.6250

MSR15.6250

1

MSR15.6250

9.09

MSE1.7188

k

F

===

===

01122

ˆ

...

kk

YbbXbXbX

=++++

01122

ˆ

YbbXbX

=++

01122

12

ˆ

146,630.8943.822898.69

YbbXbX

XX

=++

=+-

01

11

:0

:0

H

H

b

b

=

¹

01

11

:0

:0

H

H

b

b

=

¹

1234

ˆ

121,658 + 56.43–3,962+ 33,162+ 47,369

YXXXX

=