You are on page 1of 36

12-1

COMPLETE
BUSINESS
STATISTICS
by
AMIR D. ACZEL
&
JAYAVEL SOUNDERPANDIAN
6th edition (SIE)
12-2

Chapter 12

Time Series,
Forecasting, and
Index Numbers
12-3

Time Series, Forecasting, and Index


12 Numbers
• Using Statistics
• Trend Analysis
• Seasonality and Cyclical Behavior
• The Ratio-to-Moving-Average Method
• Exponential Smoothing Methods
• Index Numbers
12-4

12 LEARNING OBJECTIVES
After studying this chapter you should be able to:
• Differentiate between qualitative and quantitative methods of
forecasting
• Carryout a trend analysis in time series data
• Identify seasonal and cyclical patterns in time series data
• Forecast using simple and weighted moving average methods
• Forecast using exponential smoothing method
• Forecast when the time series contains both trend and seasonality
• Assess the efficiency of forecasting methods using measures of
error
• Make forecasts using templates
• Compute index numbers
12-5

12-1 Using Statistics

A time series is a set of measurements of a variable that are


ordered through time. Time series analysis attempts to detect
and understand regularity in the fluctuation of data over time.

Regular movement of time series data may result from a


tendency to increase or decrease through time - trend-
trend or from a
tendency to follow some cyclical pattern through time -
seasonality or cyclical variation.

Forecasting is the extrapolation of series values beyond the


region of the estimation data. Regular variation of a time series
can be forecast, while random variation cannot.
12-6

The Random Walk

AArandom
randomwalk:
walk:
ZZt-t-ZZt-1t-1=a
=at
t
orequivalently:
or equivalently:
ZZt=t=ZZt-1t-1+a
+at
t

Thedifference
The differencebetween
betweenZZinintime
timettand
andtime
timet-1
t-1isisaarandom
randomerror.
error.
Random Walk
15
Thereisisno
There noevident
evidentregularity
regularityininaa
10
randomwalk,
random walk,since
sincethe
thedifference
differencein in
theseries
the seriesfrom
fromperiod
periodtotoperiod
periodisisaa
5 Z
randomerror.
random error. AArandom
randomwalkwalkisisnot
not
0 a
forecastable.
forecastable.
0 10 20 30 40 50
t
12-7

A Time Series as a Superposition of


Cyclical Functions
A Time Series as a Superposition of Two Wave
Functions and a Random Error (not shown)
z
4

-1

0 10 20 30 40 50
t

Incontrast
In contrastwith
withaarandom
randomwalk,
walk,this
thisseries
seriesexhibits
exhibitsobvious
obvious
cyclicalfluctuation.
cyclical fluctuation. Theunderlying
fluctuation The
fluctuation underlyingcyclical
cyclicalseries
series--the
the
regularelements
regular elementsofofthe
theoverall
overallfluctuation
fluctuation--may
maybebeanalyzable
analyzable
andforecastable.
and forecastable.
12-8

12-2 Trend Analysis: Example 12-1

The following output was obtained using the template.

Zt = 696.89 + 109.19t

Note: The template contains forecasts for t = 9 to t = 20 which corresponds to years 2002 to 2013 .
12-9

12-2 Trend Analysis: Example 12-1

Straight line trend.


12-10

Example 12-2

The
forecast
for t = 10
(year 2002)
is 345.27

Observe that the forecast model is Zt = 82.96 + 26.23t


12-11

12-3 Seasonality and Cyclical


Behavior
Monthly Sales of Suntan Oil G ross Earnings: A nnual Monthly Numbers of Airline Passengers

200
20 11000

10000

Pas sengers
E a rning s
15
Sales

9000
100
8000
10
7000

0 5 6000 t
J FMAMJ J ASONDJ FMAMJ J ASONDJ FMAMJ J A 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 86 87 88 89 90 91 92 93 94 95
Time Year

Whenaacyclical
When cyclicalpattern
patternhas
hasaaperiod
periodofofone
oneyear,
year,ititisis
usuallycalled
usually calledseasonal
seasonalvariation.
variation. AApattern
patternwith
withaaperiod
period
ofother
of otherthan
thanone
oneyear
yearisiscalled
calledcyclical
cyclicalvariation.
variation.
12-12

