Brighton Webs Ltd.
Statistics for Energy and the Environment

Time Series Analysis

The main reason businesses devote resources to time series analysis is to forecast the future.  Time series methods are  one of the principal means of forecasting, the other is causal techniques.  Whilst causal models attempt to relate the behaviour of a predictable variable to the object of interest (e.g. Ice cream sales increase as winter gives way to spring), time series methods work on the assumption that the past is a guide to the future.  In other words, you can sketch a half decent sales forecast on to a graph of past results with a pencil.  Whatever the method used, it should be remembered the an economist in a suit  with a laptop full of data and software is doing much the same as a woman with a crystal ball at a funfair.

Example Data

The data used in this example can be found at the bottom of the page.

Components of a Time Series

There are three components to a time series model:

Trend

The trend is the amount by which the variable is changing over time.  In the example there is a year-on-year increase of 5%.  However, the trend in  real life time series often fluctuates and can be the subject of random variations.

Where there is no trend, the dataset is often referred to a stationary.

Seasonality

Data often contains seasonal variations.  Seasonal should be used in the widest sense to include a wide range of time intervals, such as weeks, months, quarters, religious festivals etc.  The example is based on quarterly fluctuations.  An important aspect of time series analysis is to identify the nature of seasonal variations, typically this is the selection of the number of data points to include in a moving average.

Noise

Noise is the random deviation from the expected value.  In the case of economic data, the cause is simply the perversity of human nature.  The effect of noise is reduced by averaging.

Moving Average

The basic technique for analyzing time series is the moving average.  There are many variations on the theme which are intended to handle variations in trend, avoid giving undue weight to very old data etc.

The example is based on a moving average of current value and the three proceeding data points.  Four points are selected because the data is quarterly.  This is shown in the table and the graph:

As can be seen from the graph, the four point moving average reveals the underlying trend.  The moving average can be extrapolated to form the basis for a forecast.  In this case the extrapolation has been done using a technique called double exponential smoothing.

Determining Seasonality

The seasonality can be expressed in terms of the current value to the moving average:

Seasonal factor = Current Value/Moving Average

For example, the seasonal factor for the 3rd quarter of 2001 is:

Seasonal factor = 83.1/50.5 = 1.65

The graph shows the seasonal factors, as can be seen these are independent of the trend, variations being due to noise.

This allows the average seasonal factor for each quarter to be calculated:

 Quarter Seasonal Factor 1 0.41 2 0.78 3 1.68 4 1.24

Forecast

At this point, we have extrapolated valued for the moving average and seasonal factors, it is simple process to derive a forecast.  The forecast values for each quarter are obtained by multiplying the extrapolated moving average by the seasonal factor.  this is shown in the example table and on the graph below:

Table used in Examples

 Year Quarter Value Four Point Moving Average Seasonal Factor 2000 1 16.9 2 44.0 3 74.6 4 59.2 48.7 1.22 2001 1 19.1 49.2 0.39 2 40.7 48.4 0.84 3 83.1 50.5 1.64 4 68.7 52.9 1.30 2002 1 17.7 52.5 0.34 2 41.2 52.6 0.78 3 94.8 55.6 1.71 4 60.7 53.6 1.13 2003 1 25.9 55.6 0.46 2 40.1 55.4 0.72 3 87.7 53.6 1.64 4 69.8 55.9 1.25 2004 1 19.2 54.2 0.35 2 43.6 55.1 0.79 3 104.5 59.3 1.76 4 80.1 61.8 1.29 2005 1 34.9 65.8 0.53 2 53.5 68.2 0.78 3 108.1 69.1 1.56 4 84.9 70.3 1.21 2006 1 30.8 75.1 0.41 2 60.0 76.9 0.78 3 132.2 78.7 1.68 4 99.8 80.5 1.24
Page modified: 13-May-2006