You are on page 1of 38

Chapter 15

Time Series Forecasting


and Index Numbers

Copyright 2017 McGraw-Hill Education. All rights reserved. 15-1


Time Series Forecasting

15.1 Time Series Components and Models


15.2 Time Series Regression
15.3 Multiplicative Decomposition
15.4 Simple Exponential Smoothing
15.5 Holt-Winters Models
15.6 Forecast Error Comparisons
15.7 Index Numbers

Copyright 2017 McGraw-Hill Education. All rights reserved. 15-2


Learning Objective
15-1: Identify the
components of a
times series. 15.1 Time Series Components
and Models
Trend: Long-run growth or decline
Cycle: Long-run up and down fluctuation
around the trend level
Seasonal: Regular periodic up and down
movements that repeat within the
calendar year
Irregular: Erratic very short-run movements
that follow no regular pattern

Copyright 2017 McGraw-Hill Education. All rights reserved. 15-3


Learning Objective
15-1: Identify the
components of a
Figure 15.1 Time Series
times series.
Exhibiting Trend, Seasonal, and
Cyclical Components

Copyright 2017 McGraw-Hill Education. All rights reserved. 15-4


Learning Objective
15-1: Identify the
components of a

No Trend
times series.

When there is no trend, the least squares


point estimate b0 of b0 is just the average y
value
Y
t 0 t

That is, we have a horizontal line that


crosses the y axis at its average value

Copyright 2017 McGraw-Hill Education. All rights reserved. 15-5


Learning Objective
15-1: Identify the
components of a

Trend
times series.

When sales increase (or decrease) over


time, we have a trend
Oftentimes, that trend is linear in nature
Linear trend is modeled using regression
Sales is the dependent variable
Time is the independent variable
Weeks, months, quarters, years
Not only is simple linear regression used,
quadratic regression is sometimes used

Copyright 2017 McGraw-Hill Education. All rights reserved. 15-6


Learning Objective
15-2: Use time
series regression to
forecast time series
having linear,
quadratic, and
certain types of
15.2 Time Series Regression
seasonal patterns.

Within regression, seasonality can be modeled using


dummy variables
Consider the model:
y t Q Q Q
t 0 1 Q2 2 Q3 3 Q4 4 t
For Quarter 1, Q 0, Q 0, Q 0
2 3 4
For Quarter 2, Q 1, Q 0, Q 0
2 3 4
For Quarter 3, Q 0, Q 1, Q 0
2 3 4
For Quarter 4, Q 0, Q 0, Q 1
2 3 4
The b coefficient will then give us the seasonal
impact of that quarter relative to Quarter 1
Negative means lower sales, positive lower sales
Copyright 2017 McGraw-Hill Education. All rights reserved. 15-7
Learning Objective
15-2: Use time
series regression to
Table 15.2: Example 15.2: The
forecast time series
having linear,
quadratic, and
Calculator Sales Case: Inventory
certain types of
seasonal patterns.
Policy
Month Year1 Year2
Jan. 197 296
Feb. 211 276
Mar. 203 305
Apr. 247 308
May. 239 356
June 269 393
July 308 363
Aug. 262 386
Sept. 258 443
Oct. 256 308 y 198.028986 8.07434825 399.9
Nov. 261 358
25
Dec. 288 384
y 198.028986 8.07434826 408.0
26

Copyright 2017 McGraw-Hill Education. All rights reserved. 15-8


Table 15.3: Example 15.3 The
Learning Objective
15-2: Use time
series regression to

Bike Sales Case: Inventory


forecast time series
having linear,
quadratic, and
certain types of
seasonal patterns. Policy
Year Quarter t Sales, yt
1 1 (Winter) 1 10
2 (Spring) 2 31
3 (Summer) 3 43
4 (Fall) 4 16
2 1 5 11
2 6 33
3 7 45
4 8 17
3 1 9 13
2 10 34
3 11 48
4 12 19
4 1 13 15
2 14 37
3 15 51
4 16 21

