You are on page 1of 32

Chapter: Regression Analysis

Course: Quantitative Analysis for Decision Making


Lecture 4

Week: 4th (7Th October)

Dr. Waqas Ahmed


Department of Operations and Supply Chain
NUST Business School (NBS)
National University of Sciences & Technology, Islamabad, Pakistan
4
- »Dr. Waqas Ahmed

Learning Objectives
2

After completing this chapter, students will be able to:

1. Identify variables and use them in a regression model.


2. Develop simple linear regression equations from sample data and
interpret the slope and intercept.
3. Compute the coefficient of determination and the coefficient of
correlation and interpret their meanings.
4. Develop a multiple regression model and use it for prediction
purposes.

© Dr. Waqas Ahmed 2


4
-

Chapter Outline
»Dr. Waqas Ahmed
3

4.1 Introduction
4.2 Scatter Diagrams
4.3 Simple Linear Regression
4.4 Using Computer Software for Regression
4.5 Multiple Regression Analysis
4.6 Nonlinear Regression

© Dr. Waqas Ahmed 3


4
- »Dr. Waqas Ahmed

Introduction
4

● Regression analysis is a very valuable tool for a manager.


● Regression can be used to:
⌂ 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 variables.

© Dr. Waqas Ahmed 4


4
- »Dr. Waqas Ahmed

Introduction
5

● The variable to be predicted is called the dependent variable.


● This is sometimes called the response variable.
● The value of this variable depends on the value of the
independent variable.
⌂ This is sometimes called the explanatory or predictor variable.

Dependent Independent Independent


variable
= variable
+ variable

© Dr. Waqas Ahmed 5


»Dr. Waqas Ahmed

Scatter Diagram

● A scatter diagram or scatter plot is often used to investigate


the relationship between variables.
● The independent variable is normally plotted on the X axis.
● The dependent variable is normally plotted on the Y axis.

© Dr. Waqas Ahmed 6


Goal
»Dr. Waqas Ahmed

Develop a statistical model that can predict


the values of a dependent (response)
variable based upon the values of the
independent (explanatory) variables.

© Dr. Waqas Ahmed 7


Simple Regression
»Dr. Waqas Ahmed

A statistical model that utilizes one


quantitative independent variable “X” to
predict the quantitative dependent
variable “Y.”

© Dr. Waqas Ahmed 8


Multiple Regression
»Dr. Waqas Ahmed

A
statistical model that utilizes two or more
quantitative variables (x1,..., xp) to predict a
quantitative dependent variable Y.

© Dr. Waqas Ahmed 9


»Dr. Waqas Ahmed

Capital Construction
● Capital Construction renovates old homes.
● Managers have found that the dollar volume of
renovation work is dependent on the area payroll.
CAPITAL’S SALES LOCAL PAYROLL
($100,000s) ($100,000,000s)
6 3
8 4
9 6
5 4
4.5 2
9.5 5

© Dr. Waqas Ahmed 10


»Dr. Waqas Ahmed

Capital Construction
Scatter Diagram of Capital Construction Company Data

© Dr. Waqas Ahmed 11


Simple Linear Regression
»Dr. Waqas Ahmed

 Regression models are used to test if there is a relationship


between variables.

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

© Dr. Waqas Ahmed 12


Simple Linear Regression
»Dr. Waqas Ahmed

 True values for the slope and intercept are not known so they
are estimated using sample data.

Yˆ  b0  b1 X

where
Y^ = predicted value of Y
b0 = estimate of β0, based on sample results
b1 = estimate of β1, based on sample results

© Dr. Waqas Ahmed 13


»Dr. Waqas Ahmed

Capital Construction
For the simple linear regression model, the values of the intercept and
slope can be calculated using the formulas below.
Yˆ  b0  b1 X

X
 X
 average (mean) of X values
n
Y
 Y
 average (mean) of Y values
n
b1 
 ( X  X )(Y  Y )
(X  X ) 2

b0  Y  b1 X

© Dr. Waqas Ahmed 14


»Dr. Waqas Ahmed

Capital Construction

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 ΣX = 24 Σ(X – X)2 = 10 Σ(X – X)(Y – Y) = 12.5
Y = 42/6 = 7 X = 24/6 = 4

© Dr. Waqas Ahmed 15


»Dr. Waqas Ahmed

Capital Construction

Regression calculations

X
 X 24
 4
6 6

Y
 Y 42
 7
6 6

b1 
 ( X  X )(Y  Y ) 12.5
  1.25
(X  X ) 2
10

b0  Y  b1 X  7  (1.25 )( 4 )  2

Therefore Yˆ  2  1.25 X

© Dr. Waqas Ahmed 16


4
- »Dr. Waqas Ahmed

Capital Construction
1
7

Regression calculations

X
 X 24
 4 sales = 2 + 1.25(payroll)
6 6
If the payroll next year is
Y
 Y 42
 7 $600 million
