Distribution of $R^2$ for pairs of random variables if I have two uniform random variables $X$ and $Y$, and I sample $N$ values for each, what's the probability of getting an $r$ Pearson's correlation coefficient (or Spearman correlation) between them of at least $x$?  In other words what is the distribution of the $r$ values in this case?
Similarly, what if $X$ and $Y$ were normal RVs, each with its own mean and standard deviation ($X_\mu$, $X_\sigma$ and $Y_\mu$, $Y_\sigma$, respectively), then what would the distribution of $r$ be as a function of these parameters?
 A: Not sure this answers your Q, but...Generally, with sample sizes above a few dozen and with many such samples, the r distribution in both the normal and uniform cases will be itself normal, centering on zero.  The exact shape of the distribution will depend on how many values you sample and how many samples you take (how many trials you run).  If you use R you can try out different values to replace 100 (the size of each sample) and 50,000 (the number of trials) in the code below. (The "f2" is merely a rounding/formatting function of mine):
#NORMAL RANDOM
x=rnorm(100000)
y=rnorm(100000)
r=rep(1,50000)
for (i in 1:50000)  {
x.i = sample(x, 100, replace=T)
y.i = sample(y, 100, replace=T)
r[i]=cor(x.i,y.i)
}
hist(r,main="Simulated r, normal random samples")
hist(r,xlim=c(-.5,.5),legend(locator(1),c("SD=",
f2(sd(r)))))

#UNIFORM RANDOM
windows()
x=runif(100000)
y=runif(100000)
r=rep(1,50000)
for (i in 1:50000)  {
x.i = sample(x, 100, replace=T)
y.i = sample(y, 100, replace=T)
r[i]=cor(x.i,y.i)
}
hist(r,main="Simulated r, normal random samples")
hist(r,main="Simulated r",xlim=c(-.5,.5),legend(locator(1),c("SD=",
f2(sd(r)))))


I'm new to R and suggestions for improvements are most welcome.  For instance, there ought to be a way to get the 2nd histogram to appear without ordering up the first one.
