# Geometry and PDF around the unit stick broken into 3 pieces and the expected length of the longest piece?

This post is related to previous SE posts, could anyone please explain the final geometry steps i.e. the link between the geometry and the pdf.

@TCL gave a very clear explanation for almost the same problem with : If a 1 meter rope is cut at two uniformly randomly chosen points, what is the average length of the smallest piece? but could you please explain this part : " which is (1−3a)2(1−3a)2. Note that for these sets to be nonempty, one must have 0≤a≤1/3 0≤a≤1/3 "

Another very quick reply to a very similar problem : @ Hans Parshall

Right before the "A bit of geometry will give you the result", the answer there had the joint probability $$2P(X\leq a,1-Y\leq a,Y-X\leq a,X<Y).$$ In order to solve that joint probability, we need to find out the situations in which all four probabilities are true at the same time. Now, $$X\leq a,1-Y\leq a,Y-X\leq a,X<Y$$ are also a system of inequalities of variables $X$ and $Y$, and thus can be plotted on a plane with lines as boundaries. The area enclosed by the four inequalities as well as the bounding unit square is the joint probability for any particular $a$.