Statistics for
Business and Economics
7th Edition
Chapter 16
Time-Series Analysis and
Forecasting
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 16-1
Chapter Goals
After completing this chapter, you should be able to:
Compute and interpret index numbers
Weighted and unweighted price index
Weighted quantity index
Test for randomness in a time series
Identify the trend, seasonality, cyclical, and irregular
components in a time series
Use smoothing-based forecasting models, including
moving average and exponential smoothing
Apply autoregressive models and autoregressive
integrated moving average models
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 16-2
16.1
Index Numbers
Index numbers allow relative comparisons
over time
Index numbers are reported relative to a Base
Period Index
Base period index = 100 by definition
Used for an individual item or measurement
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 16-3
Single Item Price Index
Consider observations over time on the price of a single
item
To form a price index, one time period is chosen as a
base, and the price for every period is expressed as a
percentage of the base period price
Let p denote the price in the base period
0
Let p1 be the price in a second period
The price index for this second period is
p1
100
p0
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 16-4
Index Numbers: Example
Airplane ticket prices from 2000 to 2008:
Index
Year
Price
(base year
= 2005)
2000
272
85.0
2001
288
90.0
2002
295
92.2
2003
311
97.2
2004
322
100.6
2005
320
100.0
2006
348
108.8
2007
366
114.4
2008
384
120.0
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
P2001
288
I2001 100
(100)
90
P2005
320
Base Year:
P2005
320
I2005 100
(100)
100
P2005
320
I2008
P2008
384
100
(100)
120
P2005
320
Ch. 16-5
Index Numbers: Interpretation
Prices in 2001 were 90% of
base year prices
I2005
P2005
320
100
(100) 100
P2005
320
Prices in 2005 were 100%
of base year prices
(by definition, since 2005 is
the base year)
I2008
P
384
2008 100
(100) 120
P2005
320
Prices in 2008 were 120%
of base year prices
P2001
288
I2001
100
(100) 90
P2005
320
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 16-6
Aggregate Price Indexes
An aggregate index is used to measure the rate
of change from a base period for a group of items
Aggregate
Price Indexes
Unweighted
aggregate
price index
Weighted
aggregate
price indexes
Laspeyres Index
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 16-7
Unweighted
Aggregate Price Index
Unweighted aggregate price index for period
t for a group of K items:
K
p ti
100 iK1
p0i
i1
K
p ti
i = item
t = time period
K = total number of items
= sum of the prices for the group of items at time t
i1
= sum of the prices for the group of items in time period 0
K
p
0i
i1
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 16-8
Unweighted Aggregate Price
Index: Example
Automobile Expenses:
Monthly Amounts ($):
Index
Year
Lease payment
Fuel
Repair
Total
(2007=100)
2007
260
45
40
345
100.0
2008
280
60
40
380
110.1
2009
305
55
45
405
117.4
2010
310
50
50
410
118.8
I2010
P
100
P
2004
2001
410
(100)
118.8
345
Unweighted total expenses were 18.8%
higher in 2010 than in 2007
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 16-9
Weighted
Aggregate Price Indexes
A weighted index weights the individual prices by
some measure of the quantity sold
If the weights are based on base period quantities the
index is called a Laspeyres price index
The Laspeyres price index for period t is the total cost of
purchasing the quantities traded in the base period at prices in
period t , expressed as a percentage of the total cost of
purchasing these same quantities in the base period
The Laspeyres quantity index for period t is the total cost of the
quantities traded in period t , based on the base period prices,
expressed as a percentage of the total cost of the base period
quantities
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 16-10
Laspeyres Price Index
Laspeyres price index for time period t:
K
q0ip ti
100 iK1
q0ip0i
i1
q0i = quantity of item i purchased in period 0
p0i = price of item i in time period 0
p ti = price of item i in period t
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 16-11
Laspeyres Quantity Index
Laspeyres quantity index for time period t:
K
qtip0i
100 iK1
q0ip0i
i1
p0i = price of item i in period 0
q0i = quantity of item i in time period 0
qti = quantity of item i in period t
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 16-12
16.2
The Runs Test for Randomness
The runs test is used to determine whether a
pattern in time series data is random
A run is a sequence of one or more occurrences
above or below the median
Denote observations above the median with “+”
signs and observations below the median with
“-” signs
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 16-13
The Runs Test for Randomness
(continued)
Consider n time series observations
Let R denote the number of runs in the
sequence
The null hypothesis is that the series is random
Appendix Table 14 gives the smallest
significance level for which the null hypothesis
can be rejected (against the alternative of
positive association between adjacent
observations) as a function of R and n
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 16-14
The Runs Test for Randomness
(continued)
If the alternative is a two-sided hypothesis on
nonrandomness,
the significance level must be doubled if it is
less than 0.5
if the significance level, , read from the table
is greater than 0.5, the appropriate
significance level for the test against the twosided alternative is 2(1 - )
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 16-15
Counting Runs
Sales
Median
Time
--+--++++-----++++
Runs: 1 2 3
4
5
6
n = 18 and there are R = 6 runs
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 16-16
Runs Test Example
n = 18 and there are R = 6 runs
Use Appendix Table 14
n = 18 and R = 6
the null hypothesis can be rejected (against the
alternative of positive association between adjacent
observations) at the 0.044 level of significance
Therefore we reject that this time series is random
using = 0.05
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 16-17
Runs Test: Large Samples
Given n > 20 observations
Let R be the number of sequences above or below
the median
Consider the null hypothesis H0: The series is random
If the alternative hypothesis is positive association
between adjacent observations, the decision rule is:
Reject H0 if
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
n
R 1
2
z
zα
2
n 2n
4(n 1)
Ch. 16-18
Runs Test: Large Samples
(continued)
Consider the null hypothesis H0: The series is random
If the alternative is a two-sided hypothesis of
nonrandomness, the decision rule is:
Reject H0 if
n
R 1
2
z
z α/2
2
n 2n
4(n 1)
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
n
R 1
2
or z
z α/2
2
n 2n
4(n 1)
Ch. 16-19
Example: Large Sample
Runs Test
A filling process over- or under-fills packages, compared
to the median
OOO U OO U O UU OO UU OOOO UU O UU
OOO UUU OOOO UU OO UUU O U OO UUUUU
OOO U O UU OOO U OOOO UUU O UU OOO U
OO UU O U OO UUU O UU OOOO UUU OOO
n = 100 (53 overfilled, 47 underfilled)
R = 45 runs
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 16-20
Example: Large Sample
Runs Test
(continued)
A filling process over- or under-fills packages,
compared to the median
n = 100 , R = 45
n
100
R 1
45
1
6
2
2
Z
1.206
2
2
n 2n
100 2(100) 4.975
4(n 1)
4(100 1)
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 16-21
Example: Large Sample
Runs Test
(continued)
H0: Fill amounts are random
H1: Fill amounts are not random
Test using = 0.05
Rejection Region
/2 = 0.025
Rejection Region
/2 = 0.025
1.96
0
1.96
Since z = -1.206 is not less than -z.025 = -1.96,
we do not reject H0
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 16-22
16.3
Time-Series Data
Numerical data ordered over time
The time intervals can be annually, quarterly,
daily, hourly, etc.
The sequence of the observations is important
Example:
Year:
2005 2006 2007 2008 2009
Sales:
75.3
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
74.2
78.5
79.7
80.2
Ch. 16-23
Time-Series Plot
A time-series plot is a two-dimensional
plot of time series data
the vertical axis
measures the variable
of interest
the horizontal axis
corresponds to the
time periods
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Ch. 16-24
Time-Series Components
Time Series
Trend
Component
Seasonality
Component
Copyright © 2010 Pearson Education, Inc. Publishing as Prentice Hall
Cyclical
Component
Irregular
Component
Ch. 16-25