The Pearson correlation coefficient is a statistical measure that quantifies the strength and direction of the linear relationship between two continuous variables.
Example 1: Is there some correlation coefficient that was given to tell whether the variables are positive or negative? 0.69, 0.42, -0.23, -0.99
Solution:
The given correlation coefficient is as follows:
0.69, 0.42, -0.23, -0.99
Tell whether the relationship is negative or positive
- 0.69: The relationship between the variables is a strong positive relationship
- 0.42: The relationship between the variables is a strong positive relationship
- -0.23: The relationship between the variables is a weak negative relationship
- -0.99: The relationship between the variables is a very strong negative relationship
Example 2: Calculate the correlation coefficient for the following data by the help of Pearson's correlation coefficient formula: X = 21, 31, 25, 40, 47, 38 and Y = 70, 55, 60, 78, 66, 80
Solution:
Given variables are, X = 21, 31, 25, 40, 47, 38, and Y = 70, 55, 60, 78, 66, 80
To find the correlation coefficient of the following variables Firstly a table is to be constructed as follows, to get the values required in the formula also add all the values in the columns to get the values used in the formula.
X 21 31 25 40 47 38 ∑x = 202 ∑xy = 13937, ∑x = 202, ∑y = 409, ∑x² = 7280, ∑y² = 28265
Put n = 6 all the values in the Pearson's correlation coefficient formula:-
R =
n(∑xy) - (∑x)(∑y) / √ [n∑x²-(∑x)²][n∑y²-(∑y)² R = 6(13937) - (202)(409) / √ [6(7280)-(202)²][6(28265)-(409)²]
R = 1004 / √[2876][2909]
R = 1004 / 2892.452938
R = -0.3471
The correlation coefficient is -0.3471
Practice Problems
Question 1: Given the following data:X = [21, 31, 25, 40, 47, 38] and Y = [70, 55, 60, 78, 66, 80]. Calculate the Pearson Correlation Coefficient (r) for the data and interpret the strength and direction of the correlation.
Question 2: A Pearson correlation coefficient of r = -0.95 is calculated between the number of hours a person exercises per week and their blood pressure levels. What does this value suggest about the relationship between the two variables? Is it positive or negative, and how strong is the correlation?
Question 3: Consider the following data: Hours Studied (X) = [1, 2, 3, 4, 5]andTest Scores (Y) = [50, 55, 65, 70, 80].Calculate the Pearson correlation coefficient for the data.
Question 4: A researcher finds a Pearson correlation coefficient of r = 0.85 between the time spent on social media (X) and stress levels (Y). How would you interpret the strength and direction of the relationship, and what does this tell you about the association between these two variables
Question 5:
1. Given a Pearson correlation coefficient of r = 0.85 between the amount of time students spent studying and their score on a math test, interpret the strength and direction of the relationship.
2. Consider the following small dataset representing hours studied (X) and test scores (Y):
| Hours Studied (X) | Test Score (Y) |
|---|---|
| 1 | 50 |
| 2 | 55 |
| 3 | 65 |
| 4 | 70 |
| 5 | 80 |
Calculate the Pearson correlation coefficient (r) for the data.
Answer:-
- r ≈ 0.38, moderate positive correlation
- very strong negative correlation
- r ≈ 0.803, strong positive correlation
- strong positive correlation
- r = 0.993, very strong positive correlation