# Correlation (or something similar) analysis between data with different sampling rates

I tried to do correlation analysis on the data with different sampling rates.

For example, I have two sensors, A and B. Each sensor collects data with different sampling rates, e.g., A: 10Hz, B: 1Hz.

I turned on and off these two sensors at the same time, and collect data for 2 minutes.

Then, sensor A will give 1200 samples of data, and sensor B will give 120 samples.

I want to know the relation of these two data samples, like the values or trends from sensor A and sensor B are very similar.

Correlation may be one method to show such a relation, but how can I do correlation analysis in case of different sampling rates between two data?

## 1 Answer

You can adjust the sampling rate of a sequence. For example, the data from sensor B can be interpolated to the same sampling frequency as sensor A.

Sample rate increase is called interpolation and, if working in matlab, there is a function for this.

Lowering the sample rate is called decimation, also supported in matlab.

Once at the same sampling rate, correlation is easier to calculate.

• Thank you for the answer. Btw, i have additional questions. Actually, I've considered up/down sampling or interpolation the you said, too. But, the concern is whether I can do that. Because, in case of pure time series data analysis, interpolation works. On the other hand, the goal of my data analysis is to show that data from different data source and with different sampling rates indicate same results. – Woo-hyeok Choi Apr 11 '17 at 7:30
• For example, sensor A and B are like wearable tracker and collect heart rate data. Assume that A measures HR more accurately. Then, comparing to sensor A, how accurate does sensor B measure HR? In this case, will up/down sampling or interpolation work? – Woo-hyeok Choi Apr 11 '17 at 7:30