1. Copyright 2011 John Wiley & Sons, Inc. 1
Copyright 2011 John Wiley & Sons, Inc.
Applied Business Statistics, 7th ed.
by Ken Black
Chapter 15
Time Series
Forecasting &
Index Numbers
2. Copyright 2011 John Wiley & Sons, Inc. 2
Gain a general understanding of time series forecasting
techniques.
Understand the four possible components of time-series
data.
Understand stationary forecasting techniques.
Understand how to use regression models for trend analysis.
Learn how to decompose time-series data into their various
elements and to forecast by using decomposition techniques.
Understand the nature of autocorrelation and how to
test for it.
Understand autoregression in forecasting.
Learning Objectives
3. Copyright 2011 John Wiley & Sons, Inc. 3
Time-series data: data gathered on a given
characteristic over a period of time at regular intervals
Time-series techniques
Attempt to account for changes over time by examining
patterns, cycles, trends, or using information about previous
time periods
Naive Methods
Averaging
Smoothing
Decomposition of time series data
Time-Series Forecasting
4. Copyright 2011 John Wiley & Sons, Inc. 4
Time Series Components
Trend – long term general direction.
Cycles (Cyclical effects) – patterns of highs and lows
through which data move over time periods usually
of more than a year.
Seasonal effects – shorter cycles, which usually occur
in time periods of less than one year.
Irregular fluctuations – rapid changes or “bleeps” in
the data, which occur in even shorter time frames
than seasonal effects.
6. Copyright 2011 John Wiley & Sons, Inc. 6
Stationary time-series - data that contain no trend,
cyclical, or seasonal effects.
Error of individual forecast et – the difference
between the actual value xt and the forecast of that
value Ft.
Time Series Components
t t te x F= −
7. Copyright 2011 John Wiley & Sons, Inc. 7
Error of the Individual Forecast (et = Xt – Ft) the
difference between the actual value xt and the
forecast of that value Ft.
Mean Absolute Deviation (MAD) - is the mean, or
average, of the absolute values of the errors.
Mean Square Error (MSE) - circumvents the problem
of the canceling effects of positive and negative
forecast errors.
Computed by squaring each error and averaging the
squared errors.
Measurement of Forecasting Error
8. Copyright 2011 John Wiley & Sons, Inc. 8
Mean Percentage Error (MPE) – average of the
percentage errors of a forecast
Mean Absolute Percentage Error (MAPE) – average
of the absolute values of the percentage errors of a
forecast
Mean Error (ME) – average of all the errors of
forecast for a group of data
Measurement of Forecasting Error
9. Copyright 2011 John Wiley & Sons, Inc. 9
Year Actual Forecast Error
1 1402
2 1458 1402.0 56.0
3 1553 1441.2 111.8
4 1613 1519.5 93.5
5 1676 1584.9 91.1
6 1755 1648.7 106.3
7 1807 1723.1 83.9
8 1824 1781.8 42.2
9 1826 1811.3 14.7
10 1780 1821.6 -41.6
11 1759 1792.5 -33.5
Nonfarm Partnership Tax Returns:
Actual and Forecast with = .7
12. Copyright 2011 John Wiley & Sons, Inc. 12
Smoothing Techniques
Smoothing techniques produce forecasts based on
“smoothing out” the irregular fluctuation effects in
the time-series data.
Naive Forecasting Models - simple models in which it
is assumed that the more recent time periods of data
represent the best predictions or forecasts for future
outcomes.
13. Copyright 2011 John Wiley & Sons, Inc. 13
Averaging Models - the forecast for time period
t is the average of the values for a given number of
previous time periods:
Simple Averages
Moving Averages
Weighted Moving Averages
Exponential Smoothing - is used to weight data from
previous time periods with exponentially decreasing
importance in the forecast.
Smoothing Techniques
14. Copyright 2011 John Wiley & Sons, Inc. 14
t
t t t t n
F
X X X X
n
=
+ + + +− − − −1 2 3
Month Year
Cents
per
Gallon Month Year
Cents
per
Gallon
January 2 61.3 January 3 58.2
February 63.3 February 58.3
March 62.1 March 57.7
April 59.8 April 56.7
May 58.4 May 56.8
June 57.6 June 55.5
July 55.7 July 53.8
August 55.1 August 52.8
September 55.7 September
October 56.7 October
November 57.2 November
December 58.0 December
Simple Average Model
The monthly average last
12 months was 56.45,
so I predict
56.45 for September.
The forecast for time
period t is the average
of the values for a given
number of previous
time periods.
15. Copyright 2011 John Wiley & Sons, Inc. 15
t
t t t t n
F
X X X X
n
=
+ + + +− − − −1 2 3
Update each period.
Moving Average
Updated (recomputed) for every new time period
May be difficult to choose optimal number of periods
May not adjust for trend, cyclical, or seasonal effects
16. Copyright 2011 John Wiley & Sons, Inc. 16
Shown in the following table here are shipments
(in millions of dollars) for electric lighting and wiring
equipment over a 12-month period. Use these data
to compute a 4-month moving average for all available
months.
Demonstration Problem 15.1:
Four-Month Moving Average
17. Copyright 2011 John Wiley & Sons, Inc. 17
May
May
June
June
F
Error
F
Error
=
+ + +
=
= −
=
=
+ + +
=
= −
=
1056 1345 1381 1191
4
124325
1259 124325
1575
1345 1381 1191 1259
4
1294 00
1361 1294 00
67 00
.
.
.
.
.
.
Months Shipments
4-Mo
Moving
Average
Forecast
Error
January 1056
February 1345
March 1381
April 1191
May 1259 1243.25 15.75
June 1361 1294.00 67.00
July 1110 1298.00 -188.00
August 1334 1230.25 103.75
September 1416 1266.00 150.00
October 1282 1305.25 -23.25
November 1341 1285.50 55.50
December 1382 1343.25 38.75
Demonstration Problem 15.1:
Four-Month Moving Average
18. Copyright 2011 John Wiley & Sons, Inc. 18
Demonstration Problem 15.1:
Four-Month Moving Average
19. Copyright 2011 John Wiley & Sons, Inc. 19
1 2 33( ) 2( ) 1( )
6
t t t
weighted
M M M
x − − −+ +
=
A moving average in which some time periods are
weighted differently than others.
Weighted Moving Average
Forecasting Model
Where last month’s value
value for the previous month
value for the month before the
previous month
The denominator = the total number of weights
1tM −
2tM −
3tM −
Example 3 month
Weighted average
20. Copyright 2011 John Wiley & Sons, Inc. 20
( ) ( ) ( ) ( )
( ) ( ) ( ) ( )
May
May
June
June
F
Error
F
Error
=
+ + +
=
= −
=
=
+ + +
=
= −
=
4 1191 2 1381 1 1345 1 1056
8
124088
1259 124088
1813
4 1259 2 1191 1 1381 1 1345
8
1268 00
1361 1268 00
9300
.
.
.
.
.
.
Months Shipments
4-Mo
Weighted
Moving
Average
Forecast
Error
January 1056
February 1345
March 1381
April 1191
May 1259 1240.88 18.13
June 1361 1268.00 93.00
July 1110 1316.75 -206.75
August 1334 1201.50 132.50
September 1416 1272.00 144.00
October 1282 1350.38 -68.38
November 1341 1300.50 40.50
December 1382 1334.75 47.25
Demonstration Problem 15.2:
Four-Month Weighted Moving Average
21. Copyright 2011 John Wiley & Sons, Inc. 21
( )t t t
t
t
t
F X F
F
F
X
where
+
+
= + −
=
=
=
1
1
1
: the forecast for the next time period (t+1)
the forecast for the present time period (t)
the actual value for the present time period
= a value between 0 and 1
is the exponential
smoothing constant
Used to weight data from previous time periods with
exponentially decreasing importance in the forecast
Exponential Smoothing
22. Copyright 2011 John Wiley & Sons, Inc. 22
The U.S. Census Bureau reports the total units of
new privately owned housing started over a 16-year
recent period in the United States are given here.
Use exponential smoothing to forecast the values
for each ensuing time period. Work the problem
using = .2, .5, and .8.
Demonstration Problem 15.3: = 0.2
25. Copyright 2011 John Wiley & Sons, Inc. 25
Trend – long run general direction of climate over
an extended time
Linear Trend
Quadratic Trend
Holt’s Two Parameter Exponential Smoothing - Holt’s
technique uses weights (β) to smooth the trend in a
manner similar to the smoothing used in single
exponential smoothing (α)
Trend Analysis
26. Copyright 2011 John Wiley & Sons, Inc. 26
Following table provides the data needed to
compute a quadratic regression trend model on
the manufacturing workweek data
Average Hours Worked per Week
by Canadian Manufacturing Workers
27. Copyright 2011 John Wiley & Sons, Inc. 27
Period Hours Period Hours Period Hours Period Hours
1 37.2 11 36.9 21 35.6 31 35.7
2 37.0 12 36.7 22 35.2 32 35.5
3 37.4 13 36.7 23 34.8 33 35.6
4 37.5 14 36.5 24 35.3 34 36.3
5 37.7 15 36.3 25 35.6 35 36.5
6 37.7 16 35.9 26 35.6
7 37.4 17 35.8 27 35.6
8 37.2 18 35.9 28 35.9
9 37.3 19 36.0 29 36.0
10 37.2 20 35.7 30 35.7
Average Hours Worked per Week by
Canadian Manufacturing Workers
28. Copyright 2011 John Wiley & Sons, Inc. 28
Regression Statistics
Multiple R
R Square
Adjusted R Square
Standard Error
Observations
ANOVA
SS MS F Significance F
Regression 1 13.4467 13.4467 51.91 .00000003
Residual 33 8.5487 0.2591
Total 34 21.9954
Coefficients Standard Error t Stat P-value
Intercept 37.4161 0.17582 212.81 .0000000
Period -0.0614 0.00852 -7.20 .00000003
i ti i
t
Y X
X
where
Y
= + +
=
=
= −
0 1
37 416 0 0614
:
. .
data value for period i
time period
i
i
Y
X
35
0.782
0.611
0.5600
0.509
df
Excel Regression Output using Linear Trend
29. Copyright 2011 John Wiley & Sons, Inc. 29
Regression Statistics
Multiple R 0.8723
R Square 0.761
Adjusted R Square 0.747
Standard Error 0.405
Observations 35
ANOVA
df SS MS F Significance F
Regression 2 16.7483 8.3741 51.07 1.10021E-10
Residual 32 5.2472 0.1640
Total 34 21.9954
Coefficients Standard Error t Stat P-value
Intercept 38.16442 0.21766 175.34 2.61E-49
Period -0.18272 0.02788 -6.55 2.21E-07
Period2 0.00337 0.00075 4.49 8.76E-05
i ti ti i
ti
t t
Y X X
X
X X
where
Y
= + + +
=
=
=
= − +
0 1 2
2
2
2
38164 0183 0 003
:
. . .
data value for period i
time period
the square of the i period
i
i
th
Y
X
Excel Regression Output using
Quadratic Trend
30. Copyright 2011 John Wiley & Sons, Inc. 30
Excel Graph of Canadian Manufacturing Data
with a Second-Degree Polynomial FIt
31. Copyright 2011 John Wiley & Sons, Inc. 31
Data on the employed U.S. civilian labor force
(100,000) for 1991 through 2008, obtained from the
U.S. Bureau of Labor Statistics. Use regression
analysis to fit a trend line through the data and
explore a quadratic trend. Compare the models.
Demonstration Problem 15.4
33. Copyright 2011 John Wiley & Sons, Inc. 33
Model Comparison
Linear
Model
Quadratic
Model
34. Copyright 2011 John Wiley & Sons, Inc. 34
Decomposition – Breaking down the effects of time
series data into four component parts trend, cyclical,
seasonal, and irregular
Basis for analysis is the Multiplicative Model
Y = T · C · S · I
where:
T = trend component
C = cyclical component
S = seasonal component
I = irregular component
Time Series: Decomposition
35. Copyright 2011 John Wiley & Sons, Inc. 35
Year Quarter Shipments Year Quarter Shipments
1 1 4009 4 1 4595
2 4321 2 4799
3 4224 3 4417
4 3944 4 4258
2 1 4123 5 1 4245
2 4522 2 4900
3 4657 3 4585
4 4030 4 4533
3 1 4493
2 4806
3 4551
4 4485
Shipments in $1,000,000.
Illustration of decomposition process: the 5-year quarterly
time-series data on U.S. shipments of household appliances
Household Appliance Shipment Data
37. Copyright 2011 John Wiley & Sons, Inc. 37
1 2 3 4 5
Q1 96.84% 100.22% 100.09% 94.84%
Q2 104.62% 106.17% 105.57% 108.13%
Q3 102.06% 106.34% 99.01% 98.74%
Q4 94.40% 90.34% 97.32% 95.85%
Ratios of Actuals to Moving Averages
38. Copyright 2011 John Wiley & Sons, Inc. 38
Eliminate the maximum and the minimum for each quarter.
Average the remaining ratios for each quarter.
1 2 3 4 5
Q1 96.84% 100.22% 100.09% 94.84%
Q2 104.62% 106.17% 105.57% 108.13%
Q3 102.06% 106.34% 99.01% 98.74%
Q4 94.40% 90.34% 97.32% 95.85%
S · I
Eliminate the Max and Min for each Qtr
39. Copyright 2011 John Wiley & Sons, Inc. 39
Computation of Average
of Seasonal Indexes
1 2 3 4 5 Average
Q1 96.84% 100.09% 98.47%
Q2 106.17% 105.57% 105.87%
Q3 102.06% 99.01% 100.53%
Q4 94.40% 95.85% 95.13%
40. Copyright 2011 John Wiley & Sons, Inc. 40
Average
Final Adjusted
Seasonal
Indexes
Q1 98.47% 98.47%
Q2 105.87% 105.87%
Q3 100.53% 100.54%
Q4 95.13% 95.13%
Total 400.00% 400.00%
Adjustments are
unnecessary
since the four
averages sum
to 400.
Final Adjustments of Seasonal Indexes
42. Copyright 2011 John Wiley & Sons, Inc. 42
Autocorrelation occurs in data when the error terms of a
regression forecasting model are correlated.
Potential Problems
Estimates of the regression coefficients no longer have the
minimum variance property and may be inefficient.
The variance of the error terms may be greatly underestimated by
the mean square error value.
The true standard deviation of the estimated regression coefficient
may be seriously underestimated.
The confidence intervals and tests using the t and F distributions
are no longer strictly applicable.
First-order autocorrelation occurs when there is correlation
between the error terms of adjacent time periods.
Autocorrelation (Serial Correlation)
43. Copyright 2011 John Wiley & Sons, Inc. 43
H
Ha
0 0
0
:
:
( )
D
t t
where
e e
e
t
n
t
t
n=
−−
=
=
2
2
2
1
1
: n = the number of observations
If D > do not reject H (there is no significant autocorrelation).
If D < , reject H (there is significant autocorrelation).
If , the test is inconclusive.
U
0
L
0
L U
d
d
d d
,
D
Durbin-Watson Test
44. Copyright 2011 John Wiley & Sons, Inc. 44
H
Ha
0 0
0
:
:
( )
6897.
4394.14
9590.9
1
1
2
2
2
=
=
−
=
−
=
=
n
t
t
n
t
e
ee tt
D
.
ation).autocorreltsignificanis(thereHreject,<0.6897=D
29.1
.05,=and25,=n1,=kFor
0
L
L
d
d =
Durbin-Watson Test for the Oil and
Gas Well Drilling Example
45. Copyright 2011 John Wiley & Sons, Inc. 45
Overcoming the Autocorrelation Problem
Addition of Independent Variables
Transforming Variables
First-differences approach - Often autocorrelation occurs in
regression analyses when one or more predictor variables
have been left out of the analysis
Percentage change from period to period - each value of X
is subtracted from each succeeding time period value of X;
these “differences” become the new and transformed X
variable.
Use autoregression - multiple regression technique in
which the independent variables are time-lagged versions
of the dependent variable
46. Copyright 2011 John Wiley & Sons, Inc. 46
Y b b Y b Yt t
= + +− −0 1 1 2 2
Y b b Y b Y b Yt t t
= + + +− − −0 1 1 2 2 3 3
Autoregression Model with two lagged variables
Autoregression Model with three lagged variables
Autoregression Model
48. Copyright 2011 John Wiley & Sons, Inc. 48
Index Numbers
Index number - ratio of a measure taken during one time
frame to that same measure taken during another time
frame, usually denoted as the base period.
Simple Index Numbers – ratio of a figure to a base year.
Unweighted Aggregate Price Indexes
Weighted Aggregate Price Index Numbers
Laspeyres Price Index - a weighted aggregate price index
computed by using the quantities of the base period (year)
for all other years.
Paasche Price Index - weighted aggregate price index computed
by using the quantities for the year of interest in computations
for a given year.
49. Copyright 2011 John Wiley & Sons, Inc. 49
( )i
i
I
X
X
where
=
=
=
=
0
100
: the quantity, price, or cost in the base year
the quantity, price, or cost in the year of interest
the index number of the year of interest
0
i
i
X
X
I
The motivation for using an index number
is to reduce data to an easier-to-use, more
convenient form.
Simple Index Numbers
50. Copyright 2011 John Wiley & Sons, Inc. 50
Year Starts Index
1987 81463 100.0
1988 62845 77.1
1989 62449 76.7
1990 63912 78.5
1991 70605 86.7
1992 69848 85.7
1993 62399 76.6
1994 50845 62.4
1995 50516 62.0
1996 53200 65.3
1997 53819 66.1
1998 44197 54.3
1999 376390 46.2
2000 35219 43.2
2001 39719 48.8
2002 38155 46.8
Index Numbers for Business
Starts in the U. S.
51. Copyright 2011 John Wiley & Sons, Inc. 51
( )i
i
i
i
I
P
P
P
P
I
where i
i
=
=
=
=
0
0
100
0
: the price of an item in the year of interest ( )
the price of an item in the base year ( )
the index number for the year of interest ( )
Unweighted Aggregate Price Index Numbers
52. Copyright 2011 John Wiley & Sons, Inc. 52
Unweighted Aggregate Price Index
for Basket of Food Items
Food items with yearly
quantity weights
53. Copyright 2011 John Wiley & Sons, Inc. 53
Weighted Aggregate Price Index Numbers
Computed by multiplying quantity weights and item
prices in determining the market basket worth for a
given year.
Also called value indexes
Laspeyres - uses base period weights
Paasche - use current period weights
54. Copyright 2011 John Wiley & Sons, Inc. 54
( )L
i
I
P Q
P Q
=
0
0 0
100
Laspeyres Price
Index uses base
period weights
Laspeyres Price Index
55. Copyright 2011 John Wiley & Sons, Inc. 55
1995
Quantity
Price
1995 2011
Eggs (dozen) 45 0.78 1.55
Milk (1/2 gallon) 60 1.14 2.25
Bananas (per lb) 12 0.36 0.49
Potatoes (per lb) 55 0.28 0.36
Sugar (per lb) 36 0.35 0.43
Sum of Products 135.82 233.92
Index Values 100.00 180.5
Laspeyres Price Index: 1995 Base Year
56. Copyright 2011 John Wiley & Sons, Inc. 56
( )p
i i
i
I
P Q
P Q
=
0
100
Paasche Price
Index uses
current period
weights
Paasche Price Index
57. Copyright 2011 John Wiley & Sons, Inc. 57
2005 2011
Price Quantity Price Quantity
Syringes (dozen) 6.70 150 6.95 135
Cotton swabs (box) 1.35 60 1.45 65
Patient record forms (pad) 5.10 8 6.25 12
Children's Tylenol (bottle) 4.50 25 4.95 30
Computer paper (box) 11.95 6 13.20 8
Thermometers 7.90 4 9.00 2
Numerator 1342.60 1379.60
Denominator 1342.60 1299.85
Index 100.00 106.14
Paasche Price Index: 2005 Base Year