Documente Academic
Documente Profesional
Documente Cultură
MATERIALS MANAGEMENT
BITS Pilani
Pilani Campus
Anil Jindal
Department of Mechanical Engineering
BITS Pilani
Pilani Campus
CHAPTER--8
FORECASTING
LECTURE-7
Quantitative Methods
Time Series Methods
1. Simple Moving Average
2. Weighted Moving Average
3. Exponential Smoothing
Causal Methods
Linear Regression
EXPONENTIAL SMOOTHING
Exponential smoothing is actually a way of smoothing
out the data by eliminating much of the noise (random
effects).
Ft +1 = Dt + (1 - )Ft
where
EXPONENTIAL SMOOTHING
Ft 1 Dt (1 - )Ft Ft ( Dt Ft )
Ft Dt 1 1 Ft 1 Ft 1 Dt 1 Ft 1
Dt-1 Actual demand in period t-1
Ft-1 Forecast for period t-1
IN EXPONENTIAL SMOOTHING
The idea behind smoothing the data is to get a more realistic idea
about what is really going on.
The value of the smoothing constant, , is selected by the
modeler.
Higher values of allow the time series to be swayed quickly
by the most recent observation.
Lower values keep the smoothed time series flatter as not
that much weight will be given to the most recent
observation.
Usual values of are between about .1 and .7
See graphs for = .1 and = .7 later in this module.
The value (1-) is called the damping factor.
EXPONENTIAL SMOOTHING
PERIOD
MONTH
DEMAND
1
2
3
4
5
6
7
8
9
10
11
12
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
37
40
41
37
45
50
43
47
56
52
55
54
BITS Pilani, Pilani Campus
EXPONENTIAL SMOOTHING
PERIOD
MONTH
DEMAND
1
2
3
4
5
6
7
8
9
10
11
12
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
37
40
41
37
45
50
43
47
56
52
55
54
F2 = D1 + (1 - )F1
= (0.30)(37) + (0.70)(37)
= 37
F3 = D2 + (1 - )F2
= (0.30)(40) + (0.70)(37)
= 37.9
F13 = D12 + (1 )F12
= (0.30)(54) + (0.70)(50.84)
= 51.79
BITS Pilani, Pilani Campus
EXPONENTIAL SMOOTHING
PERIOD
1
2
3
4
5
6
7
8
9
10
11
12
MONTH
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
13
Jan
FORECAST, Ft + 1
DEMAND
( = 0.3)
37
40
37.00
41
37.90
37
38.83
45
38.28
50
40.29
43
43.20
47
43.14
56
44.30
52
47.81
55
49.06
54
50.84
51.79
BITS Pilani, Pilani Campus
EXPONENTIAL SMOOTHING
PERIOD
1
2
3
4
5
6
7
8
9
10
11
12
13
MONTH
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Jan
DEMAND
37
40
41
37
45
50
43
47
56
52
55
54
FORECAST, Ft + 1
( = 0.3)
( = 0.5)
37.00
37.00
37.90
38.50
38.83
39.75
38.28
38.37
40.29
41.68
43.20
45.84
43.14
44.42
44.30
45.71
47.81
50.85
49.06
51.42
50.84
53.21
51.79
53.61
BITS Pilani, Pilani Campus
Actual
Orders
50
40
30
20
10
|
1
|
2
|
3
|
4
|
5
|
6
Month
|
7
|
8
|
9
|
10
|
11
|
12
|
13
Actual
Orders
50
40
= 0.30
30
20
10
0
|
1
|
2
|
3
|
4
|
5
|
6
|
7
|
8
|
9
|
10
|
11
|
12
|
13
Month
Figure 8.3
60
Orders
50
= 0.30
40
30
20
10
|
1
|
2
|
3
|
4
|
5
|
6
Month
|
7
|
8
|
9
|
10
|
11
|
12
|
13
EXPONENTIAL SMOOTHING
Smoothing Constant between 0.1-0.3
Easier to compute than moving average
Most widely used forecasting method, because of its
easy use
If no trend, all do equally well
With trend, all do equally poorly
EXPONENTIAL SMOOTHING
Per Dem Simple3MA WMA Exp Sm
1 10
10.0
2 12
10
10.0
3 14
11
10.6
4 15
12 12.0 12.4
11.6
5 16 12.8 13.7 14.0
12.6
6 17 13.4
15 15.2
13.6
7 19
14
16 16.2
14.7
8 21 14.7 17.3 17.7
16.0
9 23 15.5
19 19.4
17.5
22
20
18
16
14
12
10
0
2
Dem
WMA
4
6
Simple
ES
8
3MA
10
=0.3
BITS Pilani, Pilani Campus
EXPONENTIAL SMOOTHING
Per Dem SimpleMov Wtd Exp Sm
1 10
10.0
2 12
10
10.0
3 14
11
11.0
4 15
12 12.0 12.4
12.5
5 16 12.8 13.7 14.0
13.8
6 17 13.4
15 15.2
14.9
7 19
14
16 16.2
15.9
8 21 14.7 17.3 17.7
17.5
9 23 15.5
19 19.4
19.2
22
20
18
16
14
12
10
0
Dem
2
4
Simple
6
Mov
8
Wtd
10
ES
=0.5
BITS Pilani, Pilani Campus
MONTH
DEMAND
1
2
3
4
5
6
7
8
9
10
11
12
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
37
40
41
37
45
50
43
47
56
52
55
54
BITS Pilani, Pilani Campus
MONTH
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
DEMAND
37
40
41
37
45
50
43
47
56
52
55
54
T3
= (F3 - F2) + (1 - ) T2
= (0.30)(38.5 - 37.0) + (0.70)(0)
= 0.45
MONTH
DEMAND
FORECAST
Ft +1
1
2
3
4
5
6
7
8
9
10
11
12
13
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Jan
37
40
41
37
45
50
43
47
56
52
55
54
37.00
37.00
38.50
39.75
38.37
38.37
45.84
44.42
45.71
50.85
51.42
53.21
53.61
TREND
Tt +1
ADJUSTED
FORECAST AFt +1
0.00
0.45
0.69
0.07
0.07
1.97
0.95
1.05
2.28
1.76
1.77
1.36
37.00
38.95
40.44
38.44
38.44
47.82
45.37
46.76
58.13
53.19
54.98
54.96
BITS Pilani, Pilani Campus
Actual
Demand
50
40
Forecast ( = 0.50)
30
20
10
0
|
1
|
2
|
3
|
4
|
5
|
|
6
7
Period
|
8
|
9
|
10
|
11
|
12
|
13
60
Actual
Demand
50
40
Forecast ( = 0.50)
30
20
10
0
|
1
|
2
|
3
|
4
|
5
|
|
6
7
Period
|
8
|
9
|
10
|
11
|
12
|
13
EVALUATING FORECASTS
How far off is the forecast?
Forecasts
Demands
=
=
=
=
CALCULATIONS
Least squares Method
xy - nxy
b = x2nx2
a = y-bx
where
n = number of periods
x
x = n = mean of the x values
y
y = n = mean of the y values
BITS Pilani, Pilani Campus
y(DEMAND)
1
2
3
4
5
6
7
8
9
10
11
12
73
40
41
37
45
50
43
47
56
52
55
54
78
557
Example 8.5
BITS Pilani, Pilani Campus
y(DEMAND)
xy
x2
1
2
3
4
5
6
7
8
9
10
11
12
37
40
41
37
45
50
43
47
56
52
55
54
37
80
123
148
225
300
301
376
504
520
605
648
1
4
9
16
25
36
49
64
81
100
121
144
78
557
3867
650
BITS Pilani, Pilani Campus
Actual
Demand
50
40
30
20
10
0
|
1
|
2
|
3
|
4
|
5
|
|
6
7
Period
|
8
|
9
|
10
|
11
|
12
|
13
Actual
Demand
50
40
Linear trend line
30
20
10
0
|
1
|
2
|
3
|
4
|
5
|
|
6
7
Period
|
8
|
9
|
10
|
11
|
12
|
13
SEASONAL ADJUSTMENTS
Repetitive increase/ decrease in demand
Use seasonal factor to adjust forecast
Seasonal factor = Si =
Di
D
SEASONAL ADJUSTMENT
12.6 8.6
14.1 10.3
15.3 10.6
42.0 29.5
6.3
7.5
8.1
21.9
17.5
18.2
19.6
55.3
45.0
50.1
53.6
148.7
SEASONAL ADJUSTMENT
YEAR
1999
2000
2001
Total
8.6
10.3
10.6
29.5
6.3
7.5
8.1
21.9
D1
42.0
S1 =
=
= 0.28
D
148.7
S2
D2
29.5
=
=
= 0.20
D
148.7
17.5
18.2
19.6
55.3
45.0
50.1
53.6
148.7
S3
D3
21.9
=
=
= 0.15
D
148.7
S4
D4
55.3
=
=
= 0.37
D
148.7
BITS Pilani, Pilani Campus
SEASONAL ADJUSTMENT
YEAR
1999
2000
2001
Total
Si
8.6
10.3
10.6
29.5
6.3
7.5
8.1
21.9
17.5
18.2
19.6
55.3
0.20
0.15
0.37
45.0
50.1
53.6
148.7
SEASONAL ADJUSTMENT
YEAR
1999
2000
2001
Total
Si
8.6
10.3
10.6
29.5
6.3
7.5
8.1
21.9
17.5
18.2
19.6
55.3
0.20
0.15
0.37
45.0
50.1
53.6
148.7
For 2002
y = 40.97 + 4.30x
= 40.97 + 4.30(4)
= 58.17
SEASONAL ADJUSTMENT
YEAR
1999
2000
2001
Total
Si
8.6
10.3
10.6
29.5
6.3
7.5
8.1
21.9
17.5
18.2
19.6
55.3
0.20
0.15
0.37
45.0
50.1
53.6
148.7
For 2002
y = 40.97 + 4.30x
= 40.97 + 4.30(4)
= 58.17
FORECAST ACCURACY
Error = Actual - Forecast
Find a method which minimizes error
Mean Absolute
Deviation (MAD)
Mean Absolute
Percent Deviation (MAPD)
Cumulative Error (E)
MAD EXAMPLE
PERIOD
1
2
3
4
5
6
7
8
9
10
11
12
DEMAND, Dt
37
40
41
37
45
50
43
47
56
52
55
54
Ft ( =0.3)
37.00
37.00
37.90
38.83
38.28
40.29
43.20
43.14
44.30
47.81
49.06
50.84
557
BITS Pilani, Pilani Campus
MAD EXAMPLE
PERIOD
1
2
3
4
5
6
7
8
9
10
11
12
DEMAND, Dt
37
40
41
37
45
50
43
47
56
52
55
54
557
Ft ( =0.3)
37.00
37.00
37.90
38.83
38.28
40.29
43.20
43.14
44.30
47.81
49.06
50.84
(Dt - Ft)
|Dt - Ft|
3.00
3.10
-1.83
6.72
9.69
-0.20
3.86
11.70
4.19
5.94
3.15
3.00
3.10
1.83
6.72
9.69
0.20
3.86
11.70
4.19
5.94
3.15
49.31
53.39
MAD EXAMPLE
TRACKING SIGNAL
Compute each period
Compare to control limits
Forecast is in control if within limits
Tracking signal =
(Dt - Ft)
E
=
MAD
MAD
DEMAND
Dt
FORECAST,
Ft
1
2
3
4
5
6
7
8
9
10
11
12
37
40
41
37
45
50
43
47
56
52
55
54
37.00
37.00
37.90
38.83
38.28
40.29
43.20
43.14
44.30
47.81
49.06
50.84
ERROR
Dt - Ft
3.00
3.10
-1.83
6.72
9.69
-0.20
3.86
11.70
4.19
5.94
3.15
E =
(Dt - Ft)
3.00
6.10
4.27
10.99
20.68
20.48
24.34
36.04
40.23
46.17
49.32
MAD
3.00
3.05
2.64
3.66
4.87
4.09
4.06
5.01
4.92
5.02
4.85
TRACKING
SIGNAL
1.00
2.00
1.62
3.00
4.25
5.01
6.00
7.19
8.18
9.20
10.17
x
x =
= mean of the x data
n
y
y = n = mean of the y data
BITS Pilani, Pilani Campus
y
(ATTENDANCE)
xy
x2
4
6
6
8
6
7
5
7
36.3
40.1
41.2
53.0
44.0
45.6
39.0
47.5
145.2
240.6
247.2
424.0
264.0
319.2
195.0
332.5
16
36
36
64
36
49
25
49
49
346.7
2167.7
311
Attendance, y
40,000
30,000
20,000
10,000
|
0
|
1
|
2
|
3
|
4
|
5
|
6
|
7
|
8
|
9
|
10
Wins, x
BITS Pilani, Pilani Campus
Attendance, y
40,000
30,000
20,000
10,000
|
0
|
1
|
2
|
3
|
4
|
5
|
6
|
7
|
8
|
9
|
10
Wins, x
BITS Pilani, Pilani Campus
Coefficient of determination, r2
Percentage of variation in dependent variable
resulting from changes in the independent variable
COMPUTING CORRELATION
r=
r=
n xy - x y
[n x2 - ( x)2] [n y2 - ( y)2]
(8)(2,167.7) - (49)(346.9)
Coefficient of determination
r2 = (0.947)2 = 0.897
BITS Pilani, Pilani Campus
MULTIPLE REGRESSION
Study the relationship of demand to two or more
independent variables
y = 0+ 1x1 + 2x2 + kxk
where
0 = the intercept
1,,k = parameters for the
independent variables
x1, , xk = independent variables
END OF LECTURE 7