Guide to Statistics: Probability & Statistics Facts, Formulae and Information

Print this page

Correlation

Given observations $$(x_i,\,y_i),~i=1, 2, \ldots, n~$$, on two random variables $$X$$ and $$Y$$ the Pearson (product moment) correlation between them is given by: \[r=\frac{s_{xy}}{\sqrt{s_{xx}s_{yy}}}= \frac{\sum{x_iy_i}-\frac{1}{n}\left(\sum{x_i}\sum{x_i}\right)}{\sqrt{\sum{x_i^2}-\frac{1}{n}\left(\sum{x_i}\right)^2} \sqrt{\sum{y_i^2}-\frac{1}{n}\left(\sum{y_i}\right)^2}}\] We use $$r$$ to estimate the correlation, $$\rho$$, between $$X$$ and $$Y$$. For large $$n$$, $$r$$ is approximately $$\sim N \left(\rho,\,\frac{1}{n-2}\right)$$.

The (Spearman) Rank Correlation Coefficient is given by \[r_S=1-\frac{6\sum{d_i^2}}{n\left(n^2-1\right)}\] where $$d_i$$ is the difference between the ranks of $$(x_i,\,y_i),~i=1, 2, \ldots, n$$. (If ranks are tied, see Kotz, S., and Johnson, L. (1986) Encyclopedia of Statistical Sciences, Vols. 1-9. New York: John Wiley and Sons.

contents

close this window