Just because some correspondent posed an interesting question concerning methods of computation of autocorrelation, I began to play with it, nearly without any knowledge about time series and autocorrelation.

The correspondent arranged his data ($32$ data points of a time series) shifted by one time lag each besides so that he had a matrix of $32\times32$ data (as I understood him) where the first row are the original data, the second row the data shifted by $1$ time unit, the next row by another one and so on. I realized this additionally by glueing the end to the tail, so making "circular" datasets.

Then, just for looking what might come out of it, I computed the correlation matrix and from this the principal components. Surprisingly I got the image of a frequency-decomposition, and (again with other data) one frequency, say that with one period in the $32$ data was in the first principal component, and that with four periods was in the second PC and so on (I got $6$ "relevant" PC's with eigenvalue $>1$). First I thought this depends on the input data, but now I assume it is systematically this way by the special construction of the data set with its circular shifts (also known as "Toeplitz" matrix). Rotations of the PC-solution to varimax or other rotation-criteria gave slightly different, and possibly interesting, results, but in general seem to provide such a frequency-decomposition.

Here is a link to pictures which I've made from the $32$-point data set; the curves are simply made from the loadings of the factormatrix: one curve the loadings on one factor. The curve of the first PC1 should show the highest amplitudes (roughly because it bears the highest sum of loadingssquares)


  • Q1: Is this a feature by design? (of PCA with this type of dataset)
  • Q2: Is this approach indeed somehow usable for a serious approach to frequency-/wavelength analysis?

[update] here is the dataset (hope it shall come out being copyable for you)

  • $\begingroup$ Thanks @amoeba and for the lot of editing. I'd only seen two errors which I wanted to edit later, the question looks much nicer now! $\endgroup$ Commented Nov 11, 2014 at 16:44

1 Answer 1


Let me convert my earlier comment to an answer.

Do you imagine rows in your data matrix to be the variables or the samples? I will assume they are samples: i.e. you have $n=32$ different time series (samples).

Then, if all $n=32$ rows are identical, but only circularly shifted by $1$ position each, then the $n\times n$ Gram matrix of your data consisting of dot products between all pairs of rows will have Toeplitz structure: high values close to the diagonal and gradually decreasing to zero values away from it. Toeplitz matrices have consecutive Fourier modes as their eigenvectors (and eigenvectors of the Gram matrix are principal components, up to the scaling), so yes to your Q1: it is no surprise that you get sinusoidal waves of increasing frequencies as PCs.

No idea if it can be useful (Q2). In my experience, it tends to appear as an annoying artifact. I.e. people have some data, get something resembling Fourier modes out of PCA and start wondering what they could mean, whereas they are simply due to some time shifts in the original time series.

  • $\begingroup$ Well, very nice, thanks! Yes, I've thought the data along the rows. Q2 comes also because I've never understood up to today how exactly Fourier analysis works - and by accident this could have been one step into to get some intuition about (but this vague hope really seem to be fruitless here ...) $\endgroup$ Commented Dec 4, 2014 at 0:34
  • $\begingroup$ By the way, would you mind sharing your 32-valued time-series? I would like to insert a figure showing the Gram matrix, and I could do it directly with your data. $\endgroup$
    – amoeba
    Commented Dec 4, 2014 at 10:02
  • $\begingroup$ Did you see the link in my question? It redirects to a webpage which I made using exce.l It has 4 or 5 subpages, which are selectable by "firefox" in my installation by a clik on the tab-bar at the bottom of the screen. The first subpage shows the list of data. However vertically: one should take it as first row in a new table and add 31 rows while cycling to the right. If that's inconvenient I can also add the data into my question... $\endgroup$ Commented Dec 4, 2014 at 10:21
  • $\begingroup$ Oh wow, I did not realize it was a whole online spreadsheet, and not just a screenshot! Thanks. $\endgroup$
    – amoeba
    Commented Dec 4, 2014 at 10:24
  • $\begingroup$ A something similar holds even when the time series is random Brownian noise, in which case the PCA in the limit of many observations recovers the Karhunen-Loeve synosidal basis functions en.wikipedia.org/wiki/Kosambi–Karhunen–Loève_theorem#The_Wiener_process and similar for other autocorrelated processes. $\endgroup$ Commented Jan 29 at 17:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.