To calculate the coefficient of correlation for a given set of data, you can use the following formula:
r = [∑(xy) - (n∑x∑y)] / [√{∑x^2 - (n∑x)^2} * √{∑y^2 - (n∑y)^2}]