Professional Documents
Culture Documents
Forecasting
2 : Uses offorecasts
There are three majorpmposes for the forecasts:
1- To determine the necessary for and the size of plant expansions {long- range
forecast or facility forecast).
2- To determine the intermediate planning for existing products to be
manufactured with existing facilities (plarmiug forecast).
3- To determine the short -range scheduling of existing products to be
manufactured on existing equipment (product forecast).
Types offorecast
Two types of forecasts can be classified to:
a: Forecasts based on the method of generation of the foTecast t.o:
1- Subjective opinion forecast .
This type based on the subjective opinion of people working in th~ ~
sales and marketing field .
4
2- Fore-carts based orr irrdex
This type of forecast based on an index am be illustrated from the
follow,ng example;_ a bmlding_supply manufactmer might base ms forecast f"r
-sales· -on the mmrber of ~ g permits issued in the area or on the nation al
index of construction value.
5
. • . ·• . •
• . •• ' .: ·:_:•'-? ·', )}
• ! ~' ,
-. · .This type -based on a statistical: _- analysis past demands:,; :" ~hi~,ttilif of fl•
. ....... •·.:· . .
. . . . ·:·.··'.-' .
··~,\...~}:~~- '• .., __ '; _. '.~
·, .
'. -: ~s~ibt1ities ofre,ing the most a.ccurate method arrd ~d ed fhere ,.f~:! ~~~
-., ---~g- pas1>and the future. One m.ust• moo ny the·prediction uom ·- ·• -~-.. ·_,~--~• .,\t· ~,":' /): r? ~
the-pa~f~~~J,~:~:::<'t•· _
• , . . .. : .
ertam events will be happ en m the future.
., .., ..- :, '.:" ,c,: .__ ;., ;· £. 1
4- Ct111sal Forecast
In the causal model,. our .knowledge of.the value of one variable
{ or several;
te the true valu e for some variables; and Y' denote the predicted
if Y deno
value for the variable then
. 7
,
Y = f( X1, X2, ........ .. X0 J
Where:
f: forecasting function
X J, X2,. .... .... Xn: set of variables.
e variable X are called independent variables, and Y is the dependent or
response variable. So, we have to know the independent variables to use them in
the forecasting model to forecast the dependent variable.
_, J-,.i.l.i. .lJc. ;..,J. XJ,. X2 D.fo "plumbing fixtures" ~~~ Y u.iiS t~J -2
-z.
Example-.
An oil company is planning to expand its modem gasoline stations. They
plan to use traffic flow (average number of cars per hour) to forecast sales (average
do11ars sales per hour). The historical data for 5 stations shown in the·foHowing
table:
7
Stations . Cars I hour · Saks- I .hour .
} }50 $ 220
-
2 55 75
'
' 250
3 220 '
4 130 145
5 95 200
Salest'IIB
JOO .
X
X
200
X
.· X
JOO .
X -&tiiirs =•
100 200 )SUC!. Zt JS- WS:#9.!,
Q
Curve Fitting_ Methods:
Several methods·can:be used ~~r the curve fitti
ng:
4;.. J.k Quick and dirtyfit methml
This method is commonly used when
a) there is a single independent
variable and b) there is a need to produc
e quick forecast. The forecast mthis
method is to fit a type of curve to the data by
eye .
'~c att er ~L ..J\ ;.J\ J:aij_ "Cl ose enough"" t4' ~ ~
.l?,l J ~...;l:Jl ~ l...ilaJ
..;J ;,
300
200 183¥202.5
X
100·
X
Cars/lirs
100 200
I
<It
10
2- Within /he· set of ·atf possible- functi.on:.s· spec!fied in step J, choas-e the
specifrc fimction: tlrat minimizes the sum ef the S(Jtlared de:viatio,rs
between the data point.r CDJd the.fimctians values
Where:
Y1 : actual sales/hr at location J
. X1 :· actual trafrre flow at location 1
a : intercept for the function on Y axi~
b : slope of the function
The value. of d 12' indicated how well thefunl1ion.fit at this one. point.
---
b=0.~3 ~:
' ,.
The straight-fine equation is Y = 57.1+ 0.93X. At X (traffic flow rate)= 183~
.
then the Y {sales) will be equals:
Y= 57.1 + 0..93. * l'.&3. = $. 227.29
Special case for the straight line forecasting is the constant.forecast. This
takes place ifb = 0.0,. then
... .
Y= a
and d1 = Y - Y= Y - a
t=n
and dr -I( Y -a)1
i=l
ls to zero,.then:
To minimize di, the partial derivatives of di with respect to-a equa
11
a= IY1/n =f )
i=l
c average.
The oest::constant forecast is Y = Y, and this is the mean aritlimeti
~ .3 equations m ao~
a1 and 32. rinding the nnnrerical values for the
the foltowing
For the previous example,. after the partial derivatives,. we can get
three equations:
n. n n
ao+ a1IX i"!" t12I Xr= IYtI . •••••• •••••• • •• ••••• I
i=l r-1 r-1
n n n n
ao•EXi +111Xxt2 +a2Xxt3 = XXi •y; ...... 1
.,__., L_ .
L- 1 .,_ ,
n n n 11
l Xi Yr Xi Yr . (xv .
: X
I !1/ / xiv ·'x-1"'y- '
1- 1
get:
Substitute in equations· l) and 3,. we can
5 * 3tJ I 65fl. * a1 I 998()() * 8:z. =
890
14
a quadratic function· and for n :: 3,. a cubic ~ o n and for n = 4 ,. a quarter
function ...... etc.
Suppose,. we h~e seven observations,. denoted ( Xi,. Y{),, Ii = l,. 2,. 3,. .....7. It is
exactly passes through each of these seven data points as shown in figure ( ).
It produce a perfect fit (giving zero for the sum ofsquared deviations).
When the independent wriable at future time bas the value X8" the true value of Y
might be given by Y8, whereas the predicted value is ¥8• Despite the previous fit,
,. the forecast is very maccmate.
The value of L d12 for the quadratit~ function is smaller tL m for linear
-
function (5398 < 5923}. Then,. the quadratic gives us a 10 '% decrease in the sum
of squares.
'-tri IIIA ~ r' ,;; "!i'_cnusa/ foreca~1 ~)! ,uU .J-.fiil1 ~Jj....-.i iJJ L Y.:;JJJ
16
~ 0 u L -s ~ ~ .u..c.
~ _.,..s f' ~ ., "Stable • uJi.
rlA l v ,.; ~
iiii ~ .J ~ , . )'• . OJ ~ t.S-~'-Jt J..1._,..n ~ 04jl1 ~ J
u-I-:I· l». _, .~ W l
17
6-2-a: Trend Projection
With Trend ,:rnd Seasonal
6--2-b: Exp one ntia l Sm oot hin g IvfodeJ
Variations.
hin g Methods
6-l:- Sh ort -Ra ng e Forecasting using Smoot
g the bes t tech njq nes js th""
The objective fnnctjon ~J oy ed jn det erm inin
me asu re the forecast error. The for eca st
me an abs olu te deviation (MAD),. wh ich
n the fore cas ted and the actu al value. The
erro r is the num. eric al diff erence bet wee
--. ,: .. .
-_:... -
. . -
teclmicpres has the.srhaf}es t MA O is sele cted as the for eca ~ i11sh mnent.
fi-om the following form ula :
The me an absolute dev iati on is calc ula ted
I
Example:
list ed bel ow:
Mo nth ly dem and for the last 8 mo nth s is
18
l 2 3- 4 5· 6 T . g·
34 44 · 42 30 46- 44 56- 50
Find the last period technique?
Answer
The forecast vahres in last period demand are~
. .. -- .. -
Month Demand Last period .Demand absolute
Yt;.l forecast Yt deviation fYt -Yt-11
r 34 - - -
2 44 34 p
10
3- 42 44 2
4 30 42 12
5 46 30 16
6 44 46 2
7 56 LPl 12
8 50 56 6
50
r J96 60
Notes~
l- The forecasted value for the second month is the actual value for the first
month.
2- The fore casted value for the 8th month is the actual value for the 7th
month.
3- The mean absolute vah1e is the absofote difference betwe·en the
forecasted-value and the actual value,. then
The mean absolute value (d_eviation) = 60 / 8 = 7.5
10
;sa
I
44 + 56 + 50 ) l 8 = 34 6 ;•ii
I 8 ... ... :.:.
1
e MAD
Month , Demand· Arith. Av
34 42'1./31 I .; . 8:
l
-
44 42 2
2
42 ()
3 42
,
4 30 42 12'
46 42 4 f
5
42 2·
6 44
56 42 l4
I
7
50 42 &
8
r 346 { 50 ~
M A D = 50 I 8 = -6. 25
20
6-1-c: ·Movin g average
6-1-c-1 :· Slmp/e MtMn g Averf l#
This technique ~erat cs t~ next periodic fore.c ast by averaging t~.actual
In.g_en~-•-al:
A A A A A·
21
I•
I .
C.
'
Wher@:
a"s-: non ~ scl~ednlUDbers: so that smaller weights- are assigned to
mqve: ~ .cmt·chna. ~ -all t~ we:ights.- ~ to l.
l , "> ~ nc J dS ~ ~ ~ c)r-. •... q?Sc .Jf'ii.~ o_;;.'iS, d...>.h 4.».,
(Ct.o =5/10 ,q 1= 3/lCt q,2 =2/10.) ~_,) (a0 =3/6 ,ct.1= 216, (½ =1/6)
- .. -
Example:
For the following data (sales *IO 3 /month; starting from· Jan. to Dec. )
J F M A M· J J · A s o : N D ·
20 24 · 27 Jl }7 47 5J 62 54 · 36 }2 29
.
1- Use the STmple 3 penod and 4 period moving averag~ to forecast
the sales for next Jan.?
ii- Use a 3 period weighted moving·averag~ with the weights· (a0
Solution
22
Soiuuon
rages:·
1.. Three and four month sim ple moving ave
M safe. 3 month SmipJe.M . 4--mo»th SimpTe M.
Average forecast Average forecast
Jan 20 - -
-·
"
Feb- 24 -
Ma 27 (20-+-24+27)/3 23. 7 -
Ap r 31 (24+ 27+31 )13 -2? j (2.0+24+')/J+3 l )/4=25 5
. ' Ma 37 (27+31-+37-)/3-31.7 (24 +21 +31+31)/4=29.8
Au 62 (47+53+62)/3=54.0 (37+47+53+62)/4=49 .8
: MAD . 4M- . MA D
. Mo nt Sale J.M (4M }
h s (3M )
Jan 20 - - - -
Feb 24 - - - -
Ma 27 - - - -
Ap r 31 23, 1 7.3 - -
Ma 37 21 3 9.7 2S..5 ll.5
47 31.7 15 3 29. 8 17.2
Jun
14-_7 3-$.5 l7_ J
Jul .53 3~-3
62 4-S-.'i 16. J 42. 0 20
Au
54 54_0 0.0. 49.8. 3.2
Sep
Oc t 38'· 56.3 18-.3
'.
54.0· 16.0·
No 32 50. 7 ' 18.7 51.3 19.3
40. 7 11_7 46_0 17
De 29
Jan 32 .J 38:.3
112 121.7
I:
23
The mean absolute deviation for 3 months moving average · J 1219 = J2.44
ihe mean absolute deviatio:n for 4 months moving averag~f 2J .1/8-J5. l25
The three - month meving average has-a MAD of6.62 and the four-month moving
average has-the l~t MAD of 9.34. The 3-month is the most ~ble of~ two
~Jmi~ and i~J~t -fw~ ne:xt-)anuary is l2_.3
Jan 20. -- -
-
Feb 24 - -
Ma 27 - -
Apr - 31 [3~+2-24 '+1-~0J /6 24.83' 6.17
-
37 [3 ..31 +2•27+ 1•·241 /6=28".50" g.5·
Ma
Jun 47· [_3*37+2*31+1*271 /6;31:33 13.14
Comparing the ave_ntge mean absolute deviation of the three- month simple
moving average (12_.44),_ th~ four- month smrple moving average- ( I5.125),. and the
three- month weighted moving average {l I .05) confirm the suggestion that recent
safes are better indicator of future sates than- are older data.
24
~r- -1- W' JJ~- ~.# u3.,l-:,,,_~ -~--~ ~ J:~ -r4.k ·
ExpOJTentia:Hy weig hted moving}. r.h1,si ~ -~ -~ J - ~ ~
._( ~.BWMA
(Yt) .,
Where~
a: is- a:tJw.-- ~ e ' ~s.ta nt:~h that: O·< a:< I-..
~ -&tmend.fonnffla lhr-tk·EWMA inml.elis:M fo1lOW$:·
Yt :;a fY~1 + (.1-a), v·t-l + (t-a,-2-: Y;..J..... (-1--a. i)~l.- v;
The EWMA ~bcrtc.~·piu.t:ofthe'. dif. f~ cr~ ~ ~ua f demand.·ancf.
t~e .d <krmmd.- tQ·a:~ -~ ·a.nd·~ ~tO .cb ~~,~ - (t~g os-to
~ ~oJmtd va~-ef:~ pr.~ ~ Wfrigh_~ ~ ~~~ m.~ e.~pon.~i:ttia.l m.ao.n~•
~-
beca ~ the :6-atjion (I- a) is raised tn a powe r;
The ge_neral fonnuJa fqr: ~pfe s.s ing t~ weigb.t_- ~ a futw.e:( ~-is as
follows~
25
Weight= a (1-_ a;n-1
·
th e . b . . _. .
no ds rem ov ed rrom the existing period.
Where n is num . er o f time pe
'). . d 4-1..-1 . able actual value is for May,. then:
For example if a
·
==
- :,
O· an . uu ;_ at~st
· ~7
avad
·
· Z
C. .h. ~ ( .and
_for _th ew ei gh ts (whcn a =.0.17 0..3
shOW'S valu:e.s·
The following ta,bk ..5) m orc·rehnwe. weight is
{q =0
at· u~ larger values
o fq
r.r ~
- th
0.5). Yon ca
.l s and the. irdluen .®. Qf Q}de.r data is more
~ -~
tJte !t ~ Q J
as;.tjp.,ed to
ra pi dl y di.Jrmris.~. I a=o.s t
I a=o3
f v ar ia b k t ceefl le k n t /. a = 0 .I
0.5
t y· i
la
. -0 .l 0.3 I
} 0.25 I·
I t
t { l- a). 0; () 9 I 0.21 } I
/. Y t- t 1 1· 125 /
0,081 1 0.147 }~ 0.. 1
t (l-a-)2
/ Yr, 2
l. (1 -a f 0-.0729 f {t l0 2 9 I t>.062:5 ~
1
I Yt-3 0 .0656 I 0.0720 0.0312 1
f
Yt-4 f (t -a )4 f
~
1 (1 -a )5 · 0.0591 l o.t,504 J 0. 01 56 f
).
f Yt-5 / :
t 0 .0078
I
1
I (I -a )6
0-.0531 f 0.0353 f
1;~ Y t- 8 1
(I-a}7
(1-Q.)8:
0.047&
0.0431
1 0.03&7
I
I 0.0241
f 0.0173
I
/- 0.0121
f
J. -
~-0039 I.
I
I
I·
f
t Yt-9- l. (1 -a f
t l f 0.0085 I
I f (l-a.)10 J 0.0349
I Yt-10 i
I· 0. 996 ·15 I·
0-.6&6 ·19 I 0..98023 ~ I
Y. ~ f
f
26
Example:
,.
t Mo t Safe t Y'"t J aYt + (1-a) Y t t MAD t
t t t t t t
t Jan t 20 t 771(p -- t t t
t t t· \:5] t t t
t 4.00 t
tt Feb t 24 t 2& : t Q_6~0+0.4x.~0=2~00
t
I·
t
lv1a
I -
t 21
t
t 25.26. t
t
0.6x24+0.4x28=25.66
~
,
t
t
t L74
t
t
t
t
t 31 t 26 44- t O.6x27+0.4x25. 7- .26A4
t Apr
J:
t
Ma r 37
t t
-i 2~:,s It
.
0.6x31+0.4x26. 4=29. l8- ,
t
t
t
4.56 t
S.82 t
t
t
t Jun t ♦? t 33.87 O.6rl7+o.4x29.2 J3.81 t }3.13 t
t- t t t t
t· Jul t 53 t 41.75 t 0.6x47+oAx33 .9=4l. 75 t 11.25.
t t· t ~ t
t 62 ~ 48.50 t· 0 :6x53+0:4x4l.8 =48'.50
I· Au f-3.50
I
Sep
Oct
I 54
38
56.60-
55.04
0.6x62+0.4x485CF-=56.6
;
0.6x54+0.4x56.6=55.04
2.6
17.04
No 32 - 43.62 . ' 0.6x38+0.4x5517=43.62 11.62
De. 29 36.65 0.§x32+0.4x43 .6=36.64 7.65
.
Jan .. 32.1 0.6x29+0.4x36.7 32.08 -
~ 95.92
Ntltn~
1- The coefficients of the Y 1 s decrease as the data become older.
2;.. The sum ofall coefficients (including the coefficiem of Y, 1) is. f.
>
C: _.. 0 ,: cl_,lt ~., tb I ~ YI .fa Ji: t 4 ~j ~ "'-lY ~., .>Ph t/i 41 tJ-:!i
- --