Sie sind auf Seite 1von 49

Statistics

for Management & Economics 10e


Identify • Compute • Interpret
GERALD KELLER • WILFRID LAURIER UNIVERSITY

© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use.
Chapter 20

Time Series Analysis and


Forecasting

© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.2
Time Series Analysis…
A variable measured over time (in sequential order) is called
a time series. From this data, we analyze it to detect patterns
that will enable us to forecast future values of the variable.

As you might expect, this technique has wide application:


u Governments want to know future values of interest rates,
unemployment rates and percentage increases in the cost of living.
v Housing industry economists must forecast mortgage interest rates,
demand for housing, and the cost of building materials.
w Many companies attempt to predict the demand for their product
and their share of the market.
x Universities and colleges often try to forecast the number of
students who will be applying for acceptance at post-secondary-school
institutions.
…and so on!
© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.3
Time Series Components…
A time series can consist of four different components:
u Long-term trend
v Cyclical variation

variable of interest
w Seasonal variation
x Random variation

A trend is a long term


relatively smooth pattern or
direction, that persists usually
for more than one year
time

© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.4
Time Series Components…
A time series can consist of four different components:
u Long-term trend
v Cyclical variation

variable of interest
w Seasonal variation
x Random variation

A cycle is a wavelike pattern


describing a long term behavior
(for more than one year).
time
Cyclical patterns that are consistent
and predictable are quite rare; hence,
we will ignore this type of variation
© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.5
Time Series Components…
A time series can consist of four different components:
u Long-term trend
v Cyclical variation

variable of interest
w Seasonal variation
x Random variation

The seasonal component of


the time series exhibits a short
term (less than one year)
calendar repetitive behavior.
time

© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.6
Time Series Components…
A time series can consist of four different components:
u Long-term trend
v Cyclical variation

variable of interest
w Seasonal variation
x Random variation

Random variation comprises


the irregular unpredictable
changes in the time series. It
tends to hide the other (more
predictable) components.
time
One of our objectives will be to
remove random variation…
© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.7
Smoothing Techniques…
If we can determine which components actually exist in a
time series, we can develop better forecasts.

We can reduce random variation by smoothing the time


series.

To methods to smooth the data are:


 moving averages, and
 exponential smoothing.

© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.8
Moving Averages…
A moving average for a time period is the arithmetic mean
of the values in that time period and those close to it. This is
what we hear something like “three year moving average”.

time
1 2 3 4 5 …
Example 20.1: period

sales
[Xm20-01] 39 37 61 58 18 …
(,000s)

and so on…

© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.9
Example 20.1… COMPUTE

Again, calculating manually can be tedious and error prone.


In Excel: Data > Data Analysis > Moving Average

note how the moving average is


“smoother” than the raw data…

© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.10
Moving Average… INTERPRET

The averaging process removes some of the random variation. If we


use a 5-quarter moving average, removes even more variation and
our line is smoother, but now we’ve lost the seasonality that appears in
the 3-quarter moving average.

© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.11
Centered Moving Average…
We’ve considered moving averages for odd numbers of time
periods:

3-period:

5-period:

What happens when we use even numbers of periods to


calculate moving averages?

© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.12
Centered Moving Average…
With an even number of observations included in the
moving average, the average is placed between the two
periods in the middle.

To place the moving average in an actual time period, we


need to center it.

Two consecutive moving averages are centered by taking


their average, and placing it in the middle between them.

© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.13
Centered Moving Average…
Consider this 6-period time series:
15, 27, 20, 14, 25, 11
Can we calculate its four-period moving average?

© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.14
Exponential Smoothing…
There are two drawbacks with the moving average method
of smoothing:
 No moving averages for the first and last sets of
time periods.
 The moving average “forgets” most of the previous
time-series values (i.e. only looks at those around it).

Exponential smoothing addresses these issues…

© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.15
Exponentially Smoothed Time Series…
An exponentially smoothed time series is one that’s given by

St = wyt + (1 – w)St-1 (for t ≥ 2)

where:
St = Exponentially smoothed time series at time t
yt = Time series at time period t (our original data)

St-1 = Exponentially smoothed time series at time t–1


w = Smoothing constant, where 0 ≤ w ≤ 1
In general:

© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.16
Example 20.2… COMPUTE

We can calculate these values manually…


S1 = y1

St = wyt + (1 – w)St-1

© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.17
Example 20.2… COMPUTE

Excel > Data > Data Analysis > Exponential Smoothing


Xm20-02

1–w

© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.18
Example 20.2… INTERPRET

With w = .7, we have very little smoothing.


With w = .2, we have too much smoothing.

© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.19
Trend and Seasonal Effects…
A trend can be linear or nonlinear (or, in fact, take any
number of functional forms).

The easiest way of measuring the long-term trend is by


regression analysis, where the independent variable is time.

Linear Trend Quadratic Trend

© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.20
Seasonal Analysis…
Seasonal variation may occur within a year or within shorter
intervals, such as a month, week, or day.

To measure the seasonal effect, we compute seasonal


indexes, which gauge the degree to which the seasons differ
from one another.

Employment numbers, for example, are seasonally


adjusted to account for summer jobs of students, etc. Was
the change in employment numbers due to seasonality or a
real change in the economy?

© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.21
Computing Seasonal Indexes…
We can use this procedure to compute seasonal indexes:

u Compute the sample regression line:

v For each time period, compute the ratio:

w For each type of season, compute the average of the ratios


from step v

x Adjust the averages in w so the average of all seasons = 1

© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.22
Example 20.3… Compute

Calculate the seasonal indexes to account for variations in


Bermuda hotel occupancy rates from Xm20-03:
Year Rate Quarter Time Y-hat
2009 0.561 1 1 0.645
0.702 2 2 0.650 Add the independent variable, time…
0.800 3 3 0.655

2010
0.568
0.575
4
1
4
5
0.660
0.666
Compute the sample regression line:
0.738 2 6 0.671
0.868 3 7 0.676
0.605 4 8 0.681 Regression
2011 0.594 1 9 0.687 Analysis…
0.738 2 10 0.692
0.729 3 11 0.697

2012
0.600
0.622
4
1
12
13
0.702
0.708
Add a new spreadsheet column…
0.708 2 14 0.713
0.806 3 15 0.718
0.632 4 16 0.723
2013 0.665 1 17 0.729
0.835 2 18 0.734
0.873 3 19 0.739
0.670 4 20 0.744

© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.23
Example 20.3… Compute

For each time period, compute the ratio: Occ. Rate/Y-hat


Year Rate Quarter Time Y-hat Ratio
2009 0.56 1 1 0.645 0.870
0.7 2 2 0.650 1.080
0.800 3 3 0.655 1.221
0.57 4 4 0.660 0.860
2010 0.58 1 5 0.666 0.864
0.74 2 6 0.671 1.100
0.87 3 7 0.676 1.284
0.61 4 8 0.681 0.888
2011 0.59 1 9 0.687 0.865
0.74 2 10 0.692 1.067
0.73 3 11 0.697 1.046
0.600 4 12 0.702 0.854
2012 0.62 1 13 0.708 0.879
0.71 2 14 0.713 0.993
0.81 3 15 0.718 1.122
0.63 4 16 0.723 0.874
2013 0.67 1 17 0.729 0.913
0.84 2 18 0.734 1.138
0.87 3 19 0.739 1.181
0.670 4 20 0.744 0.900
© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.24
Example 20.3… Compute

For each type of season, compute the average of the ratios


from step

2009
2010
2011
2012
2013

© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.25
Example 20.3… Compute

Adjust the averages so the average of all seasons = 1

2009
2010
2011
2012
2013

No adjustments are required since:

Average of
all seasons

© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.26
Example 20.3… COMPUTE

Alternatively, you can set up the data in this fashion:

[ yt ] [season code]

and use the


Seasonal Indexes tool
from Data Analysis Plus

© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.27
Example 20.3 INTERPRET

The seasonal indexes tell us that, on average, the occupancy


rates in the first and fourth quarters are below the annual
average, and the occupancy rates in the second and third
quarters are above the annual average.

E.g., we expect the occupancy rate in the first quarter to be


12.2% (100% - 87.8%) below the annual rate, and 7.6%
above for the second quarter, etc.
© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.28
Time Series and Trend…
Here is the time series data and the regression line together:

© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.29
Deseasonalizing a Time Series…
One application of seasonal indexes is to remove the
seasonal variation in a time series, by deseasonalizing. The
result is called a seasonally adjusted time series. This allows
us to more easily compare the time series across seasons…

Actual Time Series


Seasonally Adjusted Time Series = Season Index

2009
2009
2009
200
2010
2010
© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.30
Effects of “Deseasonalization”…
Here we’re comparing the original occupancy rate time
series data with the seasonally adjusted time series data:

© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.31
Interpretation…
Compared to a horizontal line, we can see that occupancy
rates are rising over time…

© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.32
Introduction to Forecasting…
There are many different forecasting models available to us.
One way to choose with method or model to use is to select
the technique with the greatest forecast accuracy. Two
measures of this quantity are:

Mean Absolute Deviation (MAD):

and Sum of Squares for Forecast Error (SSE):

(yt = actual value of time series at time t, Ft = forecasted value, n =


number of time periods)

© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.33
Which to use? SSE? MAD?
MAD averages the absolute differences
between the actual and forecast values.

SSE is the sum of the squared differences.

Which measure to use in judging forecast accuracy depends


on the circumstances:

 If avoiding large errors is important SSE should be used


because it penalizes large deviations more heavily than does
MAD. Otherwise use MAD.
© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.34
Model Selection…
Here is a useful procedure for model selection:

