A different approach to a common question A unit stick is randomly broken into 3 pieces, it is given that these three pieces can make a triangle, what is the expected length of the medium-sized piece?
This a question we are all familiar with and anyone who has seen it anywhere/solved it knows that the expected length of the medium piece is $\frac{5}{18}$, we reach this conclusion by using $E(L+M+S) = 1$, and we know we can calculate $E(L)$ and $E(S)$, so we just use $E(M) = 1-E(L)-E(S)$ to get our answer, is there any way we can solely calculate the $E(M)$ without calculating the other two values?
$L$: Length of the longest part
$S$: Length of the smallest part
$M$: Length of the medium part
Thank you :)
 A: One way to solve this is using geometric probability. Though it may involve some integrals, it is a very general approach!
First, we can note that we can express the space of stick pieces using two variables $x$ and $y$, for breaking point $1$ and breaking point $2$, respectively. Then we can note that this situation is symmetric so WLOG we can let $y>x$.
Then the three stick lengths will be

*

*$\min(x,y)=x$

*$\max(x,y)-\min(x,y)=y-x$

*$1-\max(x,y)=1-y$
Now, the middle stick will thus be the median $\text{median}(x,y-x, 1-y)$, and our probability would initially be defined by the triangle formed by the lines $y>x$, $y=1$, and $x=0$.
However, as we are given the lengths form a triangle, this must mean no two of the lengths can sum to less than the third length. Another way to see this is that each length must be less than $1/2$ (as the lengths must sum to $1$). Thus, we can define our probability space of triangle lengths via

*

*$x < 1/2$

*$y-x < 1/2$

*$1-y < 1/2$
To find the expected value we can now integrate the middle length over this region and divide by the area of the this region as follows:
$$\mathbb{E}(M) = \frac{1}{1/8}\int_{1/2}^1\int_{y-1/2}^{1/2} \text{median}(x,y-x,1-y)\ dx\ dy$$
The bounds here are achieved by rewriting 3. as $y > 1/2$, 2. as $x > y-1/2$, and 1. as itself, or alternatively looking at the picture below (the purple region is where triangle inequality is satsified).
Now this is a bit of a strange integral, so we will need to separate it into a few regions based on when $x$ i the median, when $y-x$ is the median, and when $1-y$ is the median length. Hopefully this makes sense, and if you need more help with this process, just comment!
A: An easy approach.
Let's arrange the segments from smallest to largest. Let the three segments be $x$, $x+y$ and $x+y+z$.
Now sum of all segments $= 1$
$\implies 3x + 2y + z = 1$; 
with the conditions: $x\geqslant 0,y \geqslant 0,z \geqslant 0$
$\text{and } x \leqslant 1/3 , y \leqslant 1/2, z \leqslant 1$.
for normalisation, let $n$ be a quantity $\leqslant 1/6$, then,
$$\frac{x}{2} \leqslant \frac{1}{6} , \frac{y}{3} \leqslant \frac{1}{6}, \frac{z}{6} \leqslant \frac{1}{6}$$
$x$ can be chosen randomly among a pool from $[0,2n]$, $y$ be chosen randomly from a pool $[0,3n]$ and $z$ from a pool $[0,6n]$ where $(x,y,z,n)$ $\in$ $\mathbb R$. 
Therefore we can say:

Expected value of $x = n$, expected value of $y = 1.5n$ and expected value of $z = 3n$. 
Expected length of middle segment  = $x+y = 2.5n$
Expected total length  = $3x+2y+z = 9n$
The the expected length of middle segment is
$(x+y)/(3x+2y+z)= 2.5/9= 5/18 $.
