Source: https://www.stat.berkeley.edu/~rabbee/correlation.pdf