Same question as here but I'm trying to work out what's wrong with my logic. The question is:
Take a stick and break it randomly into three pieces (i.e., two randomly placed breaks on the stick). What is the expected length of the longest piece?
Our stick has endpoints $0$ and $1$. Let the cuts be made at $x, y$. Now, I can choose $x\in [0,0.5]$ without loss of generality since I can always choose the first cut to be on the left half of the stick. Now, I consider four cases
- $1/3\leq x\leq 1/2$ and $y\geq x$
- $1/3\leq x\leq 1/2$ and $y< x$
- $x< 1/3$ and $y\geq x$
- $x< 1/3$ and $y< x$
I will work out the length of the longest part in each case and the probability of each case occurring. We have
$$P(1) = \frac{1}{3}(1-x), \quad L_{\rm longest}(1) = x$$ $$P(2) = \frac{1}{3}x, \quad L_{\rm longest}(2) = 1-x$$ $$P(3) = \frac{2}{3}(1-x), \quad L_{\rm longest}(3) = \frac{3}{4}(1-x)$$ $$P(4) = \frac{2}{3}x, \quad L_{\rm longest}(4) = 1-x$$
The probabilities are computed straightforwardly: $x$ is uniformly distributed in $[0,0.5]$ so $p(x<\frac{1}{3}) = \frac{2}{3}$. The probability of $y\geq x$ is just $(1-x)$. $L_{\rm longest}(3)$ is computed because the largest piece is obtained by taking a piece of length $(1-x)$ and breaking it in a random place. This gives us an expected length of $\frac{3}{4}(1-x)$. I now have to write each of these as integrals since $x$ is a continuous variable and I obtained
$$ I_1 = \int\limits_{1/3}^{1/2}\frac{dx}{1/2 - 1/3}\ \ \frac{1}{3}(1-x)x$$ $$ I_2 = \int\limits_{1/3}^{1/2}\frac{dx}{1/2 - 1/3}\ \ \frac{1}{3}x(1-x)$$ $$ I_3 = \int\limits_{0}^{1/3}\frac{dx}{1/3}\ \ \frac{2}{3}(1-x)\frac{3}{4}(1-x)$$ $$ I_4 = \int\limits_{0}^{1/3}\frac{dx}{1/3}\ \ \frac{2}{3}x(1-x)$$
But $\mathbb{E}(L_{\rm longest}) = I_1 + I_2 + I_3 + I_4 = \frac{97}{162} \neq \frac{11}{18}$. What is the error in my logic?