Download as pdf or txt
Download as pdf or txt
You are on page 1of 46

Textbook

Managing
Engineering
and
Technology,
6 Edition.
Daniel L.
Babcock &
Lucy C. Morse
Engineering Management
‫اإلدارة الهندسية‬
CH 4
Forecasting
‫التنبؤ‬
Forecasting ‫التنبؤ‬
 Process of predicting a future event.
 It is making statements about events whose
actual outcomes have not yet been observed.
 Production levels,
 Technological developments,
 Needed manpower,
??
 Governmental regulations,
 Needed Funds,
 Training needs,
 Resource needs,
 Sale levels
which is the most critical information to forecast.
Forecasting Time Horizons
 Based on the time
1. long-term forecasts look ahead several years – the time
typically needed to build a new factory, facility location,
research and development. (strategic planning)
> 3 years
2. medium-term forecasts look ahead between three months
and two years –the time typically needed to replace an old
product with a new one
3 months to 3 years
3. short-term forecasts cover the next few weeks – describing
the continuing demand for a product, Purchasing, job
scheduling, workforce levels, job assignments, and
production levels
Usually < 3 months
Forecasting Approaches
 Qualitative Method
 Used when situation is vague & little data exist
 New products
 New technology
 Involves experience
 e.g., forecasting sales on Internet
 Quantitative Method
 Used when situation is ‘stable’ & historical data exist
 Existing products
 Current technology
 Involves mathematical techniques
 e.g., forecasting sales of color televisions
Forecasting: Quantitative Methods

Time Series Methods


Moving Average
Weighted Moving Average

Exponential Smoothing

Simple Linear Regression


Time Series Components

Trend Cyclical

Seasonal Random
Components of Demand
Trend
component
Demand for product or service

Seasonal peaks

Actual
demand

Average
demand over
Random four years
variation
| | | |
1 2 3 4
Year
Components of Demand
Seasonal Component
 Regular pattern of up and down fluctuations
 Due to weather, customs, etc.
 Occurs within a single year

Number of
Period Length Seasons
Week Day 7
Month Week 4-4.5
Month Day 28-31
Year Quarter 4
Year Month 12
Year Week 52
Cyclical Component
 Repeating up and down movements
 Affected by business cycle, political, and economic
factors
 Multiple years duration
 Often causal or associative relationships

0 5 10 15 20
11
Random Component

 Erratic, unsystematic, ‘residual’ fluctuations


 Due to random variation or unforeseen events
 Short duration and
non-repeating

M T W T F
Moving Average Method
 MA is a series of arithmetic means
 Used if little or no trend
 Used often for smoothing
 Provides overall impression of data over time

∑ demand in previous n periods


Moving average =
n
Moving Average Example

Actual 3-Month
Month Shed Sales Moving Average

January 10
February 12
March 13
April 16 (10 + 12 + 13)/3 = 11 2/3
May 19 (12 + 13 + 16)/3 = 13 2/3
June 23 (13 + 16 + 19)/3 = 16
July 26 (16 + 19 + 23)/3 = 19 1/3
Example
If sales for years 2012, 2011, 2010,
2009 (n = 4) were 1,600; 1,200; 1,300;
and 1,100 respectively, sales for
2013 would be forecast as:
Year 2009 2010 2011 2012 2013
Sales 1,100 1,300 1,200 1,600 ?
1. Moving Average
Moving average 
 demand in previous n periods
n
1 n
Fn 1  t 1 At
n = current value
n+1 = forecast value for next
A = actual value
n

Year 2009 2010 2011 2012 2013


Sales 1,100 1,300 1,200 1,600 1300
2. Weighted Moving Average
Fn 1  t 1 wt At where 
n n
t 1
wt  1 w=weight value

Year 2009 2010 2011 2012 2013


Sales 1,100 1,300 1,200 1,600 1370
3. Exponential Smoothing
The exponential smoothing forecast method is an averaging method
that weights the most recent past data more strongly than more
distant past data. Thus, the forecast will react more strongly to
immediate changes in the data.
Ft = Ft-1 + a(At-1 - Ft-1)
𝐹𝑛+1 = 𝛼𝐴𝑛 + 1 − 𝛼 𝐹𝑛
New forecast =a (Last period’s actual demand)
where + (1 – a)(Last period’s forecast)
Fn+1 = new forecast
Fn = previous period’s forecast
a= smoothing constant (0 ≤ a ≤ 1)
An = previous period’s actual demand
3. Exponential Smoothing (cont.)
For example, if 𝛼 = 0.3
F2011= 0.3 A2010+(1 - 0.3) F2010 = 0.3(1300) + (1 - 0.3) (1100) =1160
F2012= 0.3 A2011+(1 - 0.3) F2011 = 0.3(1200) + (1 - 0.3) (1160) =1172
F2013= 0.3 A2012+(1 - 0.3) F2012 = 0.3(1600) + (1 - 0.3) (1172) =1300
Exponential Smoothing Example
 Suppose we use weight a = .2 Ft 1  0.2 A t  (1  0.2)Ft