Time Series Decomposition

••Types
Types of
of Variation
Variation
Trend
 Trend(T)
(T)
Seasonal
 Seasonal(S)
(S)
Cyclical
 Cyclical(C)
(C)
Random
 Randomor orIrregular
Irregular(I)
(I)

••Additive
Additive Model
Model
ZZt t==TTt t++SSt t++CCt t++IIt t

••Multiplicative
Multiplicative Model
Model
ZZt t==(T
 (Tt t)(S
)(St t)(C
)(Ct t)(I
)(It)t)
12-13

Estimating an Additive Model with


Seasonality
Anadditive
An additiveregression
regressionmodel
modelwith
withseasonality:
seasonality:

ZZt= +11 t+
t=00+ t+22 Q
Q11++33 Q
Q22 ++ 44Q
Q33 ++ aat t

where
where
 QQ11=1
 =1ififthe
theobservation
observationisisin
inthe
thefirst
firstquarter,
quarter,and
and00
otherwise
otherwise
 QQ22=1
 =1ififthe
theobservation
observationisisin
inthe
thesecond
secondquarter,
quarter,and
and00
otherwise
otherwise
 QQ33=1
 =1ififthe
theobservation
observationisisin
inthe
thethird
thirdquarter,
quarter,and
and00
otherwise
otherwise
12-14

12-4 The Ratio-to-Moving- Average


Method
AAmoving
movingaverage
averageofofaatime
timeseries
seriesisisan
anaverage
averageof
ofaafixed
fixed
numberof
number ofobservations
observationsthat
thatmoves
movesas aswe
weprogress
progressdown
downthethe
series.
series.
Time, t: 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Series, Ztt: 15 12 11 18 21 16 14 17 20 18 21 16 14 19
Five-period
moving average: 15.4 15.6 16.0 17.2 17.6 17.0 18.0 18.4 17.8 17.6

Time, t: 1 2 3 4 5 6 7 8 9 10 11 12 13 14
Series, Ztt: 15 12 11 18 21 16 14 17 20 18 21 16 14 19
(15 + 12 + 11 + 18 + 21)/5=15.4
(12 + 11 + 18 + 21 + 16)/5=15.6
(11 + 18 + 21 + 16 + 14)/5=16.0
. . . . .
(18 + 21 + 16 + 14 + 19)/5=17.6
12-15

Comparing Original Data and


Smoothed Moving Average
Original Series and Five-Period Moving Averages
••Moving
Moving Average:
Average:
20
“Smoother”
 “Smoother”
Shorter
 Shorter
Deseasonalized
 Deseasonalized
Z

–– Removes
15 Removesseasonal
seasonaland
and
irregularcomponents
irregular components

Leaves
 Leavestrend
trendand
and
10
0 5 10 15
cyclicalcomponents
cyclical components
t
Z
t  TSCI  SI
MA TC
12-16

Ratio-to-Moving Average

••Ratio-to-Moving
Ratio-to-Moving Average
Average for
for Quarterly
Quarterly
Data
Data
Compute
 Computeaafour-quarter
four-quartermoving-average
moving-averageseries.
series.
Center
 Centerthe
themoving
movingaverages
averagesby
byaveraging
averagingevery
every
consecutivepair
consecutive pairand
andplacing
placingthe
theaverage
averagebetween
between
quarters.
quarters.
Divide
 Dividethe
theoriginal
originalseries
seriesby
bythe
thecorresponding
correspondingmoving
moving
average.Then
average. Thenmultiply
multiplybyby100.
100.
Derive
 Derivequarterly
quarterlyindexes
indexesby
byaveraging
averagingall
alldata
datapoints
points
correspondingto
corresponding toeach
eachquarter.
quarter.Multiply
Multiplyeach
eachby
by400
400and
and
divideby
divide bysum.
sum.
12-17

Ratio-to-Moving Average: Example


12-3
Simple
Simple Centered
Centered Ratio
Ratio Four-Quarter Moving Averages
Moving
Moving Moving
Moving totoMoving
Moving
Actual
Quarter
Quarter Sales
Sales Average
Average Average
Average Average
Average
170
Smoothed
1998W
1998W 170
170 ** ** **
Actual
Smoothed
160
1998S
1998S 148
148 ** ** **

