Expectation of area of rectangle built from two random variables

expected valueprobabilityuniform distribution

The question:

A 1 meter long stick is broken at a random point chosen uniformly along its length, the short part $X$ is used as the length of a side of the rectangle. The longer part of the stick is broken again at a random point uniformly chosen along it’s length – the shorter part of the second breaking $Y$ is used as the length of a second side of the same rectangle.
find the expectation of the rectangle’s area

my attempt so far:
$$X = \text{The shorter part of the broken stick, chosen uniformly so I can say it’s length is } \sim U_{[0,\tfrac12]}$$
$$Y = \text{The shorter part of the broken longer stick. I know the longer stick’s length is }1+x \text{ so I can say the length of Y is } Y|X\sim U_{[0,\frac{1+x}{2}]}$$
(because Y’s the smallest part of a stick with length 1-x so it can at most be the midpoint).
$$\begin{aligned} E(S_\square) &= E(XY) = E(E(XY|X)) = E(XE(X|Y)) = E\left(X\left(\frac{\frac{(1+X)-0}{2}}{2}\right)\right) \\ &=0.25E(X)+0.25E(X^2) = 0.25(0.5)+0.25(\textsf{var}(X)+E(X)^2) \\ &=0.125+0.25(1/12 +0.25) \\ &=\frac{5}{24}\end{aligned}$$
The real answer is $\frac{1}{24}$ – I don’t see what I got wrong. Is my understanding and definition of the random variables wrong?

Best Answer

Here is a more concise approach. The distribution of the rectangle's area is $\min(X,1-X)(\min(Y,1-Y)\max(X,1-X))$ where $X,Y$ are iid $U(0,1)$ random variables. Since this function in $X$ and $Y$ is symmetric about the lines $X=\frac12$ and $Y=\frac12$ and the joint distribution of $X,Y$ is $1$ over the support, the expected area is $$4\int_0^{1/2}\int_0^{1/2}xy(1-x)\,dy\,dx=\frac1{24}$$

Related Question