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 need to compare two sound signals for similarity, I took cross-correlation of both the signals and I got a cross-correlation signal, now I intend to use pearson correlation coeff formula to get the coeff out of it, by looking to the below formula it seems that I dont need to explicitly perform the cross-correlation since the formula takes both the signal arrays in the form of x and y, and it seems that the formula does both the things 1) perform the cross-correlation 2) calculate the correlation coeff. Am I right in understanding it?

enter image description here

share|cite|improve this question
up vote 1 down vote accepted

Very informally speaking, you are right.

A little less informally: The correlation coefficient, as the expectation or the variance, are statistical parameters of a random variable. If you don't know it, but you have some samples of the variable you can estimate it (not "calculate" it). In general, it does not make sense to speak of "the correct estimator", there can be several different reasonable estimators with some "better" or "worse" properties (according with several criteria).

What you wrote is a reasonable estimator of the correlation coefficient of two random variables. Not necessarily the best one (for one thing, it's biased ; see eg) but probably the most straightforward, and for many practical uses, the default choice.

Of course, this assumes you know what you are doing: i.e. this assumes that $X_i$ and $Y_i$ are samples of some random variable, and that you are interested in getting a scalar correlation. If you are dealing instead with a temporal correlation function, that's other thing.

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.