calculate peason correlation coefficient