y t Q Q Q
t 0 1 Q2 2 Q3 3 Q4 4 t
Copyright 2017 McGraw-Hill Education. All rights reserved. 15-9
Learning Objective
15-2: Use time

Figure 15.6 Example 15.3


series regression to
forecast time series
having linear,

The Bike Sales Case


quadratic, and
certain types of
seasonal patterns.

y17 b b 17 b 0 b 0 b 0 8.75 .517 17.250


0 1 Q2 Q3 Q4
y18 b b 18 b 1 b 0 b 0 8.75 .518 21 38.750
0 1 Q2 Q3 Q4
y19 b b 19 b 0 b 1 b 0 8.75 .519 33.5 51.750
0 1 Q2 Q3 Q4
y20 b b 20 b 0 b 0 b 1 8.75 .520 4.5 23.250
0 1 Q2 Q3 Q4
Copyright 2017 McGraw-Hill Education. All rights reserved. 15-10
Learning Objective
15-2: Use time
series regression to
forecast time series
having linear,
quadratic, and
certain types of
Seasonality
seasonal patterns.

Some products have demand that varies a


great deal by period
Soft drink sales and hotel room occupancies
This periodic variation is called seasonality
Constant seasonality: the magnitude of the
swing does not depend on the level of the
time series
Increasing seasonality: the magnitude of the
swing increases as the level of the time series
increases
Seasonality alters the linear relationship
between time and demand
Copyright 2017 McGraw-Hill Education. All rights reserved. 15-11
Learning Objective
15-3: Use data
transformations to

Transformations
forecast time series
having increasing
seasonal variation.

Sometimes, transforming the sales data


makes it easier to forecast
Square root
Quartic roots
Natural logarithms
While these transformations can make the
forecasting easier, they make it harder to
understand the resulting model

Copyright 2017 McGraw-Hill Education. All rights reserved. 15-12


Learning Objective
15-4: Use
multiplicative
decomposition and
moving averages
15.3 Multiplicative
to forecast a time
series. Decomposition
We can use the multiplicative
decomposition method to decompose a
time series into its components:
Trend
Seasonal
Cyclical
Irregular

Copyright 2017 McGraw-Hill Education. All rights reserved. 15-13


Learning Objective
15-4: Use
multiplicative
decomposition and
moving averages
Steps to Multiplicative
to forecast a time
series. Decomposition (1 of 4)
1. Compute a moving average
This eliminates the seasonality
Averaging period matches seasonal period
2. Compute a two-period centering moving
average
The average from Step 1 needs to be matched up
with a specific period
Consider a 4-period moving average
The average of 1, 2, 3 and 4 is 2.5
This does not match any period
The average of 2.5 and 3.5 is 3
This matches up with period 3
Not needed if Step 1 uses odd number of periods

Copyright 2017 McGraw-Hill Education. All rights reserved. 15-14


Learning Objective
15-4: Use
multiplicative
decomposition and
moving averages
Steps to Multiplicative
to forecast a time
series. Decomposition (2 of 4)
3. The original demand for each period is divided by
the value computed in Step 2 for that same
period
The first and last few period do not have a value
These periods are skipped
4. All of the values from Step 3 for season 1 are
averaged together to form seasonal factor for
season 1
This is repeated for every season
If there are four seasons, there will be four factors
5. The original demand for each period is divided by
the appropriate seasonal factor for that period
This gives us the deseasonalized observation
Copyright 2017 McGraw-Hill Education. All rights reserved. 15-15
Learning Objective
15-4: Use
multiplicative
decomposition and
moving averages
Steps to Multiplicative
to forecast a time
series. Decomposition (3 of 4)
6. A forecast is prepared using the deseasonalized
observations
This is usually simple regression
7. The deseasonalized forecast for each period from
Step 6 is multiplied by the appropriate seasonal
factor for that period
This returns seasonality to the forecast
8. We estimate the period-by-period cyclical and
irregular component by dividing the deseasonalized
observation from Step 5 by the deseasonalized
forecast from Step 6
9. We use a three-period moving average to average
out the irregular component

