A stick of unit length is cut into three pieces of lengths $X, Y, $and $Z$, with $X \le Y \le Z$. First the stick of length $1$ is cut into two pieces at a randomly chosen point uniformly distributed along its length. Then the smaller of these two sticks is also cut into two pieces at a randomly chosen point uniformly distributed along its length. These two cuts are conducted independently. Find Cov(X,Y).
I need to get $E(XY)-EXEY$. First, I write $S=X+Y$. Then the length function of $S$ is $\min(s, 1-s)$. Given $S=s$, I can find the covariance of $X,Y$ as follows. The distribution of $X$ is $\min(x, s-x)$, so $E[X|S]=\int_0^{s/2} xdx + \int_{s/2}^s (s-x) dx=s^2/4.$ Likewise, $E[Y|S]=\int_0^{s/2} (s-y)dy + \int_{s/2}^s y dy=3s^2/4.$ Now $E[XY|S]=\int_0^s x(s-x)dx=s^2/6$,since $y$ is just $s-x$(I'm not sure about this part). Now to get the expectation, I just need to integrate them over $s$, which has the uniform distribution, so that would be integrating them over $[0,1/2]$. Is this correct? I would greatly appreciate any comment.