How can I estimate some measure of correlation between two time-series of unequal size? Is it a good approach to interpolate to the same size? I just want to check for a trend in the values of a variable over time but my experiments had slightly different durations.

  • 7
    $\begingroup$ Can you be a bit more specific as to what you mean by "unequal size"? Are the series measured on different frequencies but over the same total period, or on the same frequency but different periods, or does one series have "holes" in it? $\endgroup$ Commented May 5, 2016 at 11:48
  • 1
    $\begingroup$ I would advise to decimate the bigger one instead. Interpolation introduces artefacts. All the best $\endgroup$ Commented May 5, 2016 at 12:51
  • $\begingroup$ Are you interested in contemporraneous correlation, or cross-period correlation? $\endgroup$ Commented May 5, 2016 at 13:23

1 Answer 1


The answer to such questions depends on understanding the properties you require of a similarity/correlation measure pertaining to your use case. If you describe your use case, we might be able to help you better.

If time series are of different lengths, you could do one of the following:

  • Rescale the longer series to a smaller length using averaging and then apply correlation.

  • Use Dynamic Time Warping https://en.wikipedia.org/wiki/Dynamic_time_warping, which uses an edit-distance like approach to computing similarity between two sequences of differing lengths.

  • Embed the two time series into a smaller, fixed-length "feature space" and then do similarity in the embedded space. The embedding could pick features of the time series that you are most interested in (e.g., number of peaks, auto-correlation at various lags, etc.)


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.