Correlation: Concept to Formula

105 Views Asked by At

In digital signal processing, we calculate the correlation between two discrete signals by multiplying corresponding samples of the two signals and then adding the products. Where does this process/formula for correlation come from?

I understand the concept of correlation (similarity) between two signals. But I fail to understand how it translates to the formula that it does.

All the texts I have seen so far start with this formula and explain cross correlation, auto correlation, etc. None of them attempt to explain how the formula was derived in the first place.

1

There are 1 best solutions below

2
On

The euclidean distance between two signals $(a_i)_i$ and $(b_i)_i$ that have euclidean magnitude equal to 1 is $\sum_i (a_i - b_i)^2 = \sum_i a_i^2 + \sum_i b_i^2 - 2 \sum_i a_i b_i = 2- 2 \sum_i a_i b_i$. So the correlation naturally arises as equivalent to the negative of the distance. If you believe that euclidean distance measures closeness, then closeness is high (distance is low) when the correlation (sum of products) is high, and vice versa. I hope that makes it more intuitive.