A time series plot is similar to a scatterplot with 'time' as the variable on the horizontal axis. Successive values are usually joined by lines to emphasise systematic movements in the series.
A few examples show time series with trend, seasonal pattern and other oscillations.
An example shows four different time series on the same graph.
Moving averages are a simple way to smooth out irregularities in a time series.
When an even number of values is used for the moving averages, the smoothed values are at times half-way between those of the raw data. The method can be modified to give smoothed values at the times of the original values.
Using running medians instead of means avoids the effect of outliers, but the result often looks 'stepped'. The use of running medians, followed by running means, is a good compromise.
Exponential smoothing replaces each value with a weighted average of it and previous values. Unlike moving averages, it can be used right up to the end of the series.
An alternative smoothing method that provides smoothed values to both ends of a time series is to obtain the smoothed value from a least squares line fitted to adjacent values.
A similar method can be used to draw a 'smooth' curve to represent a nonlinear relationship on a scatterplot.
Many time series steadily increase or decrease over time and a linear model may describe the trend. This kind of model can be fitted by least squares.
If the trend is nonlinear, a quadratic model might describe the trend better and can also be fitted by least squares.
Linear and quadratic models can be used to forecast future values.
If a quadratic model does not adequately describe a nonlinear trend, it is possible to add higher powers of time to the model. These polynomial models may give a smooth picture of past trend but should not be used to forecast into the future.
Polynomial models are only useful to describe a smooth long-term trend in a time series. A time series plot of least squares residuals (actual values minus trend) highlights shorter-term movements in the series.
Even after removal of trend, successive values in a time series are often correlated -- values above the trend are often followed by others above it and, similarly, values below the trend often occur together.
The similarity of successive values in a time series (or detrended time series) can be modelled by a linear model that forecasts each value (or detrended value) as a linear function of the previous one.
The trend should be removed before fitting an autoregressive model then added back to forecast future values.
A simple mechanism of autocorrelation of successive residuals can give the impression of trend when none is present in the underlying process.
Some time series vary in regular or irregular cycles. Irregular cycles can be modelled and forecast using the methods of this section but regular cycles (seasonal patterns) should be forecast with different methods.
Seasonal data may show a pattern that repeats at regular intervals.
Moving averages with order equal to the number of seasons can smooth out seasonal variation.
The average difference between the data and the corresponding smoothed values in any month is called the seasonal effect for that month.
Subtracting the seasonal effect from the raw data is called seasonally adjusting the data and the resulting values are called deseasonalised.
Seasonal data can be split into four components -- seasonal, trend, cyclical and residual.
The seasonal, trend and cyclical components of a time series can each be forecast into the future. Adding them provides a forecast for future values.
In some time series, the different components affect the data multiplicatively rather than additively. If the data are replaced by their logs, a multiplicative model becomes additive.
In a multiplicative model, the seasonal pattern has greater amplitude when the trend is higher.
A multiplicative model is fitted by using an additive model with the log data. The resulting forecasts are also of the log data, and so must be back-transformed to give a forecast in the original units.
Many types of data should be modified before attempting to interpret them in a time series plot. Seasonal adjustment, transforming to constant dollars and use of per capita data are examples.
Time series can describe processes that are discrete or continuous, and the measurements of continuous processes can be aggregates or snap-shots. The values can also be either discrete or continuous.
Index numbers are widely used in business and industry to measure the changes of one or more related quantities over time.
A simple price index measures the price of a single item or commodity as a percentage of its price at a base time.
An aggregate price index combines the prices of several related items into a single index number.
These indices allow aggregate price indices to give differing weights to the items that make up the index.
The effect of a quantity such as inflation can be removed from a time series by deflating it.