# Signal correlation vs Pearson correlation between signals

I have some data which are the sets of values uniformly distributed along some measure (simple example - along the time intervals). I tested both the coefficients and found the difference, some times essential. F.e. if both the data are noise-like, signal r is about 0.7, and Pearson r - about 0.25.

Which coefficient should be considered better and why?

I compute the signal correlation coefficient as $$r=\frac{\sum_ix_iy_i}{\sqrt{\sum_ix_i^2}\sqrt{\sum_iy_i^2}}$$

and Pearson correlation coefficient as $$r=\frac{\sum_i(x_i-m_x)(y_i-m_y)}{\sqrt{\sum_i(x_i-m_x)^2}\sqrt{\sum_i(y_i-m_y)^2}}$$

There are two fragments of pair of signals:

Fragment 1. Two signals with similar Signal- and Pearson- coefficients

Fragment 1 http://net2ftp.ru/node0/[email protected]/Signals1.png

Fragment 2. Two noise-like signals: Signal r = 0.7, Pearson r = 0.2

Fragment 2 http://net2ftp.ru/node0/[email protected]/Signals2.png

PS I do not need to performe cross-corelation, convolution etc.

• I think it's clear that both measures are the same when the signals are zero mean. If they're not zero mean, then which is better is completely dependant on what you want/can measure. For example, if you don't know the signals' means, you may be limited to your first coefficient.
– MBaz
Mar 21, 2016 at 3:01
• Of course you are right. It iis easy to calculate the means, and they are obviously non-zero. But does that mean, that I can not use signal correlation? I have added two images of pair of signals. The goal is to say how similar the signals are. Mar 24, 2016 at 4:27
• is DC considered part of what the measure of "similarity" is? or is it unimportant if $x_i$ has one DC value while $y_i$ is identical in appearance, but is offset by a different DC value? Mar 24, 2016 at 4:55
• Actually these signals are very far from electrical, but it doesn't matter. Yes, DC values are unimportant. Only the shapes signify. For instance, I have to identify that signal-1 is more or less similar to signal-0, than signal-2. Is it right to say, that signal correlation is inalienable from DC? Mar 24, 2016 at 6:05
• robert bristow-johnson, you right question gives me a right answer. To use the signal correlation I should to "normalize" data. Thank you. Mar 24, 2016 at 6:13

Thank robert bristow-johnson for the right question. In my case signal coefficient shows a some level of similarity between noise-like signals because of appreciable mean values. That is as you compare two electrical noises with some direct voltage: of course they are as more similar as high equal direct voltage they have. Since I need to compare specifically shapes, I should use Pearson method only (which "normalizes" data itself in terms of mean values).

• If this is your answer, you should give yourself the checkmark so others know it easily.
– Peter K.
May 23, 2016 at 11:01
• Bump bump bump!!
– Peter K.
Jun 24, 2016 at 15:45
• Sorry didn't see you comment. What do you mean "give yourself the checkmark"? Jun 25, 2016 at 20:57
• Oh sorry. Surely. Jun 26, 2016 at 8:16

The Pearson correlation gives you a measure of the degree of linear dependence between two variables.

Correlation refers to any of a broad class of statistical relationships involving dependence.From the cross-correlation function you can obtain the correlation coefficient which will give you a single value of similarity.

• Thank you, but it is a too common answer. To be more exact, it is not an answer my question . Mar 21, 2016 at 11:28