σDelta Volume Docsdeltavolumedocs.org

Bar 04 · Series

Spectral analysis of series

A stationary series may be viewed as a mixture of oscillations at many frequencies. This page introduces the spectral density, sketches the periodogram, describes the frequency-domain view of a record, and outlines how a series may be filtered in that domain.

Two views of the same object

Time domain and frequency domain are two languages for one thing. In the time domain a stationary series is summarised by its autocovariance function of the lag. In the frequency domain the same series is summarised by a spectral density that spreads the variance across frequencies. The two summaries are linked by a pair of integral transforms: the autocovariance and the spectral density are each the transform of the other.

This duality is more than a curiosity. A dependence that is hard to see as a curve of lag can be obvious as a ridge at one frequency, and a periodicity that is plain to the ear can be read directly from the spectral picture.

The spectral density

The spectral density is a non-negative function on the range of frequencies, and its integral over any band gives the portion of the total variance carried by oscillations in that band. Its value is symmetric about zero, since a rotation in one direction and its opposite carry the same information, and it is defined on an interval of length equal to twice the sampling rate. Frequencies beyond that interval cannot be distinguished from ones inside it, a phenomenon called aliasing.

Several features translate cleanly. A series with no memory has a flat spectral density across all frequencies; white noise is therefore sometimes called flat-spectrum noise. A series with slow decay in its autocorrelation has a spectral density concentrated at low frequencies. A sharp peak at one frequency marks an oscillation at that rate.

frequency → density
Figure 1. A spectral density with a rise at low frequency and a flat tail, the signature of a series with more slow movement than fast.

The periodogram

The periodogram is the natural estimate of the spectral density obtained from a finite record. It is built by regressing the record on sine and cosine ripples at each candidate frequency and squaring the coefficients. Its expected value equals the true density, yet its variance does not shrink as the record grows, so the raw periodogram remains noisy at every length. This is why it is never used directly without some smoothing.

Smoothing is usually carried out by averaging the periodogram over neighbouring frequencies or by applying a taper at the ends of the record. The taper reduces leakage, the smearing of a sharp peak into its neighbours that arises from the abrupt beginning and end of a finite record.

Filtering in the frequency domain

Because the transform is linear, a filter that removes or emphasises a band of frequencies acts on the series by multiplying the spectral density by a weight function across the band. A low-pass filter keeps the slow movement and suppresses the fast; a high-pass filter does the reverse; a band-pass filter keeps a chosen band of frequencies and discards the rest. In the time domain the same operation is a weighted combination of neighbouring values, which is exactly the shape a moving-average construction takes.

The spectral view is most revealing when the dependence is rhythmic. When it is not, the time domain remains the simpler language, and the two should be chosen to suit the question asked.

With the summary side of series in view, the remaining pages turn to inference: how an unknown mean, an unknown variance or an unknown coefficient may be estimated from a record, and how a claim about them may be tested.