Chapter Two

advertisement
Chapter 2 and 3
Forecasting
Advanced Forecasting
Operations Analysis
Using MS Excel
1
Forecasting
Forecasting is the process of extrapolating the past
into the future
Forecasting is something that organization have to
do if they are to plan for future. Many forecasts
attempt to use past data in order to identify short,
medium or long term trends, and to use these
patterns to project the current position into the
future.
Backcasting: method of evaluating forecasting
techniques by applying them to historical data and
comparing the forecast to the actual data.
2
Demand Forecast A Deviation A
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Jan
11.8
6.3
9.5
5.3
10.1
7
11.3
7.3
9.5
5
10.7
6
7.1
11.8
6.3
9.5
5.3
10.1
7
11.3
7.3
9.5
5
10.7
6
4.7
5.5
3.2
4.2
4.8
3.1
4.3
4
2.2
4.5
5.7
4.7
6
7
6
Deviations
5
4
3
2
1
0
Jan
Feb Mar
Apr May Jun
Jul
Aug Sep Oct
Nov Dec
Jan
3
Forecasting
Why Forecasting?
Some Characteristics of Forecasts
– Forecasts are seldom (hardly) perfect
– Product family and aggregated forecasts are more
accurate than individual product forecasts
Assumptions of Forecasting Models
– Information (data) about the past should be available
– The pattern of the past will continue into the future
4
Steps to Forecasting
• Starts with gathering and recording information about the
situation.
• Enter the data into a worksheet or any other business
analysis tool
• Creation of graphs
• Examine the data and the graphs visually to get some
understanding of the situation (judgmental phase)
• Developing hypotheses and models
• Try for alternative forecasting approaches and do ‘whatif’ analysis to check if the resulting forecast fits the data
5
Evaluation of Forecasting Model
To judge how well a forecasting model fit the past
observation, both precision and bias must be
considered.
Measuring the precision of a forecasting model:
There are three possible measures used to evaluate
precision of forecasting systems, each of them is
based on the error or deviation between the
forecasted and actual values: MAD, MSE, MAPE
6
Evaluation of Forecasting Model
Mean Absolute Deviation - MAD
No direct Excel function to calculate MAD
Excel: =ABS(AVERAGE (error range))
Period
Demand Forecast
1
2
3
4
33
37
32
35
36
29
41
30
Absolute
deviation
3
8
9
5
6.25
ABS(C2-B2)
ABS(C3-B4)
ABS(C4-B4)
ABS(C5-B4)
AVERAGE(E2:E5)
7
Evaluation of Forecasting Model
Mean Square Error - MSE
Excel: =SQRT(SUM(error range)/COUNT(error
range))
Period
Demand Forecast
1
2
3
4
33
37
32
35
-----------------------
36
29
41
30
Squared
Deviation
9
64
81
25
6.68954
(C2-B2)^2
(C3-B3)^2
(C4-B4)^2
(C5-B5)^2
SQRT(AVERAGE(E2:E5))
Student activity -------------------------8
Evaluation of Forecasting Model
Mean Absolute Percentage Error - MAPE
Period Demand Forecast
1
2
3
4
33
37
32
35
-----------------------
36
29
41
30
Squared
Deviation
9.09%
21.62%
28.13%
14.29%
18.28%
ABS((C2-B2)/B2)
ABS((C3-B3)/B3)
ABS((C4-B4)/B4)
ABS((C5-B5)/B5)
AVERAGE(E2:E5)
Student activity --------------------------
9
Which of the measure of forecast
accuracy should be used?
 The most popular measures are MAD and MSE.
 The problem with the MAD is that it varies according
to how big the number are.
 MSE is preferred because it is supported by theory, and
