TITLE: Expected Value of R squared
QUESTION [10 upvotes]: Let $n$ be a fixed positive integer. Generate $n$ numbers $x_1, x_2, ..., x_n$ from the set $[0,1]$, with the probability distribution being the uniform one and the $x_i$ all being independent of each other. Now repeat this process to generate $y_1, ..., y_n$. If we let $X$ be a random variable which takes on $x_1, ..., x_n$ with probability $\frac{1}{n}$ each, and let $Y$ be a random variable which takes on $y_i$ whenever $X$ takes on a value of $x_i$. We can then compute the square of the correlation $R^2$ between $X$ and $Y$. What is the expected value of this $R^2$?
Another less rigorous phrasing of the problem is this: suppose we throw $n$ points at random on a graph spanning $[0,1] \times [0,1]$. What is the expected value of the $R^2$ of the line of best fit?
For instance, for $n=2$ the expected value is $1$ due to the $R^2$ value always being $1$. For $n=3$ one can numerically compute the expected value to be $\frac{1}{2}$. In general, it seems that the answer is $\frac{1}{n-1}$. I don't really have any idea how to do this problem in general; and even specific cases look nontrivial. Does anyone have any ideas? This looks like what should be a well-known result, but my searching didn't pick up on anything which looked useful.
This has applications in that when one is working with variables which are not expected to be very highly correlated, it is often difficult to tell when an $R^2$ value is significant. This result gives an idea of how big the $R^2$ needs to be for one to deduce there is some nontrivial correlation between two variables.

REPLY [4 votes]: According to Kendall's Advanced Theory of Statistics (Exercise 16.17 in the 5th edition of Volume 1), Pitman (1937) showed the sample correlation coefficient $r$ has zero mean and variance or second moment of $$\sigma^2_{r}=E[r^2] = {1 \over {n-1}}$$ for any sample of size $n$ where $x$ and $y$ are independent continuous variates. 
Checking the reference, we find he shows $r^2$ has an approximate $\mathrm{Beta} \left( {1 \over 2}, {{n-2} \over {2}}\right)$ distribution. 
Reference: Pitman, E.J.G.. Significance tests which may be applied to samples from any population., v. 4, No. 1, II. The correlation coefficient test., v. 4, No. 2, $\it{Supp. J.R. Statist. Soc.},$ 1937.