Time Series Models
An example of a time series for
25 periods is plotted in Fig. 1 from the numerical data in Table
1. The data might represent the weekly demand for some product.
We use x to indicate an observation and t
to represent the index of the time period. The observed demand
for time t is specifically designated .
The data from 1 through T is: .
The lines connecting the observations on the figure are provided
only to clarify the picture and otherwise have no meaning. Table 1. Weekly demand for weeks 1 through 30 Figure 1. A time series of weekly demand |
||||||||
Mathematical Model |
||||||||
Our goal is to determine a model
that explains the observed data and allows extrapolation into
the future to provide a forecast. The simplest model suggests
that the time series is a constant with variations about the
constant value determined by a random variable .
A more complex model includes a linear trend for
the data.
Of course (1) and (3) are special cases of a polynomial
model.
A model for a seasonal variation might include
transcendental functions. The cycle of the model below is 4.
The model might be used to represent data for the four seasons
of the year.
In every model considered here, the time series
is a function only of time and the parameters of the models.
We can write
Since for any given time the value of f
is a constant and the expected value of
is zero,
The model supposes that there are two components
of variability for the time series; the variation of the mean
value with time and the noise. Time is the only factor affecting
the mean value, while all other factors are described by the
noise component. Of course, these assumptions may not in fact
be true, but this section is devoted to cases that can be abstracted
to this simple form with reasonable accuracy.
One of the problems of time series analysis is
to find the best form of the model for a particular situation.
In this introductory discussion we are primarily concerned about
the simple constant or trend models. We leave the problem of
choosing the best model to a more advanced discussion.
In the following paragraphs we describe methods
for fitting the model, forecasting from the model and measuring
the accuracy of the forecast. We illustrate the discussion of
this section with the moving average forecasting method. Several
other methods are described on later pages.
|
||||||||
Fitting Parameters of the Model |
||||||||
Once a model is selected and data
is available, it is the job of the statistician to find parameter
values that best fit the historical data. We can only hope that
the resulting model will provide good predictions of future
observations. Statisticians usually assume all values in a given sample are equally valid. For time series however, most methods recognize that data from recent times are more representative of current conditions than data from times well in the past. Influences governing the data almost certainly change with time and a method should have the capability of neglecting old data while favoring the new. A model estimate should be able to change over time to reflect changing conditions. In this discussion, the time series model includes one or more parameters. We identify the estimated values of these parameters with hats on the parameter notation. To illustrate these concepts consider the data in Table 1. Say that the statistician has just observed the demand in period 20. She also has available the demands for periods 1 through 19. She cannot know the future, so the information shown as 21 through 30 is not available. The statistician thinks that the factors that influence demand are changing very slowly, if at all, and proposes the simple constant model for the demand as in Eq. 1. With the assumed model, the values of demand are random variables drawn from a population with mean value b. The best estimator of b is the average of the observed data. Using all 20 points the estimate is In general, the moving average estimator is the average of the last m observations. |
||||||||
Forecasting from the Model |
||||||||
The purpose of modeling a time
series is usually to make forecasts of the future. The forecasts
are used directly for making decisions such as ordering replenishments
for an inventory or staffing workers for production. They might
also be used as part of a mathematical model for a more complex
decision analysis. The current time is T, and the data for the actual demands for times 1 through T are known. Say we are attempting to forecast the demand at time . The unknown demand is the random variable , and its ultimate realization is . Our forecast of the realization is . Of course the best that we can hope to do is estimate the mean value of . Even if the time series actually follows the assumed model, the future value of the noise is unknowable. Assuming the model is correct
The parameters of the forecast are estimated from
the data for times 1 through T. Using a specific value
of
in this formula provides the forecast for time
. When we look at the last T observations as only one
of the possible time series that could have been observed, the
forecast is a random variable. We should be able to describe
the probability distribution of the random variable, including
its mean and variance.
For the moving average example, the statistician
adopts the model
Assuming T is 20 and using the moving
average with ten periods, the estimated parameter is
Since this model has a constant expected value
over time, the forecast is the same for all future periods.
Assuming the model is correct, the forecast is
the average of m observations all with the same mean
and standard deviation, .
Since the noise is normally distributed, the forecast is also
normally distributed with mean b and standard deviation
.
|
||||||||
Measuring the Accuracy of the Forecast |
||||||||
Table 2 shows a series of forecasts
for periods 11 through 20 using the data from Table 1. The forecasts
are obtained with a moving average using m equal to
10 and equal
to 1.
Table 2. Forecast errors
Although in practice one might round the forecasts
to an integers, we keep fractions here to observe better statistical
properties. The error of the forecast is the difference between
the observation and the forecast.
where n error observations are used to
compute the mean.
The sample variance of error is also a useful
measure. The standard deviation is the square root of the sample
variance.
Here
is the average error, and n is the number of observations.
As n grows the MAD provides a reasonable estimate of
the sample standard deviation.
From the example data we compute the MAD and standard
deviation for the ten observations.
We see that 1.25(MAD) = 5.138 is approximately
equal to the sample standard deviation.
The time series used as an example is simulated
with a constant mean. Deviations from the mean are normally
distributed with mean zero and standard deviation 5. The error
standard deviation includes the combined effects of errors in
the model and the noise so one would expect a value greater
than 5. Of course, a different realization of the simulation
will yield different statistical values.
|
||||||||
|
0 komentar:
Posting Komentar