Forecasting in Industrial Engineering
Forecasting in Industrial Engineering
Forecasting in Industrial Engineering
e
+ +
= =
6
1..3
6-1 6-2 6-3
6
3 3
i
i
A
A A A
F
Simple Moving Average
Question:
What are the 3-week and 6-week moving
average forecasts for the following demand?
Week Demand Week Demand
1 650 7 850
2 678 8 758
3 720 9 892
4 785 10 920
5 859 11 789
6 920 12 844
Simple Moving Average
Simple Moving Average
Curves (2)
Weighted Moving Average
WMA
n
=
i = 1
E
W
i
D
i
where
W
i
= the weight for period i,
between 0 and 100
percent
E W
i
= 1.00
Adjusts
moving
average
method to
more closely
reflect data
fluctuations
Weighted Moving Average Example
MONTH WEIGHT DATA
August 17% 130
September 33% 110
October 50% 90
WMA
3
=
3
i = 1
E
W
i
D
i
= (0.50)(90) + (0.33)(110) + (0.17)(130)
= 103.4 orders
November Forecast
Exponential Smoothing
Based on the premise
that the most recent
observations might have
the highest predictive
value
Therefore, we should give
more weight to the more
recent time periods when
forecasting
Averaging method
Weights most recent
data more strongly
Reacts more to recent
changes
Widely used, accurate
method
F
t +1
= o D
t
+ (1 - o)F
t
where:
F
t +1
= forecast for next period
D
t
= actual demand for present period
F
t
= previously determined forecast for
present period
o = weighting factor, smoothing constant
Exponential Smoothing (cont.)
Effect of Smoothing Constant
0.0 s o s 1.0
If o = 0.20, then F
t +1
= 0.20 D
t
+ 0.80 F
t
If o = 0, then F
t +1
= 0 D
t
+ 1 F
t
0 = F
t
Forecast does not reflect recent data
If o = 1, then F
t +1
= 1 D
t
+ 0 F
t
= D
t
Forecast based only on most recent data
Choosing value of Alpha
Choosing appropriate values for
If actual demands are stable, use a small to
lessen effects of short-term changes in demand
If actual demands rapidly increase or decrease, use
a large so forecasts keep pace with the changes
in demand
is usually determined by trial and error, with
several values tested on existing data or a portion
of data
Want to minimize the average forecasting error
F
2
= oD
1
+ (1 - o)F
1
= (0.30)(37) + (0.70)(37)
= 37
F
3
= oD
2
+ (1 - o)F
2
= (0.30)(40) + (0.70)(37)
= 37.9
F
13
= oD
12
+ (1 - o)F
12
= (0.30)(54) + (0.70)(50.84)
= 51.79
Exponential Smoothing (=0.30)
PERIOD MONTH DEMAND
1 Jan 37
2 Feb 40
3 Mar 41
4 Apr 37
5 May 45
6 Jun 50
7 Jul 43
8 Aug 47
9 Sep 56
10 Oct 52
11 Nov 55
12 Dec 54
FORECAST, F
t + 1
PERIOD MONTH DEMAND (o = 0.3) (o = 0.5)
1 Jan 37
2 Feb 40 37.00 37.00
3 Mar 41 37.90 38.50
4 Apr 37 38.83 39.75
5 May 45 38.28 38.37
6 Jun 50 40.29 41.68
7 Jul 43 43.20 45.84
8 Aug 47 43.14 44.42
9 Sep 56 44.30 45.71
10 Oct 52 47.81 50.85
11 Nov 55 49.06 51.42
12 Dec 54 50.84 53.21
13 Jan 51.79 53.61
Exponential Smoothing
(cont.)
70
60
50
40
30
20
10
0
| | | | | | | | | | | | |
1 2 3 4 5 6 7 8 9 10 11 12 13
Actual
O
r
d
e
r
s
Month
Exponential Smoothing (cont.)
o = 0.50
o = 0.30
Exponential Smoothing Example-2
Question
Given the following demands, what are the exponential smoothing forecasts for all
periods using an exponential smoothing factor of = 0.10? Assume that for period 1: F1
= A1
Period Demand
1 42
2 40
3 43
4 40
5 41
6 39
7 46
8 44
9 45
10 38
11 40
12
Forecast Error
42.00 -2.00
41.80 1.20
41.92 -1.92
41.73 -0.73
41.66 -2.66
41.39 4.61
41.85 2.15
42.07 2.93
42.36 -4.36
41.92 -1.92
41.73
( )
-1 -1 -1 t t t t
F F A F o = +
( )
o = +
2 1 1 1
F F A F
( )
= + 42 0.1 42 42
( )
o = +
3 2 2 2
F F A F
( )
= + 42 0.1 40 42
( )
o = +
4 3 3 3
F F A F
( )
= + 41.8 0.1 43 41.8
Exponential Smoothing Curves
Trend Effects in Exponential Smoothing
Upward or downward trends in demand cause
forecasts to lag actual data.
An exponentially smoothed forecast can be corrected
by adding a trend adjustment.
The formulas for exponential smoothing with trend
adjustments are to be used.
o
AF
t +1
= F
t +1
+ T
t +1
where
T = an exponentially smoothed trend factor
T
t +1
= |(F
t +1
- F
t
) + (1 - |) T
t
where
T
t
= the last period trend factor
| = a smoothing constant for trend
Trend Adjusted Exponential
Smoothing
Trend Adjusted Exponential
Smoothing (=0.30)
PERIOD MONTH DEMAND
1 Jan 37
2 Feb 40
3 Mar 41
4 Apr 37
5 May 45
6 Jun 50
7 Jul 43
8 Aug 47
9 Sep 56
10 Oct 52
11 Nov 55
12 Dec 54
T
3
= |(F
3
- F
2
) + (1 - |) T
2
= (0.30)(38.5 - 37.0) + (0.70)(0)
= 0.45
AF
3
= F
3
+ T
3
= 38.5 + 0.45
= 38.95
T
13
= |(F
13
- F
12
) + (1 - |) T
12
= (0.30)(53.61 - 53.21) + (0.70)(1.77)
= 1.36
AF
13
= F
13
+ T
13
= 53.61 + 1.36 = 54.96
Trend Adjusted Exponential Smoothing:
Example
FORECAST TREND ADJUSTED
PERIOD MONTH DEMAND F
t +1
T
t +1
FORECAST AF
t +1
1 Jan 37 37.00
2 Feb 40 37.00 0.00 37.00
3 Mar 41 38.50 0.45 38.95
4 Apr 37 39.75 0.69 40.44
5 May 45 38.37 0.07 38.44
6 Jun 50 38.37 0.07 38.44
7 Jul 43 45.84 1.97 47.82
8 Aug 47 44.42 0.95 45.37
9 Sep 56 45.71 1.05 46.76
10 Oct 52 50.85 2.28 58.13
11 Nov 55 51.42 1.76 53.19
12 Dec 54 53.21 1.77 54.98
13 Jan 53.61 1.36 54.96
Trend Adjusted Exponential Smoothing
Forecasts
70
60
50
40
30
20
10
0
| | | | | | | | | | | | |
1 2 3 4 5 6 7 8 9 10 11 12 13
Actual
D
e
m
a
n
d
Period
Forecast (o = 0.50)
Adjusted forecast (| = 0.30)
y = a + bx
where
a = intercept
b = slope of the line
x = time period
y = forecast for
demand for period x
Regression : Linear Trend Line
b =
a = y - b x
where
n = number of periods
x = = mean of the x values
y = = mean of the y values
E xy - nxy
E x
2
- nx
2
E x
n
E y
n
Least Squares Example
x(PERIOD) y(DEMAND) xy x
2
1 73 37 1
2 40 80 4
3 41 123 9
4 37 148 16
5 45 225 25
6 50 300 36
7 43 301 49
8 47 376 64
9 56 504 81
10 52 520 100
11 55 605 121
12 54 648 144
78 557 3867 650
x = = 6.5
y = = 46.42
b = = =1.72
a = y - bx
= 46.42 - (1.72)(6.5) = 35.2
3867 - (12)(6.5)(46.42)
650 - 12(6.5)
2
xy - nxy
x
2
- nx
2
78
12
557
12
Least Squares Example
(cont.)
Linear trend line y = 35.2 + 1.72x
Forecast for period 13 y = 35.2 + 1.72(13) = 57.56 units
70
60
50
40
30
20
10
0
| | | | | | | | | | | | |
1 2 3 4 5 6 7 8 9 10 11 12 13
Actual
D
e
m
a
n
d
Period
Linear trend line
Seasonal Adjustments
Repetitive increase/ decrease in demand
Use seasonal factor to adjust forecast
Seasonal factor = S
i
=
D
i
D
Seasonal Adjustment (cont.)
2002 12.6 8.6 6.3 17.5 45.0
2003 14.1 10.3 7.5 18.2 50.1
2004 15.3 10.6 8.1 19.6 53.6
Total 42.0 29.5 21.9 55.3 148.7
DEMAND (1000S PER QUARTER)
YEAR 1 2 3 4 Total
S
1
= = = 0.28
D
1
D
42.0
148.7
S
2
= = = 0.20
D
2
D
29.5
148.7
S
4
= = = 0.37
D
4
D
55.3
148.7
S
3
= = = 0.15
D
3
D
21.9
148.7
Seasonal Adjustment (cont.)
SF
1
= (S
1
) (F
5
) = (0.28)(58.17) = 16.28
SF
2
= (S
2
) (F
5
) = (0.20)(58.17) = 11.63
SF
3
= (S
3
) (F
5
) = (0.15)(58.17) = 8.73
SF
4
= (S
4
) (F
5
) = (0.37)(58.17) = 21.53
y = 40.97 + 4.30x = 40.97 + 4.30(4) = 58.17
For 2005
Forecast Accuracy
Forecast error
difference between forecast and actual demand
MAD
mean absolute deviation
MAPD
mean absolute percent deviation
Cumulative error
Average error or bias
Mean Absolute Deviation
(MAD)
where
t = period number
D
t
= demand in period t
F
t
= forecast for period t
n = total number of periods
( ( = absolute value
E, D
t
- F
t
,
n
MAD =
MAD Example
1 37 37.00
2 40 37.00 3.00 3.00
3 41 37.90 3.10 3.10
4 37 38.83 -1.83 1.83
5 45 38.28 6.72 6.72
6 50 40.29 9.69 9.69
7 43 43.20 -0.20 0.20
8 47 43.14 3.86 3.86
9 56 44.30 11.70 11.70
10 52 47.81 4.19 4.19
11 55 49.06 5.94 5.94
12 54 50.84 3.15 3.15
557 49.31 53.39
PERIOD DEMAND, D
t
F
t
(o =0.3) (D
t
- F
t
) |D
t
- F
t
|
E, D
t
- F
t
,
n
MAD =
= 4.85
53.39
11
Other Accuracy Measures
Mean absolute percent deviation (MAPD)
MAPD =
|D
t
- F
t
|
D
t
Cumulative error
E = e
t
Average error
E =
e
t
n
Comparison of Forecasts
FORECAST MAD MAPD E (E)
Exponential smoothing (o = 0.30) 4.85 9.6% 49.31 4.48
Exponential smoothing (o = 0.50) 4.04 8.5% 33.21 3.02
Adjusted exponential smoothing 3.81 7.5% 21.14 1.92
(o = 0.50, | = 0.30)
Linear trend line 2.29 4.9%
Statistical Control Charts for
Forecast Error
o =
(D
t
- F
t
)
2
n - 1
Using o we can calculate statistical
control limits for the forecast error
Control limits are typically set at 3o
Statistical Control Charts
E
r
r
o
r
s
18.39
12.24
6.12
0
-6.12
-12.24
-18.39
| | | | | | | | | | | | |
0 1 2 3 4 5 6 7 8 9 10 11 12
Period
UCL = +3o
LCL = -3o
Linear Regression
y = a + bx
a = y - b x
b =
where
a = intercept
b = slope of the line
x = = mean of the x data
y = = mean of the y data
E xy - nxy
E x
2
- nx
2
E x
n
E y
n
Linear Regression Example
x y
(WINS) (ATTENDANCE) xy x
2
4 36.3 145.2 16
6 40.1 240.6 36
6 41.2 247.2 36
8 53.0 424.0 64
6 44.0 264.0 36
7 45.6 319.2 49
5 39.0 195.0 25
7 47.5 332.5 49
49 346.7 2167.7 311
Linear Regression Example (cont.)
x = = 6.125
y = = 43.36
b =
=
= 4.06
a = y - bx
= 43.36 - (4.06)(6.125)
= 18.46
49
8
346.9
8
xy - nxy
2
x
2
- nx
2
(2,167.7) - (8)(6.125)(43.36)
(311) - (8)(6.125)
2
| | | | | | | | | | |
0 1 2 3 4 5 6 7 8 9 10
60,000
50,000
40,000
30,000
20,000
10,000
Linear regression line,
y = 18.46 + 4.06x
Wins, x
A
t
t
e
n
d
a
n
c
e
,
y
Linear Regression Example (cont.)
y = 18.46 + 4.06x
y = 18.46 + 4.06(7)
= 46.88, or 46,880
Regression equation
Attendance forecast for 7 wins
Correlation and Coefficient of
Determination
Correlation, r
Measure of strength of relationship
Varies between -1.00 and +1.00
Coefficient of determination, r
2
Percentage of variation in dependent
variable resulting from changes in the
independent variable
Computing Correlation
n xy - x y
[n x
2
- ( x)
2
] [n y
2
- ( y)
2
]
r =
Coefficient of determination
r
2
= (0.947)
2
= 0.897
r =
(8)(2,167.7) - (49)(346.9)
[(8)(311) - (49
)2
] [(8)(15,224.7) - (346.9)
2
]
r = 0.947
Multiple Regression
Study the relationship of demand to two or
more independent variables
y = |
0
+ |
1
x
1
+ |
2
x
2
+ |
k
x
k
where
|
0
= the intercept
|
1
, , |
k
= parameters for the
independent variables
x
1
, , x
k
= independent variables
Forecasting Process
6. Check forecast
accuracy with one or
more measures
4. Select a forecast
model that seems
appropriate for data
5. Develop/compute
forecast for period of
historical data
8a. Forecast over
planning horizon
9. Adjust forecast based
on additional qualitative
information and insight
10. Monitor results
and measure forecast
accuracy
8b. Select new
forecast model or
adjust parameters of
existing model
7.
Is accuracy of
forecast
acceptable?
1. Identify the
purpose of forecast
3. Plot data and identify
patterns
2. Collect historical
data
No
Yes