Chapter GoalsAfter completing this chapter, you should be able to: Compute and interpret index numbers Weighted and unweighted price index Weighted quantity index Test for random
Trang 1Chapter 16
Time-Series Analysis and
Statistics for Business and Economics
7 th Edition
Trang 2Chapter 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
Trang 3 Base period index = 100 by definition
Used for an individual item or measurement
16.1
Trang 4Single 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 0 denote the price in the base period
Let p 1 be the price in a second period
The price index for this second period is
Trang 5Index Numbers: Example
Airplane ticket prices from 2000 to 2008:
90 320
288 (100)
P
P 100
320 (100)
P
P 100
Trang 6Index Numbers: Interpretation
Prices in 2001 were 90% of base year prices
Prices in 2005 were 100%
of base year prices (by definition, since 2005 is the base year)
Prices in 2008 were 120%
of base year prices
90
(100) 320
288 100
P
P I
320 100
P
P I
384 100
P
P I
2005 2008
Trang 7Aggregate 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
Trang 8Unweighted Aggregate Price Index
Unweighted aggregate price index for period
t for a group of K items:
1 i
0i
K
1 i
ti
p
p 100
= sum of the prices for the group of items at time t
= sum of the prices for the group of items in time period 0
K1iti
p p
Trang 9Unweighted Aggregate Price
410 (100)
P
P 100
Trang 10Weighted 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
Trang 11Laspeyres Price Index
1 i
0i 0i
K
1 i
ti 0i
p q
p
q 100
= quantity of item i purchased in period 0
= price of item i in time period 0
Laspeyres price index for time period t:
0i
q
0i
p
Trang 12Laspeyres Quantity Index
1 i
0i 0i
K
1 i
0i ti
p q
p
q 100
0i
p = price of item i in period 0
= quantity of item i in time period 0
= quantity of item i in period t
Laspeyres quantity index for time period t:
ti
0i
q q
Trang 13The 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
16.2
Trang 14The Runs Test for Randomness
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
(continued)
Trang 15The Runs Test for Randomness
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 two- sided alternative is 2(1 - )
(continued)
Trang 17Runs Test Example
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
n = 18 and there are R = 6 runs
Trang 18Runs Test: Large Samples
Given n > 20 observations
Let R be the number of sequences above or below
the median Consider the null hypothesis H 0 : The series is random
If the alternative hypothesis is positive association
between adjacent observations, the decision rule is:
α 2
1) 4(n
2n n
1 2
n R
z if
Trang 19Runs Test: Large Samples
Consider the null hypothesis H 0 : The series is random
If the alternative is a two-sided hypothesis of
nonrandomness, the decision rule is:
α/2 2
α/2 2
1) 4(n
2n n
1 2
n R
z or
z 1)
4(n
2n n
1 2
n R z
if H
Trang 20Example: Large Sample
Runs Test
A filling process over- or under-fills packages,
compared to the median
Trang 21Example: Large Sample
Runs Test
1.206 4.975
6
1) 4(100
2(100) 100
1 2
100 45
1) 4(n
2n n
1 2
n R
Trang 22Example: Large Sample
H 0 : Fill amounts are random
H 1 : Fill amounts are not random
Test using = 0.05
(continued)
Trang 23Time-Series Data
Numerical data ordered over time
The time intervals can be annually, quarterly,
daily, hourly, etc.
The sequence of the observations is important
Sales: 75.3 74.2 78.5 79.7 80.2
16.3
Trang 24Time-Series Plot
the vertical axis
measures the variable
of interest
the horizontal axis
corresponds to the
time periods
plot of time series data
Trang 25Time-Series Components
Time Series
Cyclical Component
Irregular Component
Trend
Component
Seasonality Component
Trang 26Trend Component
Long-run increase or decrease over time
(overall upward or downward movement)
Data taken over a long period of time
Upwar d trend
Sales
Trang 27Trend Component
Trend can be linear or non-linear
Trang 28Seasonal Component
Short-term regular wave-like patterns
Observed within 1 year
Often monthly or quarterly
Trang 29Cyclical Component
Long-term wave-like patterns
Regularly occur but may vary in length
Often measured peak to peak or trough to
trough
Sales
1 Cycle
Trang 30Irregular Component
Unpredictable, random, “residual” fluctuations
Due to random variations of
Nature
Accidents or unusual events
“Noise” in the time series
Trang 31Time-Series Component Analysis
Used primarily for forecasting
Observed value in time series is the sum or product of components
Additive Model
Multiplicative model (linear in log form)
where Tt = Trend value at period t
t t
t t
t t t t
t T S C I
X
Trang 32Moving Averages:
Smoothing the Time Series
Calculate moving averages to get an overall
impression of the pattern of movement over time
This smooths out the irregular component
Moving Average: averages of a designated
number of consecutive time series values
16.4
Trang 33(2m+1)-Point Moving Average
A series of arithmetic means over time
Result depends upon choice of m (the
number of data values in each average)
Examples:
For a 5 year moving average, m = 2
For a 7 year moving average, m = 3
Replace each x t with
Trang 34x x
x
x * 1 2 3 4 5 5
x x
x
x * 2 3 4 5 6 6
Trang 35Example: Annual Data
Annual Sales
0 10 20 30 40 50 60
Trang 36Calculating Moving Averages
Each moving average is for a consecutive block of (2m+1) years
5-Year Moving Average
25 40
23
etc…
Let m = 2
Trang 37Annual vs Moving Average
Trang 38Centered Moving Averages
Let the time series have period s, where s is even number
i.e., s = 4 for quarterly data and s = 12 for monthly data
To obtain a centered s-point moving average series X t*:
Form the s-point moving averages
Form the centered s-point moving averages
j t
* 5
2
s n ,
2, 2
s 1, 2
s , 2
s (t
x
) 2
s n ,
2, 2
s 1, 2
s (t
2
x x
x
* 5 t
* 5 t
*
Trang 39Centered Moving Averages
Used when an even number of values is used in the moving average
Average periods of 2.5 or 3.5 don’t match the original periods, so we average two consecutive moving averages to get centered moving averages
Average Period
4-Quarter Moving Average
Centered Moving Average
Trang 40Calculating the Ratio-to-Moving Average
Divide the actual sales value by the centered
moving average for that period
* t
t
x x 100
Trang 41Calculating a Seasonal Index
Quarter Sales
Centered Moving Average
Moving Average
29.88 32.00 34.00 36.25 38.13 39.00 40.13
83.7 84.4 94.1 132.4 86.5 94.9 92.2
83.7 29.88
25 (100)
Trang 42Calculating Seasonal Indexes
Quarter Sales
Centered Moving Average
Moving Average
Ratio-to-1 2 3 4 5 6 7 8 9 10 11
…
23 40 25 27 32 48 33 37 37 50 40
…
29.88 32.00 34.00 36.25 38.13 39.00 40.13 etc…
… …
83.7 84.4 94.1 132.4 86.5 94.9 92.2 etc…
…
…
1 Find the median
of all of the same-season values
Trang 43Interpreting Seasonal Indexes
Suppose we get these
Spring sales average 82.5% of the annual average sales
Summer sales are 31.0% higher than the annual average sales etc…
Interpretation:
Trang 44Exponential Smoothing
A weighted moving average
Weights decline exponentially
Most recent observation weighted most
Used for smoothing and short term forecasting (often one or two periods into the future)
16.5
Trang 45 The weight is:
Close to 0 for smoothing out unwanted cyclical and irregular components
Close to 1 for forecasting
(continued)
Trang 46Exponential Smoothing Model
Exponential smoothing model
where:
= exponentially smoothed value for period t = exponentially smoothed value already
computed for period i - 1
x t = observed value in period t = weight (smoothing coefficient), 0 < < 1
1
1 x
t 1
xˆ
n) , 1,2,
t 1;
Trang 47Exponential Smoothing Example
Suppose we use weight = 2
Time
Period
(i)
Sales (Yi)
Forecast from prior period (Ei-1)
Exponentially Smoothed Value for this period (Ei)
23 26.4 26.12 26.296 27.437 31.549 31.840
23 (.2)(40)+(.8)(23)=26.4 (.2)(25)+(.8)(26.4)=26.12 (.2)(27)+(.8)(26.12)=26.296 (.2)(32)+(.8)(26.296)=27.437 (.2)(48)+(.8)(27.437)=31.549 (.2)(48)+(.8)(31.549)=31.840 (.2)(33)+(.8)(31.840)=32.872
= x1since no prior information exists
1
xˆ
t 1
t
t 0.2 x (1 0.2)x
x ˆ ˆ
Trang 48Sales vs Smoothed Sales
generally a little low,
since the trend is
upward sloping and
the weighting factor
is only 2
0 10 20 30 40 50 60
Trang 49Forecasting Time Period (t + 1)
The smoothed value in the current period (t)
is used as the forecast value for next period (t + 1)
At time n, we obtain the forecasts of future values, X n+h of the series
) 1,2,3
(h x
Trang 50Exponential Smoothing in Excel
exponential smoothing
The “damping factor” is (1 - )
Trang 51 To perform the Holt-Winters method of forecasting:
Obtain estimates of level and trend T t as
Where and are smoothing constants whose
values are fixed between 0 and 1
Standing at time n , we obtain the forecasts of future
values, X of the series by
Forecasting with the Holt-Winters Method: Nonseasonal Series
t
xˆ
1 2
2 2
x ˆ
n) , 3,4, t
1;
α (0
αx )
T x
α)(
(1
x ˆ t ˆ t 1 t 1 t
n) , 3,4, t
1;
β (0
) x x
β(
β)T (1
T t t 1 ˆ t ˆ t 1
Trang 52 Assume a seasonal time series of period s
a set of recursive estimates from historical series
These estimates utilize a level factor, , a
trend factor , , and a multiplicative seasonal factor ,
Forecasting with the Holt-Winters
Method: Seasonal Series
Trang 53 The recursive estimates are based on the following
equations
Forecasting with the Holt-Winters
Method: Seasonal Series
1) α
(0 F
x α ) T x
α)(
(1
x
s t
t 1
t 1
1)
(0 x
x )F
(1
F
t
t s
t
ˆ
1) β
(0 )
x x
β(
β)T (1
T t t 1 ˆ t ˆ t 1
Where is the smoothed level of the series, T xˆ is the smoothed trend
(continued)
Trang 54 After the initial procedures generate the level,
trend, and seasonal factors from a historical
series we can use the results to forecast future values h time periods ahead from the last
observation X n in the historical series
The forecast equation is
s h t t
t h
n ( x hT )F
where the seasonal factor, F t , is the one generated for
the most recent seasonal time period
Forecasting with the Holt-Winters
Method: Seasonal Series
(continued)
Trang 55Autoregressive Models
Used for forecasting
Takes advantage of autocorrelation
1st order - correlation between consecutive values
2nd order - correlation between values 2 periods apart
p th order autoregressive model :
t p
t p 2
t 2 1
t 1
16.6
Trang 56Autoregressive Models
Let X t (t = 1, 2, , n) be a time series
A model to represent that series is the autoregressive
model of order p :
where
, 1 2 , , p are fixed parameters
t are random variables that have
mean 0
constant variance
and are uncorrelated with one another
t p
t p 2
t 2 1
t 1
x γ φ φ φ ε
(continued)
Trang 57Autoregressive Models
The parameters of the autoregressive model are estimated through a least squares algorithm, as the values of , 1 2 , , p for which the sum of
squares
is a minimum
2 p t p 2
t 2 1
t 1
n
1 p t
Trang 58Forecasting from Estimated
Autoregressive Models
Consider time series observations x 1 , x 2 , , x t
Suppose that an autoregressive model of order p has been fitted to these data:
Standing at time n, we obtain forecasts of future values of the
series from
Where for j > 0, is the forecast of X t+j standing at time n and for j 0 , is simply the observed value of X t+j
t p
t p 2
t 2 1
t 1
x γ ˆ φ ˆ φ ˆ φ ˆ ε
) 1,2,3, (h
x x
x
x ˆ t h γ ˆ φ ˆ 1 ˆ t h 1 φ ˆ 2 ˆ t h 2 φ ˆ p ˆ t h p
j n
x ˆ
j n
x ˆ
Trang 59The Office Concept Corp has acquired a number of office
units (in thousands of square feet) over the last eight years Develop the second order autoregressive model.
Trang 60t 3.5 0.8125x 0.9375x
Trang 61Autoregressive Model Example: Forecasting
Use the second-order equation to forecast
number of units for 2010:
4.625
0.9375(4) 0.8125(6)
3.5
) 0.9375(x
) 0.8125(x
3.5 x
0.9375x 0.8125x
3.5 x
2008 2009
2010
2 t 1
t t
Trang 62Autoregressive Modeling Steps
Test model for significance
Use model for forecasting
Trang 63Chapter Summary
Discussed weighted and unweighted index numbers
Used the runs test to test for randomness in time series data
Addressed components of the time-series model
Addressed time series forecasting of seasonal data
using a seasonal index
Performed smoothing of data series
Moving averages
Exponential smoothing