CH 3
CH 3
CH 3
=
= =
1
i = An index that corresponds to time period
n = No. of period in the moving average
A
t
= Actual value in period t-i
MA = Moving average
F
t
= Forecast for time period t
For example, MA
3
implies a three period
moving average forecast,and MA
5
implies a
fiveperiod moving average forecast.
Example: Compute a 3-period moving
average forecast given demand for shopping
carts for the last five periods.
Period Demand
1 42
2 40
3 43
4 40
5 41
i = An index that corresponds to time period
n =3= No. of period in the moving average
A
i
= Actual value in period t-i
MA = Moving average
F
t
= Forecast for time period t
The moving average for period 6 is,
33 . 41
3
41 40 43
3
3
1
3 6
=
+ +
= = =
=
i
i t
A
MA F
the actual demand in period 6 turns out to be 38, the moving average forecast
for period 7 would be :
67 . 39
3
38 41 40
3
3
1
3 7
=
+ +
= = =
=
i
i t
A
MA F
Note: The more periods in a moving average, the greater the
forecast will lag changes in the data.
* This technique is easy to compute and easy to understand.
* A possible disadvantage is that all values in the average are
weighted equally. For example, in a 10-period moving average,
each value has weight of 1/10. Hence, the oldest value has the
same weight as the most recent value. Decreasing the number of
values in the average increases in weight of more recent values.
20
30
40
50
0 2 4 6 8 10
Period
D
e
m
a
n
d
A 3 and 5-period moving average forecast against actual demand
for 10 periods.
Example 2: Given the following data:
Period No. of
complaints
1 60
2 65
3 55
4 58
5 64
(i)Use naive approach to make the forecast for the
next period.
(ii)Compute a 3-period moving average forecast.
Weighted moving average:
A weighted average is similar to the
moving average, except that it
assigns more weight to the most
recent values in a time series. For
example, the most recent value
might be assigned a value of 0.4,
the next most recent value a weight
of 0.3, the next after that a weight
of 0.2, and the next after that a
weight of 0.1. Note that the sum of
the weights is 1.0.
The weighted moving average can be computed by the
following formula:
1 1 2 2 ) 2 ( 2 ) 1 ( 1
......
+ + + + =
t t n t n n t n n t n t
A w A w A w A w A w F
The advantage of a weighted average over a simple
moving average is that the weighted average is more
reflective of the most recent occurrences. However, the
choice of the weight is somewhat arbitrary and generally
involves the use of trial and error to find a suitable
weighting scheme.
Example 1: Given the demand for shopping
carts for the last five periods.
Period Demand
1 42
2 40
3 43
4 40
5 41
(a) Compute a weighted moving average forecast using a
weight of 0.4 for the most recent period, 0.3 for the next
most recent, 0.2 for the next, and the next after that a
weight of 0.1.
(b) If the actual demand for period 6 is 39, forecast demand
for period 7 using the same weights as in part (a).
Solution: (a)
0 . 41 41 * 4 . 0 40 * 3 . 0 43 * 2 . 0 40 * 1 . 0
......
1 1 2 2 3 3 4 4 6
1 1 2 2 ) 2 ( 2 ) 1 ( 1
= + + + =
+ + + =
+ + + + =
t t t t
t t n t n n t n n t n t
A w A w A w A w F
A w A w A w A w A w F
Solution: (b)
2 . 40 39 * 4 . 0 41 * 3 . 0 40 * 2 . 0 43 * 1 . 0
......
1 1 2 2 3 3 4 4 7
1 1 2 2 ) 2 ( 2 ) 1 ( 1
= + + + =
+ + + =
+ + + + =
t t t t
t t n t n n t n n t n t
A w A w A w A w F
A w A w A w A w A w F
Example 2: Given the following data:
Period No. of complaints
1 60
2 65
3 55
4 58
5 64
(a) Compute a weighted moving average forecast using a
weight of 0.4 for the most recent period, 0.3 for the next
most recent, 0.2 for the next, and the next after that a weight
of 0.1.
(b) If the actual demand for period 6 is 59, forecast demand
for period 7 using the same weights as in part (a).
Exponential smoothing:
Weighted averaging method based on previous forecast plus a
percentage of the forecast error.
It is sophisticated weighted average method that is still relatively easy to
use and understand.
Next forecast = Previous forecast +
o
(actual previous forecast)
That is,
( )
1 1 1
+ =
t t t t
F A F F o
= The smoothing constant = % of the error
= Actual value in the previous period
= Forecast for time period t
= Forecast for the previous time period
o
1 t
A
t
F
1 t
F
o
o
Commonly used value of
ranges from 0.05 to 0.5. Low values are used when the average tends to be stable. Higher values of
are used when the average is not stable.
Example 1: Given the following data:
Period No. of complaints
1 60
2 65
3 55
4 58
5 64
Use exponential smoothing approach with a smoothing constant of 0.4 to make the forecast for the next period.
Solution:
Period No. of complaints Forecast Calculations
1 60 60 is the initial forecast
2 65 60 60 + 0.4(65-60) = 62
3 55 62 62 + 0.4(55-62) = 59.2
4 58 59.2 59.2 + 0.4(58-59.2) = 58.72
5 64 58.72 58.72 + 0.4(64-58.72) = 60.83
6 60.83
Example 2: Given the demand for shopping carts
for the last five periods.
Period Demand
1 42
2 40
3 43
4 40
5 41
Use exponential smoothing approach with a
smoothing constant of 0.3 to make the forecast
for the next period.
Example: Cell phone for a firm over the last 10 weeks are shown as follows. Would a linear
trend line be appropriate? Determine the equation of the trend line and predict sales for weeks
11 and 12.
Week 1 2 3 4 5 6 7 8 9 10
Unit Sales 700 724 720 728 740 742 758 750 770 775
t y ty
1 700 700
2 724 1448
3 720 2160
4 728 2912
5 740 3700
6 742 4452
7 758 5306
8 750 6000
9 770 6930
10 775 7750
7407 41358
690
700
710
720
730
740
750
760
770
780
0 2 4 6 8 10
Weeks
S
a
l
e
s
This plot suggests that a linear trend is appropriate.
Given
385 , 55 , 10
2
= = =
t t n
( )
51 . 7
55 55 385 10
407 , 7 55 358 , 41 10
2
2
=
=
=
t t n
y t ty n
b
4 . 699
10
55 51 . 7 407 , 7
=
=
=
n
t b y
a
The trend line is
t t b a F
t
51 . 7 4 . 699 + = + =
where t = 0 for period 0.
The forecast for period 11 is
01 . 782 11 51 . 7 4 . 699
11
= + = + = t b a F
The forecast for period 12 is
52 . 789 12 51 . 7 4 . 699
11
= + = + = t b a F
690
700
710
720
730
740
750
760
770
780
790
800
-3 2 7 12
Weeks
S
a
l
e
s
Example2: Plot the following data on a graph and verify visually that a
linear trend line is appropriate. Develop a line trend equation. Then
use the equation to predict the next two values of the series.
Period 1 2 3 4 5 6 7 8 9
Demand 44 52 50 54 55 55 60 56 62
Associative forecasting techniques
The essence of associative techniques is the development
of an equation that summarizes the effects of predictor
variables (which is used to predict values of the variable of
interest). Linear regression method is used for this analysis.
Linear regression method
Technique for fitting a line to a set of points. The objective
in linear regression is to obtain an equation of a straight
line that minimizes the sum of squared vertical deviations
of data points from the line. The least squares line has the
equation
bx a y
c
+ =
bx a y
c
+ =
x A
y A
x
y
b
A
A
=
a x
y
x = predictor or independent variable
a= Value of at x = 0
b= Slope of the line
y
c
= Predicted or dependent variable
The line intersect the y axis where y = a.
The slope of the line is b.
The coefficients of the line a and b can be
computed from the formulas:
( )
2
2
=
x x n
y x xy n
b
and
x b y
n
x b y
a =
=
where n is the number of periods and y is the time
series.
Example: Healthy hamburger has a chain of 12 stores in California. Sales figures and profits for the
stores given below. Obtain a regression line for the data and predict for a store assuming sales of
$10 million.
Unit sales x $
million
7 2 6 4 14 15 16 12 14 20 15 7
Profit y
$ million
0.15 0.10 0.13 .15 .25 0.27 0.24 0.2 0.27 0.44 0.34 0.17
Solution:
Step1: Plot the data and decide if a linear model is reasonable.
x y Forecasts
7 .15 0.1621124
2 0.10 0.0824612
6 0.13 0.1461822
4 0.15 0.1143217
14 0.25 0.273624
15 0.27 0.2895543
16 0.24 0.3054845
12 0.20 0.2417636
14 0.27 0.273624
20 0.44 0.3692054
15 0.34 0.2895543
7 0.17 0.1621124
y
0
5
10
15
20
25
30
35
40
45
50
0 5 10 15 20 25
Step2:
( )
0159 . 0
132 132 1796 12
271 132 3529 12
2
2
=
=
=
x x n
y x xy n
b
0506 . 0
12
132 0159 . 0 271
=
=
=
n
x b y
a
Obtain the regression
x y
c
0159 . 0 0506 . 0 + =
For example, for sale of x = 7, estimated profit is
1621124 . 0 7 0159 . 0 0506 . 0 = + =
c
y
or $162,1124
Example: The owner of a hardware store has noted a sales pattern for window locks that
seems to be parallel the number of break-ins reported each week in the newspaper. The
data are:
sales 46 18 20 22 27 34 14 37 30
Break-ins 3 3 3 5 4 7 2 6 4
a. Plot the data to see the type of the graph
b. Obtain a regression equation for the data.
c. Estimate sales when the number of break-ins is 5.
Variations around the line are random.
Deviations around the line should be narrowly
distributed.
Predictions are made within the range of the
observed values.
Forecasting accuracy is a significant factor when deciding among forecasting
alternatives. Accuracy is based on the historical error performance of a forecast.
Three common methods for measuring historical errors are:
(i) Mean absolute deviation (MAD): Average absolute error. MAD =
n
F A
t t
(ii) Mean squared error (MSE): Average of squared errors. MSE =
( )
1
2
n
F A
t t
(iii) Mean absolute percent error (MAPE): Average absolute percent error.
MAPE =
n
A
F A
t
t t
% 100
Error
2
Error ( ) 100 Actual Error Period Actual Forecast Error (A-F)
1 217 215 2 2 4 0.92%
2 213 216 -3 3 9 1.41
3 216 215 1 1 1 0.46
4 210 214 -4 4 16 1.9
5 213 211 2 2 4 0.94
6 219 214 5 5 25 2.28
7 216 217 -1 1 1 0.46
8 212 216 -4 4 16 1.89
-2 22 76 10.26%
(i) Mean absolute deviation (MAD) =
75 . 2
8
22
= =
n
F A
t t
(ii) Mean squared error (MSE) =
( )
86 . 10
1 8
76
1
2
=
n
F A
t t
(iii) Mean absolute percent error (MAPE) =
% 28 . 1
8
% 26 . 10
% 100
= =
n
A
F A
t
t t
Month Demand Forecast
Technique 1 Technique 2
1 492 488 495
2 470 484 482
3 485 480 478
4 493 490 488
5 498 497 492
6 492 493 493