- #1
dhiraj
- 4
- 0
From what I have understood about Pearson correlation coefficient I have created a visual illustration, I would like to know if this understanding looks correct.
Say I have a sample with 5 data points:-
x y
8 6
16 8
20 16
28 12
32 20
My goal is to calculate Pearson correlation coefficient between x and y.
So this is how the diagram I created looks like:-
View attachment 6472
I have done appropriate color coding.
So in this case the covariance between x and y is:-
and are the deviations (not standard deviation) from and respectively, these mean lines are shown in the diagram (red line for and the green line for ).
Pearson correlation coefficient
Based on the diagram, standard deviations of x and y are:-
So replacing these in the formula for the correlation coefficient we get:-
Is this interpretation correct with respect to the diagram I have shown? I know the signs of and will depend on which side of and , and appear.
Say I have a sample with 5 data points:-
x y
8 6
16 8
20 16
28 12
32 20
My goal is to calculate Pearson correlation coefficient between x and y.
So this is how the diagram I created looks like:-
View attachment 6472
I have done appropriate color coding.
So in this case the covariance between x and y is:-
Pearson correlation coefficient
Based on the diagram, standard deviations of x and y are:-
So replacing these in the formula for the correlation coefficient we get:-