u Use some of the observations to develop several


competing forecasting models.

v Run the models on the rest of the observations.

w Calculate the accuracy of each model.

x Select the model with the best accuracy measure

© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.35
Example 20.4…
We have developed three forecasting models; which model
performed best?

2010
2011
2012
2013

E.g. Actuals vs. Forecast #1…

© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.36
Example 20.4… INTERPRET

2010
2011
2012
2013

Model 2 is inferior to both models 1 and 3 – drop it.

Using MAD, model 3 is best, but using SSE, model 1 is most


accurate. So? Which one to choose?!

© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.37
Example 20.4… INTERPRET

2010
2011
2012
2013

The choice between model 1 and model 3 should be made on


the basis of whether we prefer a model that consistently
produces moderately accurate forecasts (model 1) or one
whose forecasts come quite close to most actual values but
miss badly in a small number of time periods (model 3).

© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.38
Forecasting Models…
The choice of a forecasting technique depends on the
components identified in the time series. Three techniques
will be discussed…
Exponential smoothing,
Seasonal indexes, and
Autoregressive models.

© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.39
Forecasting with Exponential Smoothing…
IF the time series
— displays a gradual or no trend, and
— no evidence of seasonal variation,
THEN exponential smoothing can be effective as a
forecasting method.

The forecast for period t+k (k=1, 2, 3,…) is given by:


Ft+k = St

where St is the exponentially smoothed value computed


using techniques discussed earlier.
© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.40
Forecasting with Exponential Smoothing…
k=1 Ft+1 = St
k=2 Ft+2 = St
k=3 Ft+3 = St

As you can see, we can produce a reasonably accurate


prediction for the next time period (t+1), but the accuracy of
the forecast decreases rapidly more than one time period into
the future (i.e. t+2, t+3, …)

© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.41
Forecasting with Seasonal Indexes…
IF the time series
— is composed of seasonal variation, and
— has a long-term trend,
THEN we can use seasonal indexes and the regression
equation to forecast.

The forecast for time period t is:


Ft = [b0 + b1t] x SIt

© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.42
Example 20.5…
Forecast hotel occupancy rates for the next year in Example
20.3…

We know…
the regression line:
and
the Seasonal Indexes:

Put them all together using: Ft = [b0 + b1t] x SIt

© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.43
Example 20.5…
Ft = [b0 + b1t] x SIt

Continuing into the next year (through the first to fourth


quarter, i.e. time periods 20+1, 20+2, 20+3, and 20+4):

That is, we forecast the quarterly occupancy rates to be:


.658, .812, .890, and .670

© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.44
Autoregressive Model…
IF the time series
— has no obvious trend or seasonality, but
— we believe that there is a correlation between
consecutive residuals
THEN the autoregressive model may be most effective.

The autoregressive forecasting model is given by:

and is estimated using the regression line:

© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.45
Example 20.6
The consumer price index (CPI) is a general measure of
inflation and is widely used. Consider the annual percent
increases in CPI collected over 33 year years and forecast
next year’s change in the CPI.

© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.46
Example 20.6
Year CPI % Change Year CPI % Change
1980 82.4 1997 160.5 2.3%
1981 90.9 10.4% 1998 163.0 1.5%
1982 96.5 6.2% 1999 166.6 2.2%
1983 99.6 3.2% 2000 172.2 3.4%
1984 103.9 4.4% 2001 177.0 2.8%
1985 107.6 3.5% 2002 179.9 1.6%
1986 109.7 1.9% 2003 184.0 2.3%
1987 113.6 3.6% 2004 188.9 2.7%
1988 118.3 4.1% 2005 195.3 3.4%
1989 123.9 4.8% 2006 201.6 3.2%
1990 130.7 5.4% 2007 207.3 2.9%
1991 136.2 4.2% 2008 215.3 3.8%
1992 140.3 3.0% 2009 214.6 -0.3%
1993 144.5 3.0% 2010 218.1 1.6%
1994 148.2 2.6% 2011 224.9 3.1%
1995 152.4 2.8% 2012 229.6 2.1%
1996 156.9 2.9%

© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.47
Example 20.6 COMPUTE

Remember, we’re trying to correlate the CPI in time period t with the
previous time period, t–1, hence we modify the dataset from the list
set-up in the first Excel snippet to the set-up in the second (which is
how the dataset Xm20-06 is structured).

Now we can run the Regression tool…

© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.48
Example 20.6… COMPUTE

Our regression analysis runs…

ŷ t  .0175  .3910 y t 1
Because the last CPI change is 2.1%, our forecast for 2013 is

ŷ 2013  .0175  .4053 y 2012  .0175  .3910 (2.1)  .84

The autoregressive model forecasts a .84% increase in the


CPI for the year 2013.

© 2015 Cengage Learning. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a
license distributed with a certain product or service or otherwise on a password-protected website for classroom use. 20.49

Das könnte Ihnen auch gefallen