What is the formula for Pearson correlation?

The Pearson correlation is denoted with r and calculated as follows:

\[r = \frac{covariance\:of\:x\:and\:y}{variability\:of\:x\:and\:y\:seperately}\]

or:

\[r = \frac{\sum{(x-\bar{x})(y-\bar{y})}}{\sqrt{\sum{(x-\bar{x})^2}\sum{(y-\bar{y})^2}}}\]

which is the same as:

\[r = \frac{N \sum{xy}-(\sum{x})(\sum{y})}{\sqrt{[N\sum{x^2}-(\sum{x})^2] [N\sum{y^2}-(\sum{y})^2]}}\]

  • N: number of pairs of scores
  • x: x scores
  • y: y scores
  • : mean of x scores
  • ȳ: mean of y scores

 

Comments & Kudos

Add new contribution

CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.