Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to determine the correlation coefficients of two timesets of data with unequal entries to detemine how often they move together. I am performing the following computation but would like input on the effectiveness of my method and how this may be improved.

I seek to determine the correlation between two sets of data. For example:

       dataset1                  dataset2
[ timestamp | value ]  |  [timestamp | value ]
   8:00:00     10           8:00:00      3
   8:00:01     7            8:00:03      4
   8:00:02     2            8:00:04      12
   8:00:03     7            8:00:05      7
   8:00:04     10           8:00:07      9
   9:43:00     10           9:43:01      3

Then I perform a standard Person Correlation Coefficient:

CORREL(dataset1.values, dataset2.values)

Which provides me with a correlation coefficient. Because of the nature of pearson's correlation coefficient, I am not sure that this coefficient is providing an accurate representation of how each data point in the series moves together second-to-second.

Any feedback on my methods are appreciated. Thank you!

share|cite|improve this question

You can view them as dependent time series. The zero lag cross correlation between the two series is what you want to estimate. Without any special structure on the structure of the bivariate time series the result will be what you are getting with the Pearson correlation. Zero lag means pairing elements in the series at a common time point which is exactly what you are doing with your Pearson correlation estimation approach. Unfortunately I do not see a good way to use information from data that is missing one of the elements of the pairs. I think you just have to leave that data out.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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