Sales
1998S
1998S 141
141 ** 151.125
151.125 93.3
93.3 150
1998F
1998F 150
150 152.25
152.25 148.625
148.625 100.9
100.9 Moving Average
1999W
1999W 161
161 150.00
150.00 146.125
146.125 110.2
110.2
140 Length: 4

1999S
1999S 137
137 147.25
147.25 146.000
146.000 93.8
93.8 MAPE: 7.816
130 MAD: 10.955
1999S
1999S 132
132 145.00
145.00 146.500
146.500 90.1
90.1 MSD: 152.574
1999F
1999F 158
158 147.00
147.00 147.000
147.000 107.5
107.5 0 5 10 15
2000W
2000W 157
157 146.00
146.00 147.500
147.500 106.4
106.4 Time
2000S
2000S 145
145 148.00
148.00 144.000
144.000 100.7
100.7
2000S
2000S 128
128 147.00
147.00 141.375
141.375 90.5
90.5
2000F
2000F 134
134 141.00
141.00 141.000
141.000 95.0
95.0
2002W
2002W 160
160 141.75
141.75 140.500
140.500 113.9
113.9
2002S
2002S 139
139 140.25
140.25 142.000
142.000 97.9
97.9
2002S
2002S 130
130 140.75
140.75 ** **
2002F
2002F 144
144 143.25
143.25 ** **
12-18

Seasonal Indexes: Example 12-3

Quarter
Quarter
Year
Year Winter
Winter Spring
Spring Summer
Summer Fall
Fall

1998
1998 93.3
93.3 100.9
100.9
1999
1999 110.2
110.2 93.8
93.8 90.1
90.1 107.5
107.5
2000
2000 106.4
106.4 100.7
100.7 90.5
90.5 95.0
95.0
2002
2002 113.9
113.9 97.9
97.9

Sum
Sum 330.5
330.5 292.4
292.4 273.9
273.9 303.4
303.4
Average
Average 110.17
110.17 97.47
97.47 91.3
91.3 101.13
101.13

SumofofAverages
Sum Averages==400.07
400.07
SeasonalIndex
Seasonal Index==(Average)(400)/400.07
(Average)(400)/400.07

Seasonal
Seasonal
Index
Index 110.15
110.15 97.45
97.45 91.28
91.28 101.11
101.11
12-19

Deseasonalized Series: Example 12-3

Seasonal
Seasonal Deseasonalized
Deseasonalized Original and Seasonally Adjusted Series
Quarter
Quarter Sales
Sales Index(S)
Index (S) Series(Z/S)*100
Series(Z/S)*100
1998W
1998W 170
170 110.15
110.15 154.34
154.34 170
1998S
1998S 148
148 97.45
97.45 151.87
151.87
1998S
1998S 141
141 91.28
91.28 154.47
154.47 160
1998F
1998F 150
150 101.11
101.11 148.35
148.35
1999W 161 110.15 146.16

Sales
1999W 161 110.15 146.16 150
1999S
1999S 137
137 97.45
97.45 140.58
140.58
1999S
1999S 132
132 91.28
91.28 144.51
144.51 140
1999F
1999F 158
158 101.11
101.11 156.27
156.27
2000W
2000W 157
157 110.15
110.15 142.53
142.53 130
2000S
2000S 145
145 97.45
97.45 148.79
148.79 1992W 1992S 1992S 1992F
2000S
2000S 128
128 91.28
91.28 140.23
140.23
2000F 134 101.11 132.53 t
2000F 134 101.11 132.53
2002W
2002W 160
160 110.15
110.15 145.26
145.26 Original Deseasonalized - - -
2002S
2002S 139
139 97.45
97.45 142.64
142.64
2002S
2002S 130
130 91.28
91.28 142.42
142.42
2002F
2002F 144
144 101.11
101.11 142.42
142.42
12-20

The Cyclical Component:


Example 12-3
Trend Line and Moving Averages Thecyclical
The cyclicalcomponent
componentisis
180 theremainder
the remainderafter
afterthe
the
170 movingaverages
moving averageshave
havebeen
been
160 detrended. In
detrended. Inthis
thisexample,
example,
Sales

