3.3 Partitioning the Variation

We can take an analysis of variance approach to the main model for \(y_t\) above and decompose the total variation in \(y_t\) as \(\sum_t (y_t-\bar{y})^2\) into a residual sum of squares and the variation attributable to the various frequencies.

\[\begin{eqnarray*} \sum_{t=0}^{n-1} (y_t-\bar{y})^2 & = & \sum_{t=0}^{n-1}\left[ \sum_{p=1}^{n/2}a_p\cos(2\pi pt/n)+b_p\sin(2\pi pt/n)\right]^2\\ & = & \sum_{t=0}^{n-1}\sum_{p=1}^{n/2} \left( a_p\cos(2\pi pt/n)+b_p\sin(2\pi pt/n) \right)^2 \end{eqnarray*}\] The second line is possible because all of the cross terms of the square are equal to zero, i.e. for all \(p\ne q\), \[\begin{eqnarray*} \sum_{t} \sin(2\pi pt/n)\sin(2\pi qt/n)& = & 0\\ \sum_{t} \cos(2\pi pt/n)\cos(2\pi qt/n)& = & 0\\ \sum_{t} \cos(2\pi pt/n)\sin(2\pi qt/n)& = & 0 \end{eqnarray*}\]

This then gives us

\[\begin{eqnarray*} \sum_{t=0}^{n-1} (y_t-\bar{y})^2 & = & \sum_{t=0}^{n-1}\sum_{p=1}^{n/2} a_p^2\cos(2\pi pt/n)^2 + b_p^2\sin(2\pi pt/n)^2 + 2a_pb_p\cos(2\pi pt/n)\sin(2\pi pt/n)\\ & =& \sum_{p=1}^{n/2}\left[ a_p^2 \sum_{t=0}^{n-1} \cos(2\pi pt/n)^2 + b_p^2 \sum_{t=0}^{n-1} \sin(2\pi pt/n)^2 + 2a_pb_p \sum_{t=0}^{n-1} \cos(2\pi pt/n)\sin(2\pi pt/n) \right] \end{eqnarray*}\] Again, the last cross term is equal to zero when we sum over \(t\). Flipping the two summations gives us \[ \sum_{t=0}^{n-1} (y_t-\bar{y})^2 = \sum_{p=1}^{n/2-1} \frac{n}{2}(a_p^2 + b_p^2) + n a_{n/2}^2 \] For \(p\ne n/2\) we can write \(R_p^2 = a_p^2 + b_p^2\). Then, if we divide through by \(n\) we can then write

\[ \frac{1}{n}\sum_{t=0}^{n-1} (y_t-\bar{y})^2 = \sum_{p=1}^{n/2-1} R_p^2/2 + a_{n/2}^2 \] If we interpret \(R_p^2/2\) is the amount of “energy” associated with variation at frequency \(p\), then the above equation states that the total variance of \(y_t\) is equal to the sum of the “energies” \(R_p^2/2\) associated with each frequency of variation. This is Parseval’s theorem.