# Measuring correlation or dependence between two data sets

Is there any statistical test or measure to evaluation the degree of correlation or dependence between two sets of data-points ?

• Almost certainly. Can you give more information about what your 'points' consist of that you want to find correlations between? Commented Dec 3, 2012 at 20:12
• @Glen_b I don't have the I don't have the data-points on my computer, they are generated by a program on another computer. The data-points of the two datasets have only two attributes (x, y). Can you please tell me what are the statistical test or measure to evaluation the degree of correlation or dependence between two sets of data-points ?
– shn
Commented Dec 3, 2012 at 20:19
• I feel kind of embarrassed that you checked my answer already - I don't feel like I even understand your problem enough to help you properly yet. Did that really resolve your problem? Commented Dec 4, 2012 at 0:28
• @Glen_b What I was looking for is the second case, not the first one, and it seems that the canonical correlation analysis is what I was looking for.
– shn
Commented Dec 4, 2012 at 18:43

Sorry, it's still not clear - do you mean each data set has an x and a y, or that there's one x and one y?

You should give an example consisting of the first few data points to make it clear. Failing that, a few numbers like the first few data points would help.

It sounds kind of like the second, so that's what the first part of my answer covers. Then I discuss the first.

I) one x, one y

For measuring linear dependence between continuous x and y, there's the commonly used Pearson correlation, which has an associated statistical test (though it's not the only possible measure)

For monotonic dependence, there's Spearman's rho and Kendall's tau, which each have tests associated with them.

http://en.wikipedia.org/wiki/Correlation_and_dependence

http://en.wikipedia.org/wiki/Pearson_product-moment_correlation_coefficient

http://en.wikipedia.org/wiki/Spearman%27s_rank_correlation_coefficient

http://en.wikipedia.org/wiki/Kendall_tau

There are various other measures of association used in other circumstances.

--

II) one (x, y) pair vs another (x,y) pair

If you mean that your first set of data is two dimensional $(x_{1,i},y_{1,i}) \,\,$ , and your second data set is two dimensional $(x_{2,i},y_{2,i}) \,\,$ , then there are various ways to measure dependence or association depending on what kind of association you're trying to measure.

For example, one thing people might do is canonical correlation analysis. But there are a host of other things one might do, depending on what you're trying to achieve.