150 aacomparison
comparisonof ofthe
themoving
moving
140 averagesand
averages andthe
theestimated
estimated
130 regressionline:
regression line:
120
1992W 1992S 1992S 1992F
Z  155.275  11059
. t
t illustratesthat
illustrates thatthe
thecyclical
cyclical
componentin
component inthis
thisseries
seriesisis
negligible.
negligible.
12-21

Example 12-3 using the Template


Thecentered
The centeredmoving
movingaverage,
average,ratio
ratiototomoving
movingaverage,
average,seasonal
seasonalindex,
index,and
anddeseasonalized
deseasonalized
valueswere
values weredetermined
determinedusing
usingthe
theRatio-to-Moving-Average
Ratio-to-Moving-Averagemethod.
method.

This is a partial
output for the
quarterly forecasts.
12-22

Example 12-3 using the Template

Graph of the quarterly Seasonal Index


12-23

Example 12-3 using the Template

Graph of the Data and the quarterly Forecasted values


12-24

Example 12-3 using the Template


Thecentered
The centeredmoving
movingaverage,
average,ratio
ratiototomoving
movingaverage,
average,seasonal
seasonalindex,
index,and
anddeseasonalized
deseasonalized
valueswere
values weredetermined
determinedusing
usingthe
theRatio-to-Moving-Average
Ratio-to-Moving-Averagemethod.
method.

This displays just


a partial output
for the monthly
forecasts.
12-25

Example 12-3 using the Template

Graph of the monthly Seasonal Index


12-26

Example 12-3 using the Template

Graph of the Data and the monthly Forecasted values


12-27

Forecasting a Multiplicative Series:


Example 12-3

The forecast of a multiplicative series :

Zˆ = TSC

Forecast for Winter 2002 (t = 17) :

Trend : ẑ = 152.26 - (0.837)(17) = 138.03


S = 1.1015
C  1 (negligible)

Zˆ = TSC
= (1)(138.03)(1.1015) = 152.02
12-28

Multiplicative Series: Review

