COMPLETE
BUSINESS
STATISTICS
by
AMIR D. ACZEL
&
JAYAVEL SOUNDERPANDIAN
7th edition.
Prepared by Lloyd Jaisingh, Morehead State
University
Chapter 12
Time Series, Forecasting, and Index Numbers
McGraw-Hill/Irwin
Copyright 2009 by The McGraw-Hill Companies, Inc. All
12-2
12 Time Series, Forecasting, and Index
Numbers
Using Statistics
Trend Analysis
Seasonality and Cyclical Behavior
The Ratio-to-Moving-Average Method
Exponential Smoothing Methods
Index Numbers
12-3
12 LEARNING OBJECTIVES
After studying this chapter you should be able to:
Differentiate between qualitative and quantitative methods of forecasting
Carry out 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-4
12-2 Trend Analysis
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 - trendtrend 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-5
12-2 Trend Analysis: Example 12-1
As can be seen
from the figure, the
observations may be
described by a
straight line. A simple
linear regression
equation is fit to the
data by least squares.
A straight-line model
to account for a trend
is of the form
Zt = 0 + 1t + at
12-6
12-2 Trend Analysis: Example 12-1
The following output was obtained using the template.
Linear Model: Zt = 696.89 + 109.19t
Note: The template contains forecasts for t = 9 to t = 20 which corresponds to years 2008 to 2019 .
12-7
12-2 Trend Analysis: Example 12-1
Straight line trend.
12-8
12-2 Trend Analysis: Example 12-1
Trend Analysis Plot for Loans ($ billions)
Trend Analysis Plot for Loans ($ billions)
Loans ($ billions)
Loans ($ billions)
Growth Curve Model
Growth Curve Model
Yt = 765.843 * (1.09703* * t)
Yt = 765.843 * (1.09703* * t)
1700
1700
1600
1600
1500
1500
1400
1400
1300
1300
1200
1200
1100
1100
1000
1000
900
900
800
800
2000
2001
2002
2000
2001
2002
Variable
Variable
Actual
Actual
Fits
Fits
Accuracy Measures
Accuracy Measures
MAPE
1.084
MAPE
1.084
MAD
12.894
MAD
12.894
MSD
278.474
MSD
278.474
2003
2004
2005
2003
2004
2005
Year
Year
2006
2007
2006
2007
Growth Curve Model
12-9
Example 12-2
The
forecast
for t = 10
(year 2008)
is 345.27
Observe that the forecast model is Zt = 82.96 + 26.23t
12-10
Example 12-2
The
forecast
for t = 10
(year 2008)
is 345.27
The forecast model is Zt = 82.96 + 26.23t
12-11
12-3 Seasonality and Cyclical
Behavior
Monthly Sales of Suntan Oil
Gross Earnings: A nnual
20
100
11000
Pas sengers
E a rning s
Sales
200
Monthly Numbers of Airline Passengers
15
10
10000
9000
8000
7000
6000
5
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
Time
Year
86 87 88
89 90 91
92 93
Whenaacyclical
cyclicalpattern
patternhas
hasaaperiod
periodof
ofone
oneyear,
year,ititisis
When
usuallycalled
calledseasonal
seasonalvariation.
variation. AApattern
patternwith
withaaperiod
period
usually
ofother
otherthan
thanone
oneyear
yearisiscalled
calledcyclical
cyclicalvariation.
variation.
of
94 95
12-12
Time Series Decomposition
Typesof
ofVariation
Variation
Types
Trend(T)
(T)
Trend
Seasonal(S)
(S)
Seasonal
Cyclical(C)
(C)
Cyclical
Randomor
orIrregular
Irregular(I)
(I)
Random
AdditiveModel
Model
Additive
Tt +
Ct +
t =T
t +SS+
t +C
t +IIt
ZZt =
t
t
MultiplicativeModel
Model
Multiplicative
(Tt t)(S
)(St t)(C
)(Ct t)(I
)(It)t)
t =(T
ZZt =
Estimating an Additive Model with
Seasonality
Anadditive
additiveregression
regressionmodel
modelwith
withseasonality:
seasonality:
An
+11 t+
t+ 22 Q
Q11++33 Q
Q22 ++ 44Q
Q33 ++ aat t
ZZt=
t=00+
where
where
QQ1=1
=1ififthe
theobservation
observationisisin
inthe
thefirst
firstquarter,
quarter,and
and00
1
otherwise
otherwise
QQ2=1
=1ififthe
theobservation
observationisisin
inthe
thesecond
secondquarter,
quarter,and
and00
2
otherwise
otherwise
QQ3=1
=1ififthe
theobservation
observationisisin
inthe
thethird
thirdquarter,
quarter,and
and00
3
otherwise
otherwise
12-13
12-4 The Ratio-to-Moving- Average
Method
movingaverage
averageof
ofaatime
timeseries
seriesisisan
anaverage
averageof
ofaafixed
fixed
AAmoving
numberof
ofobservations
observationsthat
thatmoves
movesas
aswe
weprogress
progressdown
downthe
the
number
series.
series.
Time, t:
1
Series, Ztt:
15
Five-period
moving average:
Time, t:
Series, Ztt:
2
12
3
11
4
18
15.4 15.6
1
2
3
15 12 11
(15 + 12 + 11
(12 + 11
(11
4
18
+ 18
+ 18
+ 18
5
21
6
16
7
14
8
17
9
20
16.0
17.2 17.6 17.0 18.0 18.4 17.8 17.6
5
6
7
8
9
21
16
14
17 20
+ 21)/5=15.4
+ 21 + 16)/5=15.6
+ 21 + 16 + 14)/5=16.0
10
18
10
18
11
21
11
21
12
16
12
16
13
14
14
19
13
14
14
19
. . . . .
(18 + 21 + 16 + 14 + 19)/5=17.6
12-14
Comparing Original Data and
Smoothed Moving Average
Original Series and Five-Period Moving Averages
MovingAverage:
Average:
Moving
Smoother
Smoother
Shorter
Shorter
20
Deseasonalized
Deseasonalized
Z
15
Removesseasonal
seasonaland
and
Removes
irregularcomponents
components
irregular
Leavestrend
trendand
andcyclical
cyclical
Leaves
components
components
10
0
10
15
t TSCI SI
MA TC
12-15
12-16
Ratio-to-Moving Average
Ratio-to-MovingAverage
Averagefor
forQuarterly
QuarterlyData
Data
Ratio-to-Moving
Computeaafour-quarter
four-quartermoving-average
moving-averageseries.
series.
Compute
Centerthe
themoving
movingaverages
averagesby
byaveraging
averagingevery
everyconsecutive
consecutivepair
pairand
and
Center
placingthe
theaverage
averagebetween
betweenquarters.
quarters.
placing
Dividethe
theoriginal
originalseries
seriesby
bythe
thecorresponding
correspondingmoving
movingaverage.
average.Then
Then
Divide
multiplyby
by100.
100.
multiply
Derivequarterly
quarterlyindexes
indexesby
byaveraging
averagingall
alldata
datapoints
pointscorresponding
correspondingtoto
Derive
eachquarter.
quarter.Multiply
Multiplyeach
eachby
by400
400and
anddivide
divideby
bysum.
sum.
each
12-17
Ratio-to-Moving Average: Example 123
Sales
Sales
170
170
148
148
141
141
150
150
161
161
137
137
132
132
158
158
157
157
145
145
128
128
134
134
160
160
139
139
130
130
144
144
Ratio
Ratio
Moving
totoMoving
Average
Average
**
**
93.3
93.3
100.9
100.9
110.2
110.2
93.8
93.8
90.1
90.1
107.5
107.5
106.4
106.4
100.7
100.7
90.5
90.5
95.0
95.0
113.9
113.9
97.9
97.9
**
**
Four-Quarter Moving Averages
Actual
Smoothed
Actual
Smoothed
170
160
Sales
Quarter
Quarter
2004W
2004W
2004S
2004S
2004S
2004S
2004F
2004F
2005W
2005W
2005S
2005S
2005S
2005S
2005F
2005F
2006W
2006W
2006S
2006S
2006S
2006S
2006F
2006F
2007W
2007W
2007S
2007S
2007S
2007S
2007F
2007F
Simple
Centered
Simple
Centered
Moving
Moving
Moving
Moving
Average Average
Average
Average
**
**
**
**
151.125
**
151.125
152.25
148.625
152.25
148.625
150.00
146.125
150.00
146.125
147.25
146.000
147.25
146.000
145.00
146.500
145.00
146.500
147.00
147.000
147.00
147.000
146.00
147.500
146.00
147.500
148.00
144.000
148.00
144.000
147.00
141.375
147.00
141.375
141.00
141.000
141.00
141.000
141.75
140.500
141.75
140.500
140.25
142.000
140.25
142.000
140.75
140.75
**
143.25
143.25
**
150
Moving Average
Length:
4
140
MAPE:
MAD:
MSD:
130
0
10
Time
15
7.816
10.955
152.574
12-18
Seasonal Indexes: Example 12-3
Year
Year
Winter
Winter
Quarter
Quarter
Spring
Summer
Spring
Summer
2004
2004
2005
2005
2006
2006
2007
2007
110.2
110.2
106.4
106.4
113.9
113.9
93.8
93.8
100.7
100.7
97.9
97.9
Sum
Sum
Average
Average
330.5
330.5
110.17
110.17
292.4
292.4
97.47
97.47
Fall
Fall
93.3
93.3
90.1
90.1
90.5
90.5
100.9
100.9
107.5
107.5
95.0
95.0
273.9
273.9
91.3
91.3
303.4
303.4
101.13
101.13
SumofofAverages
Averages==400.07
400.07
Sum
SeasonalIndex
Index==(Average)(400)/400.07
(Average)(400)/400.07
Seasonal
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
Sales
Sales
170
170
148
148
141
141
150
150
161
161
137
137
132
132
158
158
157
157
145
145
128
128
134
134
160
160
139
139
130
130
144
144
Deseasonalized
Deseasonalized
Series(Z/S)*100
Series(Z/S)*100
154.34
154.34
151.87
151.87
154.47
154.47
148.35
148.35
146.16
146.16
140.58
140.58
144.51
144.51
156.27
156.27
142.53
142.53
148.79
148.79
140.23
140.23
132.53
132.53
145.26
145.26
142.64
142.64
142.42
142.42
142.42
142.42
Original and Seasonally Adjusted Series
170
160
Sales
Quarter
Quarter
2004W
2004W
2004S
2004S
2004S
2004S
2004F
2004F
2005W
2005W
2005S
2005S
2005S
2005S
2005F
2005F
2006W
2006W
2006S
2006S
2006S
2006S
2006F
2006F
2007W
2007W
2007S
2007S
2007S
2007S
2007F
2007F
Seasonal
Seasonal
Index(S)
(S)
Index
110.15
110.15
97.45
97.45
91.28
91.28
101.11
101.11
110.15
110.15
97.45
97.45
91.28
91.28
101.11
101.11
110.15
110.15
97.45
97.45
91.28
91.28
101.11
101.11
110.15
110.15
97.45
97.45
91.28
91.28
101.11
101.11
150
140
130
1992W
1992S
1992S
1992F
t
Original
Deseasonalized - - -
The Cyclical Component:
Example 12-3
Trend Line and Moving Averages
180
Sales
170
160
150
140
130
120
1992W
1992S
1992S
1992F
12-20
Thecyclical
cyclicalcomponent
componentisis
The
theremainder
remainderafter
afterthe
the
the
movingaverages
averageshave
havebeen
been
moving
detrended. In
Inthis
thisexample,
example,
detrended.
comparisonof
ofthe
themoving
moving
aacomparison
averagesand
andthe
theestimated
estimated
averages
regressionline:
line:
regression
Z 155.275 11059
.
t
illustratesthat
thatthe
thecyclical
cyclical
illustrates
componentin
inthis
thisseries
seriesisis
component
negligible.
negligible.
12-21
Example 12-3 using the Template
Thecentered
centeredmoving
movingaverage,
average,ratio
ratiototomoving
movingaverage,
average,seasonal
seasonalindex,
index,and
anddeseasonalized
deseasonalized
The
valueswere
weredetermined
determinedusing
usingthe
theRatio-to-Moving-Average
Ratio-to-Moving-Averagemethod.
method.
values
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
centeredmoving
movingaverage,
average,ratio
ratiototomoving
movingaverage,
average,seasonal
seasonalindex,
index,and
anddeseasonalized
deseasonalized
The
valueswere
weredetermined
determinedusing
usingthe
theRatio-to-Moving-Average
Ratio-to-Moving-Averagemethod.
method.
values
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
Forecasting a Multiplicative Series:
Example 12-3
The forecast of a multiplicative series :
Z = TSC
Forecast for Winter 2002 (t = 17) :
Trend : z = 152.26 - (0.837)(17) = 138.03
S = 1.1015
C 1 (negligible)
Z = TSC
= (1)(138.03)(1.1015) = 152.02
12-27
12-28
Multiplicative Series: Review
Trend)(
)(Seasonal
Seasonal((Cyclical
Cyclical)(
)(Irregular
Irregular))
ZZ ((Trend
TSCI
TSCI
MA((Trend
Trend)(
)(Cyclical
Cyclical))
MA
TC
TC
TSCI
ZZ TSCI
SI
SI
MA
TC
MA
TC
Averageof
ofSI
SI(Ratio
(Ratio--to
to--Moving
MovingAverages)
Averages)
SS == Average
TSCI
ZZ TSCI
CTI
CTI(Deseasonalized
(DeseasonalizedData)
Data)
SS
SS
12-29
12-5 Exponential Smoothing Methods
Smoothingisisused
usedto
toforecast
forecastaaseries
seriesby
byfirst
firstremoving
removingsharp
sharp
Smoothing
variation,as
asdoes
doesthe
themoving
movingaverage.
average.
variation,
Weights Decline as we go back in
Time
Weights Decline as We Go Back in Time and Sum to 1
W ei g ht
Weight
0.4
0.3
0.2
0.1
0.0
-15
-10
-5
Lag
-10
Lag
Exponentialsmoothing
smoothingisisaaforecasting
forecasting
Exponential
methodininwhich
whichthe
theforecast
forecastisisbased
basedinin
method
weightedaverage
averageof
ofcurrent
currentand
andpast
past
aaweighted
seriesvalues.
values. The
Thelargest
largestweight
weightisis
series
giventotothe
thepresent
presentobservations,
observations,less
less
given
weighttotothe
theimmediately
immediatelypreceding
preceding
weight
observation,even
evenless
lessweight
weighttotothe
the
observation,
observationbefore
beforethat,
that,and
andso
soon.
on. The
The
observation
weightsdecline
declinegeometrically
geometricallyas
aswe
wego
go
weights
backin
intime.
time.
back
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
11
22
33
44
55
66
77
88
99
10
10
11
11
12
12
13
13
14
14
15
15
16
16
ZZ
925
925
940
940
924
924
925
925
912
912
908
908
910
910
912
912
915
915
924
924
943
943
962
962
960
960
958
958
955
955
**
w=.4
w=.4
w=.8
w=.8
925.000
925.000
925.000
925.000
931.000
931.000
928.200
928.200
926.920
926.920
920.952
920.952
915.771
915.771
913.463
913.463
912.878
912.878
913.727
913.727
917.836
917.836
927.902
927.902
941.541
941.541
948.925
948.925
952.555
952.555
953.533
953.533
925.000
925.000
925.000
925.000
937.000
937.000
926.600
926.600
925.320
925.320
914.664
914.664
909.333
909.333
909.867
909.867
911.573
911.573
914.315
914.315
922.063
922.063
938.813
938.813
957.363
957.363
959.473
959.473
958.295
958.295
955.659
955.659
Exponential Smo othing: w=0 .4 and w=0.8
960
950
w= .4
Day
Day
940
930
920
910
0
10
Day
Original data:
Smoothed, w=0.4: ......
Smoothed, w=0.8: -----
15
12-32
Example 12-4 Using the Template
12-33
12-6 Index Numbers
Anindex
indexnumber
numberisisaanumber
numberthat
thatmeasures
measuresthe
therelative
relativechange
change
An
inaaset
setof
ofmeasurements
measurementsover
overtime.
time. For
Forexample:
example:the
theDow
Dow
in
JonesIndustrial
IndustrialAverage
Average(DJIA),
(DJIA),the
theConsumer
ConsumerPrice
PriceIndex
Index
Jones
(CPI),the
theNew
NewYork
YorkStock
StockExchange
Exchange(NYSE)
(NYSE)Index.
Index.
(CPI),
Value in period i
Index number in period i: = 100
Value in base period
Changing the base period of an index:
New index value: = 100
Old index value
Index value of new base
12-34
Index Numbers: Example 12-5
1984
1984
1985
1985
1986
1986
1987
1987
1988
1988
1989
1989
1990
1990
1991
1991
1992
1992
1993
1993
1994
1994
1995
1995
1996
1996
1997
1997
121
121
121
121
133
133
146
146
162
162
164
164
172
172
187
187
197
197
224
224
255
255
247
247
238
238
222
222
100.0
100.0
100.0
100.0
109.9
109.9
120.7
120.7
133.9
133.9
135.5
135.5
142.1
142.1
154.5
154.5
162.8
162.8
185.1
185.1
210.7
210.7
204.1
204.1
196.7
196.7
183.5
183.5
64.7
64.7
64.7
64.7
71.1
71.1
78.1
78.1
86.6
86.6
87.7
87.7
92.0
92.0
100.0
100.0
105.3
105.3
119.8
119.8
136.4
136.4
132.1
132.1
127.3
127.3
118.7
118.7
Price and Index (1982=100) of Natural Gas Price
250
Original
Index (1984)
P ric e
Index
Index
Index
Index
Year Price
Price 1984-Base
1984-Base 1991-Base
1991-Base
Year
150
Index (1991)
50
1985
1990
Year
1995
12-35
Consumer Price Index Example 12-6
Consumer Price index (CPI): 1967=100
Example12-6:
12-6:
Example
450
Adjusted Salary =
CPI
350
250
150
50
19 50 19 55 19 60 1965 1970 197 5 1980 1 985 1 990 1995
Ye a r
Year
Year
1980
1980
1981
1981
1982
1982
1983
1983
1984
1984
1985
1985
Salary
100
CPI
Adjusted
Adjusted
Salary Salary
Salary
Salary
29500 11953.0
11953.0
29500
31000 11380.3
11380.3
31000
33600 11610.2
11610.2
33600
35000 11729.2
11729.2
35000
36700 11796.8
11796.8
36700
38000 11793.9
11793.9
38000
12-36
Consumer Price Index Example 12-6
Example12-6:
12-6:
Example
Scatterplot of CPI vs Year
Scatterplot of CPI vs Year
600
600
Adjusted Salary =
500
500
CPI
CPI
400
400
300
300
200
200
100
100
0
0
1950
1950
1960
1960
1970
1970
1980
1980
Year
Year
1990
1990
2000
2000
2010
2010
Year
Year
1980
1980
1981
1981
1982
1982
1983
1983
1984
1984
1985
1985
Salary
100
CPI
Adjusted
Adjusted
Salary Salary
Salary
Salary
29500 11953.0
11953.0
29500
31000 11380.3
11380.3
31000
33600 11610.2
11610.2
33600
35000 11729.2
11729.2
35000
36700 11796.8
11796.8
36700
38000 11793.9
11793.9
38000
12-37
Example 12-6: Using the Template