How to Calculate Pearson Correlation Coefficient - Formula, Example

How to Calculate Pearson Correlation Coefficient - Definition

Definition:

Pearson correlation coefficient is a type of correlation coefficient which denotes the relationship between two variables that are measured on the same interval.

Formula:
Pearson correlation coefficient ( r ) = Σ [ ( X - My )( Y - Mx ) ] / √ [ ( SSx )( SSy ) ]
Where ,

SSx = Σ ( X - Mx ) 2 SSy = Σ ( Y - My ) 2 X = X Values Y = Y Values Mx = Mean of x values My = Mean of y values Σ ( X - Mx ) , Σ ( Y - My ) = Sum of deviation scores Σ ( X - Mx )2 , Σ ( Y - My )2 = Sum of deviation squared

Example :

Find the pearson correlation coefficient for this data set.

x valuesy values
23
46
64
22
51
Step 1:

Find Mx and My , Mx = [ 2 + 4 + 6 + 2 + 5 ] / 5 Mx = 3.8 My = [ 3 + 6 + 4 + 2 + 1 ] / 5 My = 3.2

Step 2:

Then, find the following values,

 ( X - Mx  ( Y - My  ( X - Mx )2   ( Y - My )2   ( X - Mx ) * ( Y - My
-1.8 -0.2 3.24 0.04 0.36
0.2 2.8 0.04 7.84 0.56
2.2 0.8 4.84 0.64 1.76
-1.8 -1.2 3.24 1.44 2.16
1.2 -2.2 1.44 4.84 -2.64
 Σ ( X - Mx )=3.6  Σ ( Y - My )=0  Σ ( X - Mx ) 2=12.8  Σ ( Y - My ) 2=14.8  Σ (X - Mx)*(Y - My)=2.2
Step 3:

Substitute the given values in the formula = 2.2 / √ [ 12.8 * 14.8 ] = 2.2 / √189.44 = 2.2 / 13.76372 = 0 . 159 Therefore, the pearson correlation coefficient r = 0 . 16

english Calculators and Converters

Ask a Question