You are on page 1of 25

3-1 Forecasting

Weighted Moving Average Formula

The
The formula
formula for
for the
the moving
moving average
average is:
is:

FFt t == w
w11A
At-1 + w A t-2 ++ w
t-1 + w22 At-2 w33A
At-3 +...+w A t-n
t-3 +...+wnn At-n

nn
wwt ==weight
weightgiven
givento
totime
timeperiod
period“t”
t
occurrence
occurrence(weights
(weightsmust
mustadd
addto
“t”
toone)
one)

ww ==11
i=1
ii
i=1
3-2 Forecasting

Weighted Moving Average Problem (1)


Data
Question:
Question:Given
Giventhetheweekly
weeklydemand
demandand
andweights,
weights,what
whatisis
the
theforecast
forecastfor
forthe
the44thperiod
th
periodor
orWeek
Week4?
4?

Week Demand Weights:


1 650
2 678 t-1 .5
3 720 t-2 .3
4 t-3 .2
3-3 Forecasting

Weighted Moving Average Problem (1)


Solution

Week Demand Forecast


1 650
2 678
3 720
4 693.4

F4 = 0.5(720)+0.3(678)+0.2(650)=693.4
3-4 Forecasting

Weighted Moving Average Problem (2)


Data

Question:
Question:Given
Giventhe theweekly
weeklydemand
demandinformation
informationand
and
weights,
weights,what
whatisisthe
theweighted
weightedmoving
movingaverage
averageforecast
forecast
of
ofthe
the55thperiod
th
periodor orweek?
week?

Week Demand Weights:


1 820 t-1 0.7
2 775 t-2 0.2
3 680
t-3 0.1
4 655
3-5 Forecasting

Weighted Moving Average Problem (2)


Solution

Week Demand Forecast


1 820
2 775
3 680
4 655
5 672

F5 = (0.1)(755)+(0.2)(680)+(0.7)(655)= 672
3-6 Forecasting

Exponential Smoothing Model

FFtt == FFt-1
t-1
+
+ (A
(A t-1
t-1
-
- F
F )
t-1)
t-1
Where :
Ft  Forcast value for the coming t time period
Ft - 1  Forecast value in 1 past time period
At - 1  Actual occurance in the past t tim e period
  Alpha smoothing constant
3-7 Forecasting

Exponential Smoothing Problem (1) Data


Question:
Question: Given
Given thethe weekly
weekly
Week Demand demand
demand data,
data, what
what are
are the
the
1 820 exponential
exponential smoothing
smoothing
2 775 forecasts
forecasts for
for periods
periods 2-10
2-10
3 680 using =0.10
using =0.10 andand =0.60?
=0.60?
4 655 Assume
Assume FF11=D
=D11
5 750
6 802
7 798
8 689
9 775
10
3-8 Forecasting

Week Demand 0.1 0.6


1 820 820.00 820.00
2 775 820.00 820.00
3 680 815.50 820.00
4 655 801.95 817.30
5 750 787.26 808.09
6 802 783.53 795.59
7 798 785.38 788.35
8 689 786.64 786.57
9 775 776.88 786.61
10 776.69 780.77
3-9 Forecasting

Exponential Smoothing Problem (1)


Plotting

900
800 Demand
Demand

700 0.1
600 0.6
500
1 2 3 4 5 6 7 8 9 10
Week
3-10 Forecasting

Exponential Smoothing Problem (2) Data

Question:
Question: What
What are
are the
the
Week Demand
exponential
exponential smoothing
smoothing
1 820
forecasts
forecasts for
for periods
periods 2-5
2-5
2 775 using Alpha =0.5?
using Alpha =0.5?
3 680
4 655
5 Assume
Assume FF11=D
=D11
3-11 Forecasting

Exponential Smoothing Problem (2)


Solution
F1=820+(0.5)(820-820)=820 F3=820+(0.5)(775-820)=797.75

Week Demand 0.5


1 820 820.00
2 775 820.00
3 680 797.50
4 655 738.75
5 696.88
3-12 Forecasting

Example 3 - Exponential Smoothing

Period Actual Alpha = 0.1 Error Alpha = 0.4 Error


