Step-by-step instructions for calculating the correlation coefficient (r) for sample data, to determine in there is a relationship between two variables.

source