Copyright 2017 McGraw-Hill Education. All rights reserved. 15-16


Learning Objective
15-4: Use
multiplicative
decomposition and
moving averages
Steps to Multiplicative
to forecast a time
series. Decomposition (4 of 4)
10. The value from Step 9 divided by the value from
Step 8 gives us the cyclical component
Values close to one indicate a small cyclical
component
We are interested in long-term patterns

Copyright 2017 McGraw-Hill Education. All rights reserved. 15-17


Learning Objective
15-4: Use
multiplicative
Example 15.5 The Tasty Cola
decomposition and
moving averages Case: Predicting Soft Drink Sales
to forecast a time
series.
Table 15.9 (1 of 2)
Year Month t Sales, yt Year Month t Sales, yt
1 1(Jan.) 1 189 2 7 19 831
2(Feb.) 2 229 8 20 960
3(Mar.) 3 249 9 21 1,152
4(Apr.) 4 289 10 22 759
5(May.) 5 260 11 23 607
6(June) 6 431 12 24 371
7(July) 7 660 3 1 25 298
8(Aug.) 8 777 2 26 378
9(Sept.) 9 915 3 27 373
10(Oct.) 10 613 4 28 443
11(Nov.) 11 485 5 29 374
12(Dec.) 12 277 6 30 660

Copyright 2017 McGraw-Hill Education. All rights reserved. 15-18


Learning Objective

Example 15.5 The Tasty Cola Case:


15-4: Use
multiplicative
decomposition and
moving averages
to forecast a time
Predicting Soft Drink Sales Table 15.9
series.
(2 of 2)

Year Month T Sales, yt Year Month T Sales, yt


2 1 13 244 7 31 1,004
2 14 296 8 32 1,153
3 15 319 9 33 1,388
4 16 370 10 34 904
5 17 313 11 35 715
6 18 556 12 36 441

y t TR t x SNt x CL t x IR t

Copyright 2017 McGraw-Hill Education. All rights reserved. 15-19


Learning Objective
15-4: Use
multiplicative
Example 15.5 The Tasty Cola Case:
decomposition and
moving averages Predicting Soft Drink Sales: Figure
15.10
to forecast a time
series.

Copyright 2017 McGraw-Hill Education. All rights reserved. 15-20


Learning Objective
15-4: Use
multiplicative
decomposition and
moving averages
Table 15.10: Example 15.5
to forecast a time
series. The Tasty Cola Case (1 of 3)
yr First Step : trt dt : sn . clt :
t t trt snt : clt irt : irt :
snt ir. y t d. y t .
tasty Centered Centered trr 380.163 3 Period
t t
time table Multiply yt clt irt
Cola Moving Moving trt dt snt 9.489t Moving
period 13.11 trtbysnt trt snt dt
Sales Average Average Average

1 jan 189 .493 383.37 389.652 192.10 .9839 .9902 .9721
2 229 .596 384.23 399.141 237.89 .9626 1.0010 1.0231
3 249 .595 418.49 408.630 243.13 1.0241 1.0396 .9778
4 289 .680 425 418.119 284.32 1.0165 1.0315 .10452
5 260 .564 460.99 427.608 241.17 1.0781 1.0285 .9723
6 431 .986 437.12 437.097 430.98 1.0000 1.0046 1.0028
7 660 447.833 450.125 1.466 1.467 449.9 446.586 655.14 1.0074 1.0004 1.0049
8 777 452.417 455.2085 1.707 1.693 458.95 456.075 772.13 1.0063 .9937 1.0082
9 915 458 460.9165 1.985 1.990 459.79 465.564 926.47 .9876 .9825 .9700
10 613 563.833 467.208 1.312 1.307 469.01 475.053 620.89 .9873 .9856 1.0219
11 485 470.583 472.7915 1.026 1.029 471.33 489.542 498.59 .9727 .9648 .9755
12 277 475 480.2085 .577 .600 461.67 494.031 296.42 .9345 .9634 1.0203

