Pearson Correlation Coefficient

Suppose that we have 2 samples/columns, X and Y. N features from feature1 to featureN. The test statistics is computed as :

denominator1: ${{\sum X^2 - \frac{{\sum X}{\sum X}}{N}}}$

denominator2: ${{\sum Y^2 - \frac{{\sum Y}{\sum Y}}{N}}}$

r = $\frac{\sum{XY}-\frac{\sum {X}\sum{Y}}{N}}{\sqrt{denominator1*denominator2}}$

Suppose that we have 2 samples/columns, the test statistics is computed as :

Spearman-corr = $\frac{\sum{(X_i-\bar X)(Y_i-\bar Y)}}{\sqrt{\sum{(X_i-\bar X)^2}\sum{(Y_i-\bar Y)^2}}}$

where X_i is the rank of the ith X value, Y_i is the rank of the ith Y value, $\bar X$ is the mean of the $X_i$ values, and $\bar Y$ is the mean of the $Y_i$ values.

Real Example

Topic revision: r6 - 13 Sep 2005, ColeBeck
 

This site is powered by FoswikiCopyright © 2013-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Vanderbilt Biostatistics Wiki? Send feedback