ZZ ((Trend
Trend)(
)(Seasonal
Seasonal((Cyclical
Cyclical)(
)(Irregular
Irregular))
TSCI
TSCI

MA((Trend
MA Trend)(
)(Cyclical
Cyclical))
TC
TC

ZZ  TSCI
TSCI
SI
SI
MA  TC 
MA TC

SS == Average
Averageof
ofSI
SI(Ratio
(Ratio--to
to--Moving
MovingAverages)
Averages)

ZZ  TSCI
TSCI
CTI
CTI(Deseasonalized
(DeseasonalizedData)
Data)
 
SS SS
12-29

12-5 Exponential Smoothing Methods

Smoothingisisused
Smoothing usedto
toforecast
forecastaaseries
seriesby
byfirst
firstremoving
removingsharp
sharp
variation,as
variation, asdoes
doesthe
themoving
movingaverage.
average.
Weights Decline as we go back Exponentialsmoothing
Exponential smoothingisisaaforecasting
forecasting
in Time methodininwhich
method whichthe
theforecast
forecastisisbased
basedinin
Weights Decline as We Go Back in Time and Sum to 1 aaweighted
weightedaverage
averageofofcurrent
currentand
andpast
past
seriesvalues.
series values. The
Thelargest
largestweight
weightisis
0.4
giventotothe
given thepresent
presentobservations,
observations,lessless
0.3
weighttotothe
theimmediately
immediatelypreceding
preceding
Weight

weight
W eig ht

0.2 observation,even
observation, evenless
lessweight
weighttotothe
the
0.1 observationbefore
observation beforethat,
that,and
andso
soon.
on. The
The
0.0 weightsdecline
weights declinegeometrically
geometricallyas aswe
wegogo
-15 -10
Lag
-5 0
backin
back intime.
time.

-10 Lag 0
12-30

The Exponential Smoothing Model

Given a weighting factor: 0 < w < 1:

2 3
Z t 1  w ( Z t )  w (1  w )( Z t 1 )  w (1  w ) ( Z t  2 )  w (1  w ) ( Z t  3 ) 

Since
2 3
Z t  w ( Z t 1 )  w (1  w )( Z t  2 )  w (1  w ) ( Z t  3 )  w (1  w ) ( Z t  4 ) 
2 3
(1  w ) Z t  w (1  w )( Z t 1 )  w (1  w ) ( Z t  2 )  w (1  w ) ( Z t  3 ) 

So

Z t 1  w(Z t )  (1  w)(Z t )

Z t 1  Z t  (1  w)(Z t - Z t )
12-31

Example 12-4

Day
Day ZZ w=.4
w=.4 w=.8
w=.8 Exponential Smo othing: w=0.4 and w=0.8
960
11 925
925 925.000
925.000 925.000
925.000
22 940
940 925.000
925.000 925.000
925.000 950

33 924
924 931.000
931.000 937.000
937.000 940

w=.4
44 925
925 928.200
928.200 926.600
926.600
55 912
912 926.920
926.920 925.320
925.320 930

66 908
908 920.952
920.952 914.664
914.664 920
77 910
910 915.771
915.771 909.333
909.333
88 912
912 913.463
913.463 909.867
909.867 910

99 915
915 912.878
912.878 911.573
911.573 0 5 10 15
10
10 924
924 913.727
913.727 914.315
914.315
Day
11
11 943
943 917.836
917.836 922.063
922.063 Original data:
12
12 962
962 927.902
927.902 938.813
938.813
13 960 941.541 957.363 Smoothed, w=0.4: ......
13 960 941.541 957.363
14 958 948.925 959.473 Smoothed, w=0.8: -----
14 958 948.925 959.473
15
15 955
955 952.555
952.555 958.295
958.295
16
16 ** 953.533
953.533 955.659
955.659
12-32

Example 12-4 – Using the Template


12-33

12-6 Index Numbers

Anindex
An indexnumber
numberisisaanumber
numberthat
thatmeasures
measuresthe
therelative
relative
changein
change inaaset
setof
ofmeasurements
measurementsover
overtime.
time. For
Forexample:
example:the
the
DowJones
Dow JonesIndustrial
IndustrialAverage
Average(DJIA),
(DJIA),the
theConsumer
ConsumerPrice
Price
Index(CPI),
Index (CPI),the
theNew
NewYork
YorkStock
StockExchange
Exchange(NYSE)
(NYSE)Index.
Index.
Value in period i
Index number in period i: = 100
Value in base period
Changing the base period of an index:
Old index value
New index value: = 100
Index value of new base
12-34

Index Numbers: Example 12-5

Index
Index Index
Index Price and Index (1982=100) of Natural Gas Price
Year Price
Year Price 1984-Base
1984-Base 1991-Base
1991-Base
1984
1984 121
121 100.0
100.0 64.7
64.7
250

1985 121 100.0 64.7 Original


1985 121 100.0 64.7
1986
1986 133
133 109.9
109.9 71.1
71.1 Index (1984)

P r ic e
1987
1987 146
146 120.7
120.7 78.1
78.1 150
1988
1988 162
162 133.9
133.9 86.6
86.6 Index (1991)
1989
1989 164
164 135.5
135.5 87.7
87.7
1990
1990 172
172 142.1
142.1 92.0
92.0 50
1991
1991 187
187 154.5
154.5 100.0
100.0 1985 1990 1995
1992 197 162.8 105.3 Year
1992 197 162.8 105.3
1993
1993 224
224 185.1
185.1 119.8
119.8
1994
1994 255
255 210.7
210.7 136.4
136.4
1995
1995 247
247 204.1
204.1 132.1
132.1
1996
1996 238
238 196.7
196.7 127.3
127.3
1997
1997 222
222 183.5
183.5 118.7
118.7
12-35

Consumer Price Index – Example 12-6

Consumer Price index (CPI): 1967=100 Example12-6:


Example 12-6:
450

Salary
Adjusted Salary = 100
350
CPI
Adjusted
Adjusted
CPI

250
Year
Year Salary Salary
Salary Salary
150
1980
1980 29500 11953.0
29500 11953.0
1981
1981 31000 11380.3
31000 11380.3
50 1982
1982 33600 11610.2
33600 11610.2
1950 1955 1960 1965 1970 197 5 1980 1 985 1 990 1995
1983
1983 35000 11729.2
35000 11729.2
Ye a r 1984
1984 36700 11796.8
36700 11796.8
1985
1985 38000 11793.9
38000 11793.9
12-36

Example 12-6: Using the Template

You might also like