Consider the following simple Monte Carlo:
import matplotlib.pyplot as plt import numpy as np from scipy.stats import pearsonr r = np.arange(3)+1 R = [pearsonr(np.random.normal(0,1,3), r) for i in range(5009)] plt.hist(R, bins=100) plt.xlabel('Pearson\'s Correlation Coefficient') plt.ylabel('Frequency') plt.show()
In words, 5009 IID standard normal variables are sampled in triplicate (n=3) and are paired to the values (1,2,3). The code above computes the Pearson's product-moment correlation coefficient between the triplicate standard normal variable measures and the sequence (1,2,3). I am curious about the distribution that results, which appears to my surprise to be non-uniform. I suspect there is a mathematical reason behind this reproducible effect.
Is there a mathematically formal reason why the extreme correlations of $\pm 1$ are more common than the less extreme correlation scores?