Why is the distribution of rand()^2 different than of rand()*rand()? In Libre Office Calc, the rand() function is available, which chooses a random value between 0 and 1 from a uniform distribution. I'm a bit rusty on my probability, so when I saw the following behaviour, I was puzzled: 
A = 200x1 column of rand()^2
B = 200x1 column of rand()*rand()
mean(A) = 1/3
mean(B) = 1/4
Why is mean(A) != 1/4?
 A: It may be helpful to think of rectangles. Imagine you have the chance to get land for free. The size of the land will be determined by (a) one realization of the random variable or (b) two realizations of the same random variable. In the first case (a), the area will be a square with the side length being equal to the sampled value. In the second case (b), the two sampled values will represent width and length of a rectangle. Which alternative do you choose?
Let $\mathbf{U}$ be a realization of a positive random variable.
a) The expected value of one realization $\mathbf{U}$ determines the area of the square which is equal to $\mathbf{U}^2$. On average, the size of the area will be
$$\mathop{\mathbb{E}}[\mathbf{U}^2]$$
b) If there are two independent realizations $\mathbf{U}_1$ and $\mathbf{U}_2$, the area will be $\mathbf{U}_1 \cdot \mathbf{U}_2$. On average, the size equals
$$\mathop{\mathbb{E}}[\mathbf{U}_1 \cdot \mathbf{U}_2] = \mathop{\mathbb{E}^2}[\mathbf{U}]$$
since both realizations are from the same distribution and independent.
When we calculate the difference between the size of the areas a) and b), we obtain
$$\mathop{\mathbb{E}}[\mathbf{U}^2] - \mathop{\mathbb{E}^2}[\mathbf{U}]$$
The above term is identical to $\mathop{\mathbb{Var}}[\mathbf{U}]$ which is inherently greater or equal to $0$.
This holds for the general case.
In your example, you sampled from the uniform distribution $\mathcal{U}(0,1)$. Hence,
$$\mathop{\mathbb{E}}[\mathbf{U}] = \frac{1}{2}$$
$$\mathop{\mathbb{E}^2}[\mathbf{U}] = \frac{1}{4}$$
$$\mathop{\mathbb{Var}}[\mathbf{U}] = \frac{1}{12}$$
With $\mathop{\mathbb{E}}[\mathbf{U}^2] = \mathop{\mathbb{Var}}[\mathbf{U}] + \mathop{\mathbb{E}^2}[\mathbf{U}]$ we obtain
 $$\mathop{\mathbb{E}}[\mathbf{U}^2] = \frac{1}{12} + \frac{1}{4} = \frac{1}{3}$$
These values were derived analytically but they match the ones you obtained with the random number generator.
A: Not to suggest that there's anything lacking from Sven's excellent answer, but I wanted to present a relatively elementary take on the question. 
Consider plotting the two components of each product in order to see that the joint distribution is very different. 

Note that the product tends only to be large (near 1) when both components are large, which happens much more easily when the two components are perfectly correlated rather than independent. 
So for example, the probability that the product exceeds $1-\epsilon$ (for small $\epsilon$) is about $\epsilon/2$ for the $U^2$ ('A') version, but for the $U_1\times U_2$ ('B') version it's about $\epsilon^2/2$.
Quite a difference!
It may help to draw iso-product contours on graphs like those above - that is, curves where xy=constant for values like 0.5, 0.6, 0.7, 0.8, 0.9. As you go to larger and larger values, the proportion of points above and to the right of the contour goes down much more quickly for the independent case.
