The correlation coefficient is a measure of the linear relationship between two sets of data. The coefficient of determination is a measure of the strength of the linear relationship between two sets of data.
To calculate the correlation coefficient, you need to first calculate the Pearson correlation coefficient r. The Pearson correlation coefficient is a statistic that measures the degree of linear correlation between two sets of data. The formula of Pearson correlation coefficient is given below.
= | correlation coefficient | |
= | values of the x-variable in a sample | |
= | mean of the values of the x-variable | |
= | values of the y-variable in a sample | |
= | mean of the values of the y-variable |
The coefficient of determination r2 is a statistic that measures the strength of the linear relationship between two sets of data. The coefficient of determination is calculated by taking the square of the Pearson correlation coefficient and dividing it by the product of the standard deviations of the two sets of data.