Forecast
Time Sales Exponentially Smoothed
from prior
Period (i) (Ai) Value for this period (Fi)
period (Fi-1)
1 23 -- 23 x̂1 = x1
2 40 23 (.2)(23)+(.8)(23)=23 since no
3 25 26.4 (.2)(40)+(.8)(23)=26.4 prior
information
4 27 26.12 (.2)(25)+(.8)(26.4)=26.12
exists
5 32 26.296 (.2)(27)+(.8)(26.12)=26.296
6 48 27.437 (.2)(32)+(.8)(26.296)=27.437
7 33 31.549 (.2)(48)+(.8)(27.437)=31.549
8 37 31.840 (.2)(48)+(.8)(31.549)=31.840
9 37 32.872 (.2)(33)+(.8)(31.840)=32.872
10 50 33.697 (.2)(37)+(.8)(32.872)=33.697
etc. etc. etc. (.2)(50)+(.8)(33.697)=36.958 20
4. Simple regression model
Values of Dependent Variable

Actual observation Deviation7


(y-value)
Deviation5 Deviation6

Deviation3
Least squares method minimizes the
Deviation
sum4 of the squared errors (deviations)

Deviation1
(error) Deviation2
Trend line, y = a + b x
| | | | | | |
1 2 3 4 5 6 7

Time period
4. Simple regression model
The simple regression model assumes that the independent
variable x depends on a single dependent variable y.

𝑦 = a + bx
n ( xy )   x  y
b
n ( x 2 )  ( x ) 2

a
 y
b
 x
n n
4. Simple regression model (cont.)

n ( xy )   x  y 4(8500)  6(5200)
b   140
n ( x 2 )  ( x ) 2 4(14)  (6) 2

a
 y
b
 x 5200

6
 140   1090
n n 4 4
And a value for 2013 is forecast:
F2013  a  (2013  2009)b  1090  (2013  2009)140  1650
Example
For the given data forecast the demand in 2010

Electrical Power
Year Demand
2001 74
2002 79
2003 80
2004 90
2005 105
2005 142
2007 122

24
Solution
Time Electrical Power
Year Period (x) Demand x2 xy
2001 1 74 1 74
2002 2 79 4 158
2003 3 80 9 240
2004 4 90 16 360
2005 5 105 25 525
2005 6 142 36 852
2007 7 122 49 854
∑x = 28 ∑y = 692 ∑x2 = 140 ∑xy = 3,063
x=4 y = 98.86

n∑xy - ∑x ∑y (7)3,063 - (28)(692)


b= = = 10.54
n∑x2 -(∑x)2 (7)140 - (282)

a = y - bx = 98.86 - 10.54(4) = 56.70


Solution

The trend line is


^
y = 56.70 + 10.54x

To calculate the demand in 2010,

Then x =10

Y(10) = 56.70 + 10.54* 10

Y(10) = 162.1
Solution

Trend line,
160 – ^
y = 56.70 + 10.54x
150 –
140 –
130 –
Power demand

120 –
110 –
100 –
90 –
80 –
70 –
60 –
50 –
| | | | | | | | |
2001 2002 2003 2004 2005 2006 2007 2008 2009
Year
Summary of Simple Linear Regression

Simple Linear Regression Formulas for Calculating


“a” and “b”

 xy - n( y)( x ) b
n ( xy )   x  y
b= n ( x 2 )  ( x ) 2
 x - n(x )
2 2

 y  x
a b
a = y - bx n n
Example
Question: Given the data below, what is the simple linear
regression model that can be used to predict sales in future
weeks?

Week Sales
1 150
2 157
3 162
4 166
5 177
30

Solution
First, using the linear regression formulas, we can compute
“a” and “b”
Week Week*Week Sales Week*Sales
1 1 150 150
Week: x
2 4 157 314 Sales: y
3 9 162 486
4 16 166 664
5 25 177 885
3 55 162.4 2499
Average Sum Average Sum

