Top

Correlation Coefficient Calculator
Top
Correlation Coefficient Calculator (or Correlation Calculator) calculates the sample correlation coefficient between two set of data. Correlation coefficient or cross correlation coefficient in statistics is the quantity which is used for measuring how well the trends in our predicted value follow past actual value trends. In simple words, it is the quantity to predict how well our predicted model fit with the real life datas. The value of correlation is always between -1.0 and +1.0.

Below is given two default set of data, click "Calculate". It calculates the correlation coefficient of the two set of data and gives the value of correlation.

## Step by Step Calculation

Step 1 :

Count the number of values.

Step 2 :

Find the value of XY, X2 and Y2

Step 3 :

Find the value of $\sum{X}$, $\sum{X^{2}}$, $\sum{Y}$, $\sum{Y^{2}}$, $\sum{XY}$.

Step 4 :

Now, apply the formula:

Correlation(r) = $\frac{n(\sum{XY})-(\sum{X})(\sum{Y})}{\sqrt{[n\sum{X^{2}}-(\sum{X})^{2}][n\sum{Y^{2}}-(\sum{Y})^{2}]}}$

## Example Problems

1. ### Find the Correlation Coefficient for X values Y values     70    4.1     71    4.6     72    4.8     73     5

Step 1 :

Count of the values = 4

Step 2 :
 X values Y values X*Y X2 Y2 70 4.1 70*4.1 = 287 70*70 = 4900 4.1*4.1 = 16.81 71 4.6 71*4.6 = 326.6 71*71 = 5041 4.6*4.6 = 21.16 72 4.8 72*4.8 = 345.6 72*72 = 5184 4.8*4.8 = 23.04 73 5 73*5 = 365 73*73 = 5329 5*5 = 25

Step 3 :

So, $\sum{X}$ = 70 + 71 + 72 + 73 = 286
$\sum{Y}$ = 4.1 + 4.6 + 4.8 + 5 = 18.5
$\sum{X*Y}$ = 287 + 326.6 + 345.6 + 365 = 1324.2
$\sum{X^{2}}$ = 4900 + 5041 + 5184 + 5329 = 20454
$\sum{Y^{2}}$ = 16.81 + 21.16 + 23.04 + 25 = 86.01

Step 4 :

Correlation(r) = $\frac{n(\sum{XY})-(\sum{X})(\sum{Y})}{\sqrt{[n\sum{X^{2}}-(\sum{X})^{2}][n\sum{Y^{2}}-(\sum{Y})^{2}]}}$
Correlation(r) = 0.969

Correlation(r) = 0.969

2. ### Find the Correlation Coefficient for X values Y values     40    4     41    3     42    2     43    1

Step 1 :

Count of the values = 4

Step 2 :
 X values Y values X*Y X2 Y2 40 4 40*4 = 160 40*40 = 1600 4*4 = 16 41 3 41*3 = 123 41*41 = 1681 3*3 = 9 42 2 42*2 = 84 42*42 = 1764 2*2 = 4 43 1 43*1 = 43 43*43 = 1849 1*1 = 2

Step 3 :

So, $\sum{X}$ = 40 + 41 + 42 + 43 = 166
$\sum{Y}$ = 4 + 3 + 2 + 1 = 10
$\sum{X*Y}$ = 160 + 123 + 84 + 43 = 410
$\sum{X^{2}}$ = 1600 + 1681 + 1764 + 1849 = 6894
$\sum{Y^{2}}$ = 16 + 9 + 4 + 2 = 31

Step 4 :

Correlation(r) = $\frac{n(\sum{XY})-(\sum{X})(\sum{Y})}{\sqrt{[n\sum{X^{2}}-(\sum{X})^{2}][n\sum{Y^{2}}-(\sum{Y})^{2}]}}$
Correlation(r) = -1