3.2 Just a Bunch of Sines and Cosines
In the temperature data example shown above, we neglected to include any sine terms in our model and focused on the cosine terms. However, we can also include sine terms to produce a more complete model. Again, assuming that n is even,
yt=a0+{n/2−1∑p=1apcos(2πtp/n)+bpsin(2πtp/n)}+an/2cos(πt) Note that technically there is no bn/2 because sin(πt)=0 for all integer t.
In the model above the total number of parameters is n. Now, a model with n parameters is generally not considered a useful model. It is certainly not parsimonious! But it might be more useful to not think of this as a model, but rather as a transformation of the data from n observed data points into a series of correlations (ap and bp) with respect to sines and cosines of different frequencies. In other words, we are presenting the exact same information in a different way.
Standard regression modeling theory tells us that the estimates of the ap and bp coefficients in the model are
ˆa0=ˉyˆap=∑nt=1(yt−ˉy)cos(2πtp/n)∑nt=1cos(2πtp/n)2=∑nt=1(yt−ˉy)cos(2πtp/n)n/2=2nn∑t=1(yt−ˉy)cos(2πtp/n)=2nn∑t=1ytcos(2πtp/n)ˆbp=2nn∑t=1ytsin(2πtp/n)
Each of the ˆaps and ˆbps are proportional to the covariance between the data yt and sines and cosines containing p cycles per n data points. We will note that the ˆaps and ˆaps are also proportional to the Fourier transform coefficients associated with frequency p, although they are generally not computed in this manner.