b=
 xy - n( y)(x ) 2499 - 5(162.4)(3) 63
=  = 6.3
 x - n(x)
2 2
55  5(9) 10
a = y - b x = 162.4 - (6.3)(3) = 143.5
31

Solution
Now if we plot the regression generated forecasts against the
actual sales we obtain the following chart:
Sales Forecast
180

175

170
Yt = 143.5 + 6.3x
165
SALES

160

155

150

145

140
0 1 2 3 4 5
WEEK
Accuracy versus Bias
Accuracy - Closeness to actual observations
Bias - Persistent tendency to over or under predict
33

Common Measures of Error

Mean Absolute Deviation (MAD)


∑ |Actual - Forecast|
MAD =
n
Mean Squared Error (MSE)
∑ (Forecast Errors)2
MSE =
n
Mean Absolute Percent Error (MAPE)
n

MAPE = ∑100|Actuali - Forecasti|/Actuali


i=1

n
Common Measures of Error
34
Example: Forecasting Bagels
Example: Forecasting Bagels
Comparison of Forecast Error
Example- the following table shows the actual sales for the company
through eight months. Use..
Month Actual
1 180
2 168
3 159
4 175
5 190
6 205
7 180
8 182
a. Exponential smoothing with a smoothing constant equal to 0.1, and 0.5.
b. By using the root mean square error RMSE and the mean absolute
Deviation MAD define the best forecasting techniques
Comparison of Forecast Error

Absolute Absolute
Month Actual Forecast Error 2 Forecast Error 2
Deviation Deviation
1 180
2 168 180 12 144 180 12 144
3 159 178.8 19.8 392.04 174 15 225
4 175 176.8 1.82 3.3124 166.5 8.5 72.25
5 190 176.6 13.36 178.54 170.8 19.25 370.56
6 205 178 27.03 730.39 180.4 24.62 606.39
7 180 180.7 0.68 0.458 192.7 12.69 160.97
8 182 180.6 1.39 1.93 186.3 4.34 18.86
Sum 76.08 1450.68 Sum 96.40 1598
MAD 10.87 MAD 13.77
MSE 207.24 MSE 228.29
RMSE 14.40 RMSE 15.11
Comparison of Forecast Error

∑ |deviations|
Absolute Absolute
Month MAD
Actual =Forecast
Deviation
Error 2 Forecast
Deviation
Error 2
n
1 180
2 a
For168 = .10
180 12 144 180 12 144
3 159 178.8 19.8 392.04 174 15 225
4 175 =
176.876.08/7
1.82 = 10.87
3.3124 166.5 8.5 72.25
5 190 176.6 13.36 178.54 170.8 19.25 370.56
6 a
For205 = .50
178 27.03 730.39 180.4 24.62 606.39
7 180 = 96.40/7
180.7 0.68 = 13.77
0.458 192.7 12.69 160.97
8 182 180.6 1.39 1.93 186.3 4.34 18.86
Sum 76.08 1450.68 Sum 96.40 1598
MAD 10.87 MAD 13.77
MSE 207.24 MSE 228.29
RMSE 14.40 RMSE 15.11
Comparison of Forecast Error
∑ (forecast errors)2
MSE = Absolute Absolute
Quarter Actual Forecast n
Deviation
Error 2
Forecast
Deviation
Error 2

1 For180a = .10
2 168 180 12 144 180 12 144
3 159 = 1,450.68/7
178.8 19.8 = 207.24
392.04 174 15 225
4 175 176.8 1.82 3.3124 166.5 8.5 72.25
5 a=
For190 .50
176.6 13.36 178.54 170.8 19.25 370.56
6 205 178 27.03 730.39 180.4 24.62 606.39
7 180
=180.7
1,598/7=
0.68
228.29
0.458 192.7 12.69 160.97
8 182 180.6 1.39 1.93 186.3 4.34 18.86
Sum 76.08 1450.68 Sum 96.40 1598
MAD 10.87 MAD 13.77
MSE 207.24 MSE 228.29
RMSE 14.40 RMSE 15.11
Comparison of Forecast Error
∑ (forecast errors)2
RMSE = Absolute Absolute
Quarter Actual Forecast n
Deviation
Error 2
Forecast
Deviation
Error 2