Copyright 2017 McGraw-Hill Education. All rights reserved. 15-21


Learning Objective
15-4: Use
multiplicative
decomposition and
moving averages
Table 15.10: Example 15.5
to forecast a time
series. The Tasty Cola Case (2 of 3)
yr First Step : trt dt : sn . clt :
t t trt snt : clt irt : irt :
snt ir. y t d. y t .
tasty Centered Centered trr 380.163 3 Period
t t
time table Multiply yt clt irt
Cola Moving Moving trt dt snt 9.489t Moving
period 13.11 trtbysnt trt snt clt
Sales Average Average Average

13 Jan 244 485 417 492 542 .495 .493 494.97 503.520 248.24 .9829 .9618 1.0219
14 296 499.667 507.292 .583 .596 496.64 513.009 305.75 .9681 .9924 .9755
15 319 514 917 524.792 .608 .595 536.13 522.498 310.89 1.0261 1.0057 1.0203
16 370 534 667 540.75 .684 .680 544.12 531.987 361.75 1.0228 1.0246 .9982
17 313 546 833 551.9165 .567 .564 554.97 541.476 305.39 1.0249 1.0237 1.0012
18 556 557 560.9165 .991 .986 563.89 550.965 543.25 1.0235 1.0197 1.0037
19 831 564 833 567.083 1.465 1.467 566.46 560.454 822.19 1.0107 1.0097 1.0010
20 960 569 333 572.75 1.676 1.693 567.04 569.943 964.91 .9949 1.0016 .9933
21 1,152 576 167 578.417 1.992 1.990 578.89 579.432 1,153.07 .9991 .9934 1.0057
22 759 580 667 583.7085 1.300 1.307 580.72 588.921 769.72 .9861 .9903 .9958
23 607 586 75 589.2915 1.030 1.029 589.89 598.410 615.76 .9858 .9964 .9894
24 371 591 831 596.1665 .622 .600 618.33 607.899 364.74 1.0172 .9940 1.0233

Copyright 2017 McGraw-Hill Education. All rights reserved. 15-22


Learning Objective
15-4: Use
multiplicative
decomposition and
moving averages
Table 15.10: Example 15.5
to forecast a time
series. The Tasty Cola Case (3 of 3)
yr First Step : trt dt : sn. dt :
t t trt snt : d ir : irt :
snt ir. y t d. y t . t t
tasty C entered C entered t t trr 380.163 3 Period
time table Multiply yt dt irt
C ola Moving Moving trt dt snt 9.489t Moving
period 13.11 trtbysnt trt snt dt
Sales Average Average Average

25 Jan 298 614.917 607.7085 .490 .493 604.46 617.388 304.37 .9791 1.0027 .9765
26 378 631 622.9585 .607 .596 634.23 626.877 373.62 1.0117 .9920 .1.0199
27 373 650.667 640.8335 .582 .595 626.89 636.366 378.64 .9851 1.0018 .9833
28 443 662.75 656.7085 .675 .680 651.47 645.855 439.18 1.0087 1.0030 1.0057
29 374 671.75 667.25 .561 .564 663.12 655.344 369.61 1.0119 1.0091 1.0028
30 660 677.583 674.6665 .978 .986 669.37 664.833 655.53 1.0068 1.0112 .9956
31 1,004 1.467 684.39 674.322 989.23 1.0149 1.0059 1.0089
32 1,153 1.693 681.04 683.811 1,157.69 .9959 1.0053 .9906
33 1,388 1.990 697.49 693.300 1,1379.67 1.0060 .9954 1.0106
34 904 1.307 691.66 702.789 918.55 .9842 .9886 .9955
35 715 1.029 694.85 712.278 732.93 .9755 .9927 .9827
36 441 .600 735 721.707 433.06 1.0183

Copyright 2017 McGraw-Hill Education. All rights reserved. 15-23


Learning Objective
15-4: Use
multiplicative
decomposition and
moving averages
Example 15.5 The Tasty Cola
to forecast a time
series. Case (1 of 2)

