Sunteți pe pagina 1din 55

ETZC 342

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

BITS Pilani, Pilani Campus

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

Ft +1 = forecast for next period


Dt = actual demand for present period
Ft = previously determined forecast for present period

= weighting factor, smoothing constant

BITS Pilani, Pilani Campus

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

Smoothing constant >0, <1


Forecast is old forecast plus a portion of the error of the
last forecast.

BITS Pilani, Pilani Campus

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.

EFFECT OF SMOOTHING CONSTANT


0.0 1.0
If = 0.20, then Ft +1 = 0.20Dt + 0.80 Ft
If = 0, then Ft +1 = 0Dt + 1 Ft 0 = Ft
Forecast does not reflect recent data
If = 1, then Ft +1 = 1Dt + 0 Ft =Dt
Forecast based only on most recent data

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
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

EXPONENTIAL SMOOTHING FORECASTS


70
60

Actual

Orders

50
40
30
20
10

|
1

|
2

|
3

|
4

|
5

|
6
Month

|
7

|
8

|
9

|
10

|
11

|
12

|
13

BITS Pilani, Pilani Campus

EXPONENTIAL SMOOTHING FORECASTS


70
60

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

BITS Pilani, Pilani Campus

EXPONENTIAL SMOOTHING FORECASTS


70
Actual
= 0.50

60

Orders

50
= 0.30

40
30
20
10

|
1

|
2

|
3

|
4

|
5

|
6
Month

|
7

|
8

|
9

|
10

|
11

|
12

|
13

BITS Pilani, Pilani Campus

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

BITS Pilani, Pilani Campus

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

ADJUSTED EXPONENTIAL SMOOTHING EXAMPLE


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

ADJUSTED EXPONENTIAL SMOOTHING EXAMPLE


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

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

AF3 = F3 + T3 = 38.5 + 0.45


= 38.95

BITS Pilani, Pilani Campus

ADJUSTED EXPONENTIAL SMOOTHING


EXAMPLE
PERIOD

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

ADJUSTED EXPONENTIAL SMOOTHING


FORECASTS
70
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

BITS Pilani, Pilani Campus

ADJUSTED EXPONENTIAL SMOOTHING


FORECASTS
70

Adjusted forecast ( = 0.30)

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

BITS Pilani, Pilani Campus

EVALUATING FORECASTS
How far off is the forecast?

Forecasts

Demands

What do we do with this information?


BITS Pilani, Pilani Campus

LINEAR TREND LINE


y = a + bx
where
a
b
x
y

=
=
=
=

intercept (at period 0)


slope of the line
the time period
forecast for demand for period x

BITS Pilani, Pilani Campus

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

LEAST SQUARES EXAMPLE


x(PERIOD)

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

LEAST SQUARES EXAMPLE


x(PERIOD)

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

BITS Pilani, Pilani Campus

BITS Pilani, Pilani Campus

LINEAR TREND LINE


70
60

Actual

Demand

50

40
30
20
10
0

|
1

|
2

|
3

|
4

|
5

|
|
6
7
Period

|
8

|
9

|
10

|
11

|
12

|
13

BITS Pilani, Pilani Campus

LINEAR TREND LINE


70
60

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

BITS Pilani, Pilani Campus

SEASONAL ADJUSTMENTS
Repetitive increase/ decrease in demand
Use seasonal factor to adjust forecast

Seasonal factor = Si =

Di
D

BITS Pilani, Pilani Campus

SEASONAL ADJUSTMENT

DEMAND (1000S PER QUARTER)


YEAR
1
2
3
4
Total
1999
2000
2001
Total

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

BITS Pilani, Pilani Campus

SEASONAL ADJUSTMENT

YEAR
1999
2000
2001
Total

DEMAND (1000S PER QUARTER)


1
2
3
4
Total
12.6
14.1
15.3
42.0

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

DEMAND (1000S PER QUARTER)


1
2
3
4
Total
12.6
14.1
15.3
42.0
0.28

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

BITS Pilani, Pilani Campus

SEASONAL ADJUSTMENT

YEAR
1999
2000
2001
Total
Si

DEMAND (1000S PER QUARTER)


1
2
3
4
Total
12.6
14.1
15.3
42.0
0.28

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

BITS Pilani, Pilani Campus

SEASONAL ADJUSTMENT

YEAR
1999
2000
2001
Total
Si

DEMAND (1000S PER QUARTER)


1
2
3
4
Total
12.6
14.1
15.3
42.0
0.28

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

SF1 = (S1) (F5)


= (0.28)(58.17) = 16.28

SF3 = (S3) (F5)


= (0.15)(58.17) = 8.73

SF2 = (S2) (F5)


= (0.20)(58.17) = 11.63

SF4 = (S4) (F5)


= (0.37)(58.17) = 21.53
BITS Pilani, Pilani Campus

FORECAST ACCURACY
Error = Actual - Forecast
Find a method which minimizes error
Mean Absolute
Deviation (MAD)
Mean Absolute
Percent Deviation (MAPD)
Cumulative Error (E)

BITS Pilani, Pilani Campus

MEAN ABSOLUTE DEVIATION (MAD)


Dt - Ft
MAD =
n
where
t = the period number
Dt = demand in period t
Ft = the forecast for period t
n = the total number of periods
= the absolute value

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

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

BITS Pilani, Pilani Campus

MAD EXAMPLE

BITS Pilani, Pilani Campus

TRACKING SIGNAL
Compute each period
Compare to control limits
Forecast is in control if within limits

Tracking signal =

(Dt - Ft)
E
=
MAD
MAD

Use control limits of +/- 2 to +/- 5 MAD


BITS Pilani, Pilani Campus

TRACKING SIGNAL VALUES


PERIOD

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

BITS Pilani, Pilani Campus

CAUSAL MODELING WITH LINEAR


REGRESSION
Study relationship between two or
more variables
Dependent variable y depends on
independent variable x
y = a + bx

BITS Pilani, Pilani Campus

LINEAR REGRESSION FORMULAS


a = y-bx
xy - nxy
b =
x2 - nx2
where
a = intercept (at period 0)
b = slope of the line

x
x =
= mean of the x data
n
y
y = n = mean of the y data
BITS Pilani, Pilani Campus

LINEAR REGRESSION EXAMPLE


x
(WINS)

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

BITS Pilani, Pilani Campus

LINEAR REGRESSION EXAMPLE

BITS Pilani, Pilani Campus

LINEAR REGRESSION EXAMPLE

BITS Pilani, Pilani Campus

LINEAR REGRESSION LINE


60,000
50,000

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

LINEAR REGRESSION LINE


60,000
50,000

Attendance, y

40,000
30,000

Linear regression line, y


= 18.46 + 4.06x

20,000
10,000
|
0

|
1

|
2

|
3

|
4

|
5

|
6

|
7

|
8

|
9

|
10

Wins, x
BITS Pilani, Pilani Campus

CORRELATION AND COEFFICIENT OF


DETERMINATION
Correlation, r
Measure of strength of relationship
Varies between -1.00 and +1.00

Coefficient of determination, r2
Percentage of variation in dependent variable
resulting from changes in the independent variable

BITS Pilani, Pilani Campus

COMPUTING CORRELATION
r=

r=

n xy - x y
[n x2 - ( x)2] [n y2 - ( y)2]
(8)(2,167.7) - (49)(346.9)

[(8)(311) - (49)2] [(8)(15,224.7) - (346.9)2]


r = 0.947

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

BITS Pilani, Pilani Campus

END OF LECTURE 7

BITS Pilani, Pilani Campus

S-ar putea să vă placă și