The Periodogram
The sample covariance between a series X and
is

Using the identity
and
formulas for geometric sums the mean of the sines can be evaluated. When
for an integer k, not 0, we find that
so that the sample covariance
is simply

For these special
we can also compute

so that the sample correlation between X and
is just

where
is the sample variance
.
Consider now adjusting
to maximize this correlation. The sine
can be rewritten as

so that we are simply choosing coefficients a and b to
maximize the correlation between X and
subject to the condition
.
Since correlations are scale invariant we can drop the condition
on a and b and miximize the correlation between X and the
linear combination of sine and cosine. This problem is solved by
linear regression; the coefficients are given by
where M is the T by 2 design matrix filled in with the sines and
cosines. In fact
and we see that the desired
regression coefficients are

and

The covariance between X and this best linear combination is

But in fact

which is just the modulus of the discrete Fourier transform
divided by T.
Definition: The periodogram is the function

Here are some periodogram plots for some data sets:
against frequency
for the sunspot data. The mean has been subtracted from the data.
Notice the peak at a frequency slightly below 0.1 cycles per year as well as a peak at a frequency close to 0.03.
Notice that the picture is clearly piecewise linear. This happens
because we are actually using the discrete Fourier transform which
computes the sample spectrum only at frequencies of the form
(in cycles per point) for integer values of K. There are only about
10 points on this plot.
) shows peaks just
below 10 years and just below 11.
for a denser grid of
. I use the SPlus function
transform<- function(x, a, b, n = 100)
{
f <- seq(a, b, length = n)
nn <- 1:length(x)
args <- outer(f, nn, "*") * 2 * pi
cosines <- cos(args) * x
sines <- sin(args) * x
one <- rep(1, length(x))
((cosines %*% one)^2 + (sines %*% one)^2)/length(x)
}
to compute lots of values for periods between 8 and 12 years.
. The apparent waves are actually
the effect of round off error in computing the log of something which is
algebraically 0 but numerically slightly different.
<\CENTER>