1 42
2 40 42 -2.00 42 -2
3 43 41.8 1.20 41.2 1.8
4 40 41.92 -1.92 41.92 -1.92
5 41 41.73 -0.73 41.15 -0.15
6 39 41.66 -2.66 41.09 -2.09
7 46 41.39 4.61 40.25 5.75
8 44 41.85 2.15 42.55 1.45
9 45 42.07 2.93 43.13 1.87
10 38 42.36 -4.36 43.88 -5.88
11 40 41.92 -1.92 41.53 -1.53
12 41.73 40.92
3-13 Forecasting

Common Nonlinear Trends


Figure 3.5

Parabolic

Exponential

Growth
3-14 Forecasting

Common Nonlinear Trends


Figure 3.5
•Parabolic Trends
•Concaved Upwards and Concaved Downwards
•The left and right arms are widening as the
value increases or the parabola is opening
upwards.

•It represents the quadratic function


3-15 Forecasting

Linear Trend Equation

Ft

Ft = a + bt

 Ft = Forecast for period t 0 1 2 3 4 5 t


 t = Specified number of time periods
 a = Value of Ft at t = 0
 b = Slope of the line
3-16 Forecasting

Calculating a and b

n  (ty) -  t  y
b =
n t 2 - (  t) 2

 y - b t
a =
n
3-17 Forecasting

Linear Trend Equation Example

t y
2
W eek t S a le s ty
1 1 150 150
2 4 157 314
3 9 162 486
4 16 166 664
5 25 177 885

2
 t = 15  t = 55  y = 812  ty = 2 4 9 9
2
(  t) = 2 2 5
3-18 Forecasting

Linear Trend Calculation

5 (2499) - 15(812) 12495-12180


b = = = 6.3
5(55) - 225 275 -225

812 - 6.3(15)
a = = 143.5
5

y = 143.5 + 6.3t
3-19 Forecasting

Associative Forecasting

1. Predictor variables - used to predict values of


variable interest
2. Regression - technique for fitting a line to a
set of points
3. Least squares line - minimizes sum of
squared deviations around the line
3-20 Forecasting

Linear Model Seems Reasonable

X Y Computed
7 15
relationship
2 10
6 13 50

4 15 40

14 25 30

15 27 20

16 24
10

0
12 20 0 5 10 15 20 25

14 27
20 44
15 34
7 17
A straight line is fitted to a set of sample points.
3-21 Forecasting

Forecast Accuracy
 Error - difference between actual value and predicted
value
 Mean Absolute Deviation (MAD)
 Average absolute error
 Mean Squared Error (MSE)
 Average of squared error
 Mean Absolute Percent Error (MAPE)
 Average absolute percent error
3-22 Forecasting

Simple Linear Regression Formulas


for Calculating “a” and “b”

aa == yy-- bx
bx

xy
 xy -- n(y)(x)
n(y)(x)
bb == 22 22
xx -- n(x
 n(x))
Simple Linear Regression
3-23 Forecasting

Problem Data
Question:
Question:Given
Giventhe
thedata
databelow,
below,what
whatisisthe
thesimple
simplelinear
linear
regression
regressionmodel
modelthat
thatcan
canbe
beused
usedto
topredict
predictsales
salesin
infuture
future
weeks?
weeks?

Week Sales
1 150
2 157
3 162
4 166
5 177
3-24 Forecasting 24

Answer:
Answer: First,
First, using
using the
thelinear
linear regression
regressionformulas,
formulas, we
we
can
can compute
compute“a” “a”and
and“b”
“b”
Week Week*Week Sales Week*Sales
1 1 150 150
2 4 157 314
3 9 162 486
4 16 166 664
5 25 177 885
3 55 162.4 2499
Average Sum Average Sum

bb==

 xy
xy--n( n(y)(x)
y)(x) 2499
= 2499 --5(162.4)(3)
5(162.4)(3) 
63
63= 6.3
= 10 = 6.3
 x - n(x )
x 22
- n(x ) 22
55  5( 9
55  5(9 ) ) 10

aa== yy--bx
bx==162.4
162.4--(6.3)(3)
(6.3)(3)==143.5
143.5
3-25 Forecasting 25

The resulting regression model


is: Yt = 143.5 + 6.3x

180
175
170
165
160 Sales
Sales

155 Forecast
150
145
140
135
1 2 3 4 5
Period

You might also like