The correlation coefficient, denoted as \( r \), between two variables X and Y is calculated using the formula:
\[ r = \frac{n(\sum xy) - (\sum x)(\sum y)}{\sqrt{[n(\sum x^2) - (\sum x)^2][n(\sum y^2) - (\sum y)^2]}} \]
where \( n \) is the number of data points,
Show more…