In: Statistics and Probability
Describe a scenario where the Pearson correlation would be appropriate to use in calculating the strength of the relationship between two variables. Identify the variables and explain the rationale for your answer.
Solution :
Pearson's 'r' -
It is the measure of correlation between two variables X and Y.
Pearson's correlation coefficient is a measure of the strength of the linear relationship between two variables. It is also known as simply correlation coefficient.
If r = 1,
then there is a perfect negative relationship.
Suppose we have data as following type.
Height (cm) = 160,162,163,165,170,175,182,189,170
Weight (kg) = 60,61,64,65,68,70,75,80,74
Now,
Pearson's r ( correlation coefficient ) can calaculated by
On computing r = 0.9382895. which means there is a strong relationship between height and weight because here the value of r almost near to 1. we can also plot scatterplot by using R- code as following.
> H < - C ( 160,162,163,165,170,175,182,189,170 )
> W < - C ( 60,61,64,65,68,70,75,80,74 )
> Cor (H,W)
> plot ( H,W,Main = " Correlation between Height and Weight", xlab = "Height", ylab = Weight" )
So, if variables are linearly associated with each other than it will enable us to calculating the strength of the relationship between two variables (linearly correlated).
Let me know in the comment section if anything is not
clear. I will reply ASAP!
If you like the answer, please give a thumbs-up. This will be quite encouraging for me.Thank-you!