This is Q4.41 of Heard on the Street (2021 edition). I know that the answer is $\frac{11}{18}$, but am trying to find out what is wrong with my solution - ideally would want to do that without looking at their reference solution. There are posts asking the same question, but none with my exact approach (and I'm trying to find out the mistake with my approach).
The question
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?
My attempt
Let $x$ and $y$ be the length of the first and second piece respectively. Then the length of the third piece is $1 - x - y$.
Let $P_1$ represent the constraints that we can assume are satisfied. These include
- $0 < x < 1$
- $0 < y < 1$
- $x + y < 1$
Let $P_2$ represent the constraints that we want to satisfy. We want
- $x > y$ (first piece greater than the second)
- $x > (1 - x - y)$ (first piece greater than the third). This is equivalent to $2x + y > 1$.
Now consider a graph: https://www.desmos.com/calculator/ranldhsm3r or the below image:
Graph representation (do not have the reputation to embed an image)
Firstly, notice that if $x \geq \frac{1}{2}$, it must be the case that $x$ is the largest side; similarly, when $x \leq \frac{1}{3}$, there is no way that $x$ can be the the largest side. Hence the focus now is to consider the case when $\frac{1}{3} < x < \frac{1}{2}$.
What I did then is to consider
- what's the length of a line perpendicular to a given $x$ which is purely in the constrained region? This would be the distance between the lines $2x + y = 1$ and $x = y$ (or the points $(x, x)$ and $(x, 1 - 2x)$). An application of the distance formula tells that it is $3x - 1$.
- what is the range of possible values of $y$? $1 - x$.
I validated this with an example. Suppose that $x = 0.4$. Then, $y$ can be anywhere from 0 to 0.6. But if $y < 0.2$, $1 - x - y > x$. Similarly, if $y > 0.4$, $y > x$. Hence the region where $x$ would be the greatest is 0.2, and the range of values $y$ can take is 0.6.
Now, to find expectations. This is
$$ E(X) = \int_{\frac{1}{3}}^{\frac{1}{2}} \frac{x(3x - 1)}{1 - x} + \frac{1}{2} $$
(because the probability that $x$ is the greatest side is 1 when $x > \frac{1}{2}$)
There are many ways to perform the outer integral, which I won't mention. The point is that the answer is 0.03369747823689519, and hence the final answer is ~0.53, which is not equal to $\frac{11}{18}$.
I'm not sure on what I'm missing, and would appreciate assistance.