1 For180a = .10
2 168 180 12 144 180 12 144
3 159 = 178.8
1,450.68/7
19.8 = 392.04
14.40 174 15 225
4 175 176.8 1.82 3.3124 166.5 8.5 72.25
5 a=
For190 .50
176.6 13.36 178.54 170.8 19.25 370.56
6 205 178 27.03 730.39 180.4 24.62 606.39
7 180
=180.7
1,598/7=
0.68
15.11
0.458 192.7 12.69 160.97
8 182 180.6 1.39 1.93 186.3 4.34 18.86
Sum 76.08 1450.68 Sum 96.40 1598
MAD 10.87 MAD 13.77
MSE 207.24 MSE 228.29
RMSE 14.40 RMSE 15.11
Comparison of Forecast Error
Example:- By using the root mean square error RMSE and the
mean absolute percentage errors MAPE define the best
forecasting techniques
Rounded Absolute Rounded Absolute
Actual Forecast Deviation Forecast Deviation
Tonnage with for with for
Quarter Unloaded a = .10 a = .10 a = .50 a = .50

1 180 175 5.00 175 5.00


2 168 175.5 7.50 177.50 9.50
3 159 174.75 15.75 172.75 13.75
4 175 173.18 1.82 165.88 9.12
5 190 173.36 16.64 170.44 19.56
6 205 175.02 29.98 180.22 24.78
7 180 178.02 1.98 192.61 12.61
8 182 178.22 3.78 186.30 4.30
82.45 98.62
Comparison of Forecast Error

∑ |deviations|
MADActual
= Rounded Absolute
Forecast Deviation
Rounded
Forecast
Absolute
Deviation
Tonnage nwith for with for
Quarter Unloaded a = .10 a = .10 a = .50 a = .50
For
1
a = .10
180 175 5.00 175 5.00
2 168= 82.45/8
175.5 = 10.31
7.50 177.50 9.50
3 159 174.75 15.75 172.75 13.75
For
4 a = 175
.50 173.18 1.82 165.88 9.12
5 190 173.36 16.64 170.44 19.56
6 205= 98.62/8
175.02= 12.33
29.98 180.22 24.78
7 180 178.02 1.98 192.61 12.61
8 182 178.22 3.78 186.30 4.30
82.45 98.62
Comparison of Forecast Error

∑ (forecast errors)2
MSE = Actual Rounded Absolute Rounded Absolute

Tonnage n
Forecast
with
Deviation
for
Forecast
with
Deviation
for
Quarter Unloaded a = .10 a = .10 a = .50 a = .50
For
1
a = .10
180 175 5.00 175 5.00
2 =168
1,526.54/8
175.5 = 190.82
7.50 177.50 9.50
3 159 174.75 15.75 172.75 13.75
For
4 a = 175
.50 173.18 1.82 165.88 9.12
5 190 173.36 16.64 170.44 19.56
6 =205
1,561.91/8
175.02= 195.24
29.98 180.22 24.78
7 180 178.02 1.98 192.61 12.61
8 182 178.22 3.78 186.30 4.30
82.45 98.62
MAD 10.31 12.33
Comparison of Forecast Error
n
∑100|deviation i|/actuali
MAPE =Actual
i=1 Rounded Absolute
Forecast
Rounded
Deviation Forecast
Absolute
Deviation
Tonnage with n for with for
Quarter Unloaded a = .10 a = .10 a = .50 a = .50

1
For a = .10
180 175 5.00 175 5.00
2 168 = 44.75/8
175.5 = 5.59%
7.50 177.50 9.50
3 159 174.75 15.75 172.75 13.75
4 For a = .50
175 173.18 1.82 165.88 9.12
5 190 173.36 16.64 170.44 19.56
6 205 = 54.05/8
175.02 = 6.76%
29.98 180.22 24.78
7 180 178.02 1.98 192.61 12.61
8 182 178.22 3.78 186.30 4.30
82.45 98.62
MAD 10.31 12.33
MSE 190.82 195.24
Comparison of Forecast Error

Rounded Absolute Rounded Absolute


Actual Forecast Deviation Forecast Deviation
Tonnage with for with for
Quarter Unloaded a = .10 a = .10 a = .50 a = .50

1 180 175 5.00 175 5.00


2 168 175.5 7.50 177.50 9.50
3 159 174.75 15.75 172.75 13.75
4 175 173.18 1.82 165.88 9.12
5 190 173.36 16.64 170.44 19.56
6 205 175.02 29.98 180.22 24.78
7 180 178.02 1.98 192.61 12.61
8 182 178.22 3.78 186.30 4.30
82.45 98.62
MAD 10.31 12.33
MSE 190.82 195.24
MAPE 5.59% 6.76%

You might also like