189 229 249 289 260 431 660 777 915 613 485 227
y1 447.833
12
229 249 289 260 431 660 777 915 613 485 227 244
y2 452.417
12
249 289 260 431 660 777 915 613 485 227 244 296
y3 458
12
447.833 452.417
CMA 7 450.125
2
452.417 458
CMA 8 455.2085
2

Copyright 2017 McGraw-Hill Education. All rights reserved. 15-24


Learning Objective
15-4: Use
multiplicative
decomposition and
moving averages
Example 15.5 The Tasty Cola
to forecast a time
series. Case (2 of 2)
Centered moving average in t is
considered to equal trt clt
The estimate of TRt CLt

Since the model y t TR t SNt CL t IR t


Implies SNt IR t y t /(TR t CL t )
It follows that the estimate snt irt of
SNt IR t
snt irt y t /(trt clt )

Copyright 2017 McGraw-Hill Education. All rights reserved. 15-25


Learning Objective
15-4: Use
multiplicative
decomposition and
moving averages
Table 15.11: Example 15.5
to forecast a time
series. The Tasty Cola Case

snt
Year 1 Year 2 snt 1.0008758( snt )
1 Jan. .495 .490 .4925 .493
2 Feb. .583 .607 .595 .596
3 Mar. .608 .582 . 595 .595
4 Apr. .684 .675 .6795 .680
5 May .567 .561 .564 .564
6 June .991 .978 9845 .986
7 July 1.466 1.465 1.4655 1.467
8 Aug. 1.707 1.676 1.6915 1.693
9 Sep. 1.985 1.992 1.9885 1.990
10 Oct. 1312 1.300 1.306 1.307
11 Nov 1.026 1.030 1.028 1.029
12 Dec. .577 .622 .5995 .600

Copyright 2017 McGraw-Hill Education. All rights reserved. 15-26


Learning Objective
15-4: Use
multiplicative
decomposition and
moving averages
Figure 15.11: Example 15.5
to forecast a time
series. The Tasty Cola Case

Copyright 2017 McGraw-Hill Education. All rights reserved. 15-27


Learning Objective
15-4: Use
multiplicative
decomposition and
moving averages
Example 15.5 The Tasty Cola
to forecast a time
series. Case
TR t 0 1t
dt 0 1t t
b0 380.163
b1 9.489
trt 380.163 9.489t
We now have snt and trt
clt irt yi (trt snt )
Estimate clt by computing three - period
moving average of clt irt values
Compute irt as (clt irt ) clt
Copyright 2017 McGraw-Hill Education. All rights reserved. 15-28
Learning Objective
15-4: Use
multiplicative
decomposition and
moving averages
Table 15.12: Example 15.5 The
to forecast a time
series. Tasty Cola Case
t snt trt = 380.163+9.489t Point Prediction, Approximate 95% yt
Prediction Interval
y t trt xsnt
37 .493 731.273 360.52 [333.72,387.32] 352

38 .596 740.762 446.40 [414.56,468.40] 445

39 .595 750.252 516.62 [489.45,543.79] 541

40 .680 759.741 516.62 [406.55,461.51] 457

42 .986 778.720 767.82 [740.38,795.26] 762

43 1.467 788.209 1,156.30 [1,128.71,1,183.89] 1,194

44 1.693 797.699 1,350.50 [1,322.76,1,378.24] 1,361

45 1.990 807.188 1,606.30 [1,578.41,1,634.19] 1,615

46 1.307 816.678 1,067.40 [1,039.35,1,095.45] 1,059

47 1.029 826.167 850.12 [821.90,878.34] 824

48 .600 835.657 501.39 [473,529.78] 495

Copyright 2017 McGraw-Hill Education. All rights reserved. 15-29


