Which measure should be considered better and when ?

I tested both the measures on some data that I have and I got mixed results i.e. some are showing better results with Pearson and some with the Normalized Squared Error.

By similarity I mean similar shapes of the signals that I have.

I normalized the data before applying the measures to them.

  • $\begingroup$ Assuming that we are working with samples and not continuous-time signals, could you include in your question the formulas that you use for the mean-square error and the Pearson correlation coefficient? You might see a lot of similarity in them especially if you have "normalized" the data so that $$\sum_{i=1}^{N-1}(x[i])^2 = \sum_{i=1}^{N-1}(y[i])^2 = 1$$ or $$\sum_{i=1}^{N-1}(x[i]-\bar{x})^2 = \sum_{i=1}^{N-1}(y[i]-\bar{y})^2 = 1$$ where $\bar{x}$ and $\bar{y}$ are the average values of the signals. $\endgroup$ – Dilip Sarwate Jun 6 '13 at 21:40
  • $\begingroup$ Between what values ​should the MSEr be? $\endgroup$ – Luis Carlos Speletta Mar 9 '18 at 5:38

It depends on the normalization that you perform on the data. Note that for computing the Pearson correlation coefficient you subtract the means of the signals. This is normally not the case if you simply compute a mean squared error between the signals, unless mean removal is part of your normalization procedure. I assume you compute the Pearson correlation coefficient as


where $x_i$ and $y_i$ are the data to be compared, and $m_x$ and $m_y$ are their sample means. If the sample means are different, this will have no influence on the correlation coefficient $r$. Different means will, however, influence the mean squared error between the signals:


unless the normalization takes care of it.

If you assume that both signals have zero mean (or that the mean has been removed by normalization), and that both signals have been normalized to have an average power of 1

$$\frac{1}{n}\sum_{i=1}^{n}x_i^2=1,\quad \frac{1}{n}\sum_{i=1}^{n}y_i^2=1$$

then both error measures simplify to

$$r=\frac{1}{n}\sum_{i=1}^{n}x_iy_i,\quad MSE=2\left (1-\frac{1}{n}\sum_{i=1}^{n}x_iy_i\right)=2(1-r)$$

This means that with an appropriate normalization which removes the mean of both signals and normalizes their power to unity, both error measures are equivalent and one can be computed from the other.

Summarizing, in general the Pearson correlation coefficient gives you a better idea of the similarity of two signals. If you normalize the signals appropriately, then the MSE is equivalent to the correlation coefficient $r$ and there is a simple relation between them.


Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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