The value of R is 0.7522. This is a strong positive correlation, which means that high X variable scores go with high Y variable scores
How to solve for R
X Values
∑ = 28
Mean = 5.6
∑(X - Mx)² = SSx = 29.2
Y Values
∑ = 29
Mean = 5.8
∑(Y - My)² = SSy = 6.8
X and Y Combined
N = 5
∑(X - Mx)(Y - My) = 10.6
R Calculation
r = ∑((X - My)(Y - Mx)) / √((SSx)(SSy))
r = 10.6 / √((29.2)(6.8)) = 0.7522
r = 0.7522
Using python we can solve this also as:
import numpy as np
# Sample data
x = np.array([4, 5, 3, 6, 10])
y = np.array([4, 6, 5, 7, 7])
# Calculate the correlation coefficient
correlation_coefficient = np.corrcoef(x, y)[0, 1]
# Print the correlation coefficient
print(correlation_coefficient)
output is 0.7522461664398489