because of its computational efficiency.
 MAPE is not often used.
 In general, the lower the error measure (BIAS, MAD,
MSE) or the higher the R2, the better the forecasting
model
10
Good Fit – Bad Forecast
As it was discussed previously that neither MAD
nor MSE gives an accurate indication of the validity
of a forecast model. Thus, judgment must be used.
Raw data sample should always be subjected to
managerial judgment and analysis before formal
quantitative techniques can be applied.
11
a- Outlier
Outlier may result from simple data entry errors. or sometime
the data may be correct but can be considered as atypical
observed values.
Outlier may occur for example in time periods when the
product was just introduced or about to be phased out.
So experienced analyst are well aware that raw data sample
may not be clear.
Demand data with an outlier
100
90
80
P
70
60
50
40
30
20
10
0
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Jan
Feb
12
b- Causal data adjustment
Cause-and-effect relationships should be examined before applying
any quantitative analysis on the historical data sample.
Examples of causes that may affect the patterns in data sample :
1- The data sample before a particular year may not be applicable
because:
- Economic conditions have changed
- The product line was changed
2- Data for a particular year may not be applicable because:
- There was an extraordinary marketing effort
- A natural disaster prevented demand from occurring
13
c- Illusory (misleading) patterns
The meaning of a “good fit” is subjective to the
manager’s interpretation of the forecasting model.
So before a forecast is accepted for action,
quantitative techniques must be augmented by such
judgmental approaches as decision conferencing and
expert consultations.
14
To prepare a valid forecast, the following factors
that influence the forecasting model should be
examined:
-
Company actions
-
Competitors actions
-
Industry demand
-
Market share
-
Company sales
-
Company costs
-
Environmental factors
15
Forecasting Approaches
1- Qualitative Forecasting
Forecasting based on experience, judgment, and
knowledge. Used when situation is vague and little
data exists. Example: new products and new
technology
2- Quantitative Forecasting
Forecasting based on data and models. Used when
situation is ‘stable’ and historical data exist. Example:
existing product, current technology
16
Forecasting Approaches
Judgmental/Qualitative
Market survey
Quantitative models
Time Series
Causal
Expert opinion
Decision conferencing
Data cleaning
Moving average
Exponential smoothing
Regression
Curve fitting
Trend projection
Econometric
Data adjustment
Seasonal indexes
Environmental factors
17
Quantitative Forecasting
Time Series Models:
Sales1999
Sales1998
Sales1997
……
Time Series
Model
Year 2000
Sales
Casual Models:
Price
Population
Advertising
……
Causal
Model
Year 2000
Sales
18
Time Series Forecasting
Is based on the hypothesis that the future can be
predicted by analyzing historical data samples.
– Assumes that factors influencing past and present will
continue influence in future.
– Obtained by observing response variable at regular
time periods.
19
Time series model
The Time series model can be also classified as
Forecasting directly from the data value
•
Moving average
•
Weighted moving average
•
Exponential smoothing
Forecasting by identifying patterns in the past
•
Trend projection
•
Seasonal influences
•
Cyclical influences
20
Forecasting directly from the data value
1- Moving Average Method
- The forecast is the mean of the last n observation. The
choice of n is up to the manager making the forecast
- If n is too large then the forecast is slow to respond to
change
- If n is too small then the forecast will be over-influenced by
chance variations
-This approach can be used where a large number of
forecasting needed to be made quickly, for example in a
stock control system where next week’s demand for every
item needs to be forecast
21
Month
Oct
Nov
Dec
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Jan
Demand
12
10
8
6
4
2
0
1
6
5
5
1.63
1.95
7.5
2.49
6.18
9.18
5.24
8.3
2.72
7.43
7.49
9.58
2
3
8.02
Moving
Average
Forecast
5.33 AVERAGE(B3:B5)
3.88 AVERAGE(B4:B6)
2.86 AVERAGE(B5:B7)
3.69 AVERAGE(B6:B8)
3.98 AVERAGE(B7:B9)
5.39
=
5.95
=
Demand
6.87
=
7.57
=
5.42
=
6.15
=
Forecast
4
5
6
7 5.88
8
9
10= 11 12 13 14 15
8.17
=
16
17
22
Longer-period moving averages (larger n) react to actual
changes more slowly
-----------------------
Student activity -------------------------23
2- Weighted Moving Average
When using a moving average method described before, each
of the observations used to compute the forecasted value is
weighted equally.
In certain cases, it might be beneficial to put more weight on
the observations that are closer to the time period being
forecast. When this is done, this is known as a weighted
moving average technique. The weights in a weighted MA
must sum to 1.
Weighted MA(3) = Ft+1 = wt1(Dt) + wt2(Dt-1) + wt3(Dt-2)
-----------------------
Student activity -------------------------24
2- Weighted Moving Average
n=3
F4 = ((w1* d1)+(w2 * d2)+ (w3 * d3))/(w1 + w2 + w3)
Where w1, w2, w3 are weights and d1, d2 & d3 are
demands.
Many books on forecasting state that the sum of weights
(w1+w2+w3) must be equal to 1.
-----------------------
Student activity --------------------------
25
3- Exponential Smoothing
• The exponential smoothing techniques gives weight to all past
observations, in such a way that the most recent observation
has the most influence on the forecast, and the older
observation always has the less influence on the forecast.
• It is only necessary to store two values the last actual
observation and the last forecast.
• Smoothing constant () is the proportion of the difference
between the actual value and the forecast.
• The value of the smoothing constant () is needed to be
included in the model in order to make the next period’s
forecast.
Exponential Smoothing can be calculated
using the following formula:
F2 = *D1 +(1- )*F1
26
3- Exponential Smoothing
• Smoothing constant () must set between 0 and 1. Normally
the value of the smoothing constant is chosen to lie in the
range 0.1 to 0.3.
• Typically, a value closer to 0 is used for forecasting demand
that is changing slowly, however, value closer to 1 is used for
forecasting demand that is changing more rapidly.
• There is no way to calculate F1 because each forecast is based
on the previous forecasts.
27
3- Exponential Smoothing
How to select smoothing constant 
• Sensitivity analysis is an analysis used to test how
sensitive the the forecast is to the change in alpha or
smoothing constant.
• A general rule for selecting alpha is to perform scenario
analysis and pick the value that produces a reasonable
value for the MAD and a forecast that is reasonably close
to the actual demand.
28
4- Trend – Adjusted Exponential Smoothing
With trend-adjusted exponential smoothing, the trend is calculated and
included in the forecast. This allows the forecast to be smoothed
without losing the trend.
Trend-adjusted exponential smoothing requires two parameters: the
alpha value used by exponential smoothing and the beta value used to
control how the trend component enters the model. Both values must
be between 0 and 1.
Fit1= F1 + T1
The formula to calculate the forecast component is :
F2 = Fit1+ *(D1-Fit1)
The formula to calculate the trend component is
T2 = T1 +  *  *(D1-Fit1)
29
Alpha =
Period
.
Forecast
Including
Demand
Trend
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Beta=
Forecast
.
.
.
.
.
.
.
.
.
.
.
.
.
.
120
.
.
100
.
.80
.60
.
Trend
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
40
20
0
Demand
Forecast
1
-----------------------
.
3
5
7
9
11
13
15
17
19
Student activity -------------------------30
Time series data are usually considered to consist of six component :
1. Average demand: is simply the long-term mean demand
2. Trend component : long term overall up or down movement. Changes due
to population, technology, age, culture, etc. Typically several years duration.
3. Autocorrelation: is simply a statement that demand next period is related
to demand this period
4. Seasonal component: periodic pattern of up and down fluctuations
repeating every year. It is that portion of demand that follows a short-term
pattern. Occurs within a single year
5. Cyclical component: is much like the seasonal component, only its period
is much longer. Affected by business cycle, political, and economic factors.
6. Random component: random movements that follow no pattern. Due to
unforeseen events. Short duration and non-repeating
31
Components of A Time Series Model
Cycle
Trend
Random
movement
Time
Seasonal
pattern
Time
Demand
Time
Trend with
seasonal pattern
Time
32
Forecasting by identifying patterns in the past
Cyclical and Seasonal Issues
Seasonal Decomposition of Time Series Data
There are two types of seasonal variation:
Additive seasonal variation :
Occurs when the seasonal effects are the same regardless of
the trend.
Multiplication seasonal variation :
Occurs when the seasonal effects vary with the trend effects.
It’s the most common type of seasonal variation
33
Cyclical and Seasonal Issues
Computing Multiplicative Seasonal Indices
1.
Computing seasonal indices requires data that match the seasonal
period. If the seasonal period is monthly, then monthly data are
required. A quarterly seasonal period requires quarterly data.
2.
Calculate the centered moving averages (CMAs) whose length matches
the seasonal cycle. The seasonal cycle is the time required for one cycle
to be completed. Quarterly seasonality requires a 4-period moving
average, monthly seasonality requires a 12-period moving average and
so on.
3.
Determine the Seasonal-Irregular Factors or components. This can be
done by dividing the raw data by the corresponding depersonalized
value.
4.
Determine the average seasonal factors. In this step the random and
cyclical components will be eliminated by averaging them.
5.
Estimate next year’s total demand
6.
Divide this estimate of total demand by the number of seasons, then
34
multiply it by the seasonal index for that season
Cyclical and Seasonal Issues
Computing Multiplicative Seasonal Indices
Step 1
Quarter
1
2
3
4
1
2
3
4
1
2
3
4
1
2
3
4
1
2
3
4
1
2
3
4
Seasonal
Four Period
Irregular
Data Moving Average Component
560
990
1,100
0.90000
1,740
1,120
1.55357
1,110
1,088
1.02069
640
1,133
0.56512
860
1,080
0.79630
1,920
1,090
1.76147
900
1,150
0.78261
680
1,163
0.58495
1,100
1,190
0.92437
1,970
1,198
1.64509
1,010
1,198
0.84342
710
1,263
0.56238
1,100
1,313
0.83810
2,230
1,275
1.74902
1,210
1,363
0.88807
560
1,393
0.40215
1,450
1,475
0.98305
2,350
1,573
1.49444
1,540
1,525
1.00984
950
1,648
0.57663
1,260
1,575
0.80000
2,840
1,250
Seasonal
Index
0.87364
1.64072
0.90893
0.53825
Step 4
=AVERAGE(D3,D7,D11,D15,D19,D23)
=AVERAGE(D4,D8,D12,D16,D20)
=AVERAGE(D5,D9,D13,D17,D21)
=AVERAGE(D6,D10,D14,D18,D22)
Step 2
= AVERAGE(B2:B5)
Step 3
= B3/C3
35
Cyclical and Seasonal Issues
Using Seasonal Indices to Forecast
To forecast using seasonal indices
1- Compute the forecast using annual values. Any forecasting techniques can
be used.
2- Use the seasonal indices to share out the annual forecast by periods
Year
1
2
3
4
5
6
7
7
Data
4,400
4,320
4,760
5,250
5,900
6,300
6,754
Forecast
Including
Trend Forecast
4,125
4,000
4,498
4,290
4,545
4,391
4,893
4,674
5,433
5,107
6,179
5,713
6,754
6,252
1
912
2
1469
3
2769
4
1537
Trend
125
208
154
219
326
466
502
MAD
275
178
215
357
467
121
Q1
Q2
Q3
Q4
Alpha
Delta
MAD
0.54
0.87
1.64
0.91
0.6
0.5
269
36
Cause-and-Effect Relationships
-
Causal forecasting seeks to identify specific cause-effect relationships
that will influence the pattern of future data. Causes appear as
independent variables, and effects as dependent, response variables in
forecasting models.
Independent variable
Dependent, response variable
Price
demand
Decrease in population
decrease in demand
Number of teenager
demand for jeans
-
Causal relationships exist even when there is no specific time series
aspect involved.
-
The most common technique used in causal modeling is least squares
regression.
37
Linear Trend analysis
D
It is noticed from
this figure that
there is a growth
trend influencing
the demand, which
should be
extrapolated into
the future.
D
D
P =
P =
D
D
D
38
Linear Trend analysis
The linear trend model or sloping line rather than horizontal line.
The forecasting equation for the linear trend model is
Y = +X
or
Y = a + bX
Where X is the time index (independent variable). The
parameters alpha and beta ( a and b) (the “intercept” and “slope”
of the trend line) are usually estimated via a simple regression in
which Y is the dependent variable and the time index t is the
independent variable.
39
Linear Trend analysis
Forecasting using three data items
Current
Intercept:
Current
Slope:
42
8
Period Demand
1
50
2
60
3
64
Sums of
Squares:
MSE:
Using a data table (what if analysis )
to determine the best-fitting straight
line with the lowest MSE
Straight Line Squared
Forecast Deviaton
50
0
58
4
66
4
8
1.63
Table of MSE
Slope
Intercept
1.632993
38
40
42
44
46
48
50
52
4
12.33
10.39
8.49
6.63
4.90
3.46
2.83
3.46
5
10.23
8.29
6.38
4.55
2.94
2.16
2.94
4.55
6
8.16
6.22
4.32
2.58
1.63
2.58
4.32
6.22
7
6.16
4.24
2.45
1.41
2.45
4.24
6.16
8.12
8
4.32
2.58
1.63
2.58
4.32
6.22
8.16
10.13
9
2.94
2.16
2.94
4.55
6.38
8.29
10.23
12.19
10
2.83
3.46
4.90
6.63
8.49
10.39
12.33
14.28
40
Linear Trend analysis
Simple Linear Regression Analysis
Regression analysis is a statistical method of taking one or more
variable called independent or predictor variable- and developing
a mathematical equation that show how they relate to the value
of a single variable- called the dependent variable.
Regression analysis applies least-squares analysis to find the bestfitting line, where best is defined as minimizing the mean square
error (MSE) between the historical sample and the calculated
forecast.
Regression analysis is one of the tools provided by Excel.
41
Simple Linear Regression Analysis
Quarters
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
1
4
9
16
25
36
49
64
81
100
121
144
169
196
225
256
289
324
361
400
441
484
529
576
Demand
3.47
3.12
3.97
4.50
4.06
6.90
3.60
6.47
4.27
5.24
6.39
5.45
5.88
8.99
4.12
6.68
9.44
7.75
9.91
9.14
14.25
14.89
14.22
15.56
SUMMARY OUTPUT
Regression Statistics
Multiple R
R Square
Adjusted R Square
Standard Error
Observations
0.866
0.749
0.738
1.986
24
ANOVA
df
Regression
Residual
Total
Intercept
Quarters
Slope
1
22
23
SS
MS
259.031 259.031
86.750 3.943
345.782
F
Significance F
65.691
0.000
Coefficients Standard Error t Stat P-value
1.495
0.837 1.787
0.088
0.475
0.059 8.105
0.000
Lower 95% Upper 95%
-0.240
3.231
0.353
0.596
Intercept
42
Quarters Demand
1
3.47
2
3.12
3
3.97
4
4.50
5
4.06
6
6.90
7
3.60
8
6.47
9
4.27
10
5.24
11
6.39
12
5.45
13
5.88
14
8.99
15
4.12
16
6.68
17
9.44
18
7.75
19
9.91
20
9.14
21
14.25
22
14.89
23
14.22
24
15.56
25
26
27
28
Fitted
Demand Difference
1.97
2.24
2.45
0.45
2.92
1.11
3.40
1.23
3.87
0.04
4.35
6.54
4.82
1.48
5.30
1.39
5.77
2.26
6.25
1.01
6.72
0.11
7.20
3.03
7.67
3.22
8.15
0.71
8.62
20.25
9.10
5.83
9.57
0.02
10.05
5.26
10.52
0.38
11.00
3.45
11.47
7.74
11.95
8.70
12.42
3.24
12.90
7.09
13.37
13.85
14.32
14.80
Intercept
Slope
MSE
1.495
0.475
1.901
20.00
15.00
10.00
5.00
0.00
1
5
9
13
17
21
25
43
Linear Trend analysis
Multiple Linear Regression Analysis
Simple linear regression analysis use one variable
(quarter number) as the independent variable in order to
predict the future value. In many situations, it is
advantageous to use more than one independent variable
in a forecast.
44
Multiple Linear Regression Analysis
Hours
Before
Breakdown
205
236
260
176
245
123
176
150
148
265
200
45
110
216
176
90
176
112
230
280
Age
59
48
25
39
20
66
40
62
70
20
52
75
75
25
63
75
69
65
30
23
Number of
Computer
Controls
1
1
0
0
1
2
0
0
0
0
1
0
0
0
1
0
2
0
0
1
Two factors that control the
frequency of breakdown. So they
are the independent variables.
Y = a + bX1 + cX2
Intercept
Slope 1
Slope2
45
Multiple Linear Regression Analysis
SUMMARY OUTPUT
Regression Statistics
Multiple R
R Square
Adjusted R Square
Standard Error
Observations
0.905
0.818
0.797
28.651
20
ANOVA
df
Regression
Residual
Total
2
17
19
SS
MS
62,920.044 31,460.022
13,954.906
820.877
76,874.950
Coefficients Standard Error
Intercept
308.451
17.552
Age
-2.800
0.325
No of Computer Controls
25.232
9.631
Intercept
F
Significance F
38.325
0.000
t Stat
P-value Lower 95% Upper 95%
17.573
0.000
271.419
345.484
-8.622
0.000
-3.485
-2.115
2.620
0.018
4.912
45.551
Slope 1
Slope 2
46
Hours
Before
Breakdown
205
236
260
176
245
123
176
150
148
265
200
45
110
216
176
90
176
112
230
280
Age
59
48
25
39
20
66
40
62
70
20
52
75
75
25
63
75
69
65
30
23
Number of
Computer
Controls
1
1
0
0
1
2
0
0
0
0
1
0
0
0
1
0
2
0
0
1
Hours to
Breakdown Difference
169
1332
199
1347
238
464
199
541
278
1069
174
2616
196
419
135
229
112
1261
252
157
188
141
98
2861
98
133
238
505
157
349
98
72
166
105
126
210
224
31
269
115
Intercept
Age
No of Computer Controls
MSE
308.451
-2.800
25.232
26.41487
300
250
200
150
100
50
0
1
2
3
4
5
6
7
8
9
10 11 12
13 14 15 16
17 18 19 20
47
Linear Trend analysis
Quadratic Regression Analysis
Quadratic regression analysis fits a second-order curve of the
form
Y = a + bX + cX2
Quadratic regression is prepared by adding the squared value
of the time periods. The coefficients in the quadratic formula
are calculated again using regression, where time periods and
the squared time periods are the independent variables and
the demand remains the dependent variable.
48
Quadratic Regression Analysis
SUMMARY OUTPUT
Regression Statistics
Multiple R
R Square
Adjusted R Square
Standard Error
Observations
0.927
0.859
0.846
1.524
24
ANOVA
df
Regression
Residual
Total
Intercept
Quarters
Quarters Squared
2
21
23
MS
SS
297.037 148.518
48.745 2.321
345.782
Significance F
F
0.000
63.984
Coefficients Standard Error t Stat P-value
0.000
1.017 4.609
4.685
0.178
0.187 -1.395
-0.261
0.001
0.007 4.046
0.029
Lower 95% Upper 95% Upper 95.0%
6.799
6.799
2.571
0.128
0.128
-0.651
0.045
0.045
0.014
49
Quadratic Regression Analysis
Intercept
Slope 1
Slope 2
MSE
3.500
0.000
0.019
1.494
20.00
Forecast
15.00
10.00
5.00
28
25
22
16
13
10
7
19
Demand
0.00
4
Demand
3.47
3.12
3.97
4.50
4.06
6.90
3.60
6.47
4.27
5.24
6.39
5.45
5.88
8.99
4.12
6.68
9.44
7.75
9.91
9.14
14.25
14.89
14.22
15.56
Fitted
Demand Difference
3.52
0.00
3.58
0.21
3.67
0.09
3.80
0.49
3.98
0.01
4.18
7.39
4.43
0.69
4.72
3.09
5.04
0.60
5.40
0.03
5.80
0.35
6.24
0.61
6.71
0.70
7.22
3.10
7.78
13.36
8.36
2.83
8.99
0.20
9.66
3.63
10.36
0.20
11.10
3.85
11.88
5.63
12.70
4.83
13.55
0.45
14.44
1.24
15.38
16.34
17.35
18.40
1
Quarters
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Quarters
Squared
1
4
9
16
25
36
49
64
81
100
121
144
169
196
225
256
289
324
361
400
441
484
529
576
625
676
729
784
50
Download