Calculating Pearson's correlation of two sets of data points