Learning Objective
16-5: Use simple
exponential
smoothing to
forecast a time
15.4 Simple Exponential
series.
Smoothing (1 of 2)
Earlier, we saw that when there is no trend, the
least squares point estimate b0 of 0 is just the
average y value
y t 0 t
That gave us a horizontal line that crosses the y
axis at its average value
Since we estimate b0 using regression, each
period is weighted the same
If 0 is slowly changing over time, we want to
weight more recent periods heavier
Exponential smoothing does just this

Copyright 2017 McGraw-Hill Education. All rights reserved. 15-30


Learning Objective

15.4 Simple Exponential


16-5: Use simple
exponential
smoothing to

Smoothing (2 of 2)
forecast a time
series.

Exponential smoothening takes on the form:


sT yT (1 ) sT 1
Alpha is a smoothing constant between zero and
one
Alpha is typically between 0.01 and 0.30
Smaller values of alpha represent slower change
We want to test the data and find an alpha value
that minimizes the sum of squared forecast errors

Copyright 2017 McGraw-Hill Education. All rights reserved. 15-31


Learning Objective
15-6: Use double
exponential

15.5 HoltWinters Models


smoothing to
forecast a time
series.

Simple exponential smoothing cannot handle


trend or seasonality
HoltWinters double exponential smoothing
can handle trended data of the form
yt 0 1t t
Assumes 0 and 1 changing slowly over time
We first find initial estimates of 0 and 1
Then use updating equations to track changes
over time
Requires smoothing constants called alpha and
gamma

Copyright 2017 McGraw-Hill Education. All rights reserved. 15-32


Learning Objective
15-7: Use
multiplicative
Winters method to
forecast a time
Multiplicative Winters
series.
Method
Double exponential smoothing cannot handle
seasonality
Multiplicative Winters method can handle
trended data of the form
y t (0 1t) SNt t
Assumes 0, 1, and SNt changing slowly over
time
We first find initial estimates of 0 and 1 and
seasonal factors
Then use updating equations to track over time
Requires smoothing constants alpha, gamma, and
delta
Copyright 2017 McGraw-Hill Education. All rights reserved. 15-33
Learning Objective
15-8: Compare
time series models
by using
forecast errors.
15.6 Forecast Error
Comparison
Forecast errors : et yt y t

Error comparison criteria


Mean absolute deviation (MAD)
n n

e t y t y t
MAD t 1
t 1
n n
Mean squared deviation (MSD)
n n

e 2
t t t
( y
y ) 2

MSD t 1
t 1
n n
Copyright 2017 McGraw-Hill Education. All rights reserved. 15-34
Learning Objective
15-9: Use index
numbers to

15.7 Index Numbers


compare economic
data over time.

Index numbers allow us to compare


changes in time series over time
We begin by selecting a base period
Every period is converted to an index
by dividing its value by the base period
and then multiplying the results by 100
Simple (quantity) index
yt
it 100
y0

Copyright 2017 McGraw-Hill Education. All rights reserved. 15-35


Learning Objective
15-9: Use index
numbers to

Several Indices
compare economic
data over time.

Quantity index: time series of index


values calculated from quantities
Prices index: time series of index
values calculated from prices
Simple index: time series of index
values based on one time series
Aggregate index: time series of index
values based on the accumulated
values of more than one time series

Copyright 2017 McGraw-Hill Education. All rights reserved. 15-36


Learning Objective
15-9: Use index
numbers to

Aggregate Price Index


compare economic
data over time.

Often wish to compare a group of


items
To do this, we compute the total prices
of the items over time
We then index this total
Aggregate price index it
p t
100
p 0

Copyright 2017 McGraw-Hill Education. All rights reserved. 15-37


Learning Objective
15-9: Use index
numbers to
compare economic
data over time.
Weighted Aggregate Price
Index
An aggregate price index assumes all
items in the basket are purchased with
the same frequency
A weighted aggregate price index takes
into account varying purchasing frequency
The Laspeyres index assumes the same
mixture of items for all periods as was
used in the base period
The Paasche index allows the mixture of
items in the basket to change over time
as purchasing habits change
Copyright 2017 McGraw-Hill Education. All rights reserved. 15-38

You might also like