6 6
Yˆ  2  1.25(6)  9.5 or $ 950,000
b1 
 ( X  X )(Y  Y ) 12.5
  1.25
(X  X ) 2
10

b0  Y  b1 X  7  (1.25 )( 4 )  2

Therefore Yˆ  2  1.25 X

© Dr. Waqas Ahmed 17


Correlation
»Dr. Waqas Ahmed

 How strong is the linear relationship between the


variables?
 Coefficient of correlation r
 measures degree of association
 Values range from -1 to +1

 Coefficient of Determination r2
 the % change in y predicted by the change in x
 Values range from 0 to 1

For example, when r = .901 r2 = .81

© Dr. Waqas Ahmed 18


»Dr. Waqas Ahmed

Four Values of the Correlation Coefficient


Y Y
*
*
* * *
* *
* ** *
* * *
* *
(a) Perfect Positive X X
Correlation: b) Positive relation
r = +1 0<r<1
Y Y
*
* ** *
* * * * *
*
* *** * *
*
(c) No Correlation: X (d) Perfect Negative X
Correlation:
r=0 r = –1

© Dr. Waqas Ahmed 19


Using Computer Software »Dr. Waqas Ahmed

for Regression
Accessing the Regression Option in Excel 2010

© Dr. Waqas Ahmed 20


Using Computer Software for »Dr. Waqas Ahmed

Regression
Data Input for Regression in Excel

© Dr. Waqas Ahmed 21


Using Computer Software for »Dr. Waqas Ahmed

Regression
Excel Output for the Capital Construction Example

© Dr. Waqas Ahmed 22


Multiple Regression Analysis
»Dr. Waqas Ahmed

 Multiple regression models are extensions to the simple linear


model and allow the creation of models with more than one
independent variable.

Y = 0 + 1X1 + 2X2 + … + iXi


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
i =number of independent variables

© Dr. Waqas Ahmed 23


Multiple Regression Analysis
»Dr. Waqas Ahmed

To estimate these values, a sample is taken the


following equation developed

Yˆ  b0  b1 X 1  b2 X 2  ...  bi X i
where
Ŷ =predicted value of Y
b0 =sample intercept (and is an estimate of
0 )
bi =sample coefficient of the ith variable (and
is an estimate of i)

© Dr. Waqas Ahmed 24


Mini-Case
»Dr. Waqas Ahmed

Predict the consumption of home heating oil


during January for homes located around Screne
Lakes. Two explanatory variables are selected - -
average daily atmospheric temperature (oF) and
the amount of attic insulation.

© Dr. Waqas Ahmed 25


Mini-Case
»Dr. Waqas Ahmed

Develop a model for estimating Oil (Gal) Temp(0F) Insulation


heating oil used for a single 275.30 40 3
family home in the month of 363.80 27 3
164.30 40 10
January based on average
40.80 73 6
temperature and amount of 94.30 64 6
insulation in inches. 230.90 34 6
366.70 9 6
300.60 8 10
237.80 23 10
121.40 63 3
31.40 65 10
203.50 41 6
441.10 21 3
323.00 38 3
52.50 58 10
© Dr. Waqas Ahmed 26
Multiple Regression Equation »Dr. Waqas Ahmed

[mini-case]

D
ependent variable: Gallons Consumed

-------------------------------------------------------------------------------------

Standard T

Parameter Estimate Error Statistic P-Value

--------------------------------------------------------------------------------------

CONSTANT 562.151 21.0931 26.6509 0.0000

Temperature -5.43658 0.336216 -16.1699 0.0000


© Dr. Waqas Ahmed 27
Multiple Regression Equation »Dr. Waqas Ahmed

[mini-case]

Y =
562.15 - 5.44(x1) - 20.01(x2)

where:
x1 = temperature [degrees F]

x2 = attic insulation [inches]


© Dr. Waqas Ahmed 28
Mini-Case
»Dr. Waqas Ahmed

hat preliminary conclusions can home owners draw from the data?

hat could a home owner expect heating oil consumption (in gallons) to be if the
outside temperature is 15 oF when the attic insulation is 10 inches thick?

© Dr. Waqas Ahmed 29


Multiple Regression Equation »Dr. Waqas Ahmed

[mini-case]

Heating oil consumption (in gallons) to be if the outside temperature is 15 oF


when the attic insulation is 10 inches thick?

Y = 562.15 - 5.44 (15) - 20.01(10)

Heating
oil consumption = 280.45

© Dr. Waqas Ahmed 30


»Dr. Waqas Ahmed

Nonlinear Regression

n some situations, variables are not linear.

ransformations may be used to turn a nonlinear model into a


linear model. * * * *
*
** * * ** *
*
*** * ** *
Linear relationship Nonlinear relationship

© Dr. Waqas Ahmed 31


»Dr. Waqas Ahmed

Thank you! Any Questions

© Dr. Waqas Ahmed 32

You might also like