# What is the probability that you can form a triangle with these three line segments?

Two numbers are randomly selected between $$(0,1)$$, uniformly and independently distributed. What is the probability that the three resulting line segments, which are obtained by cutting the interval at the two selected numbers, form a triangle?

So, I was thinking I can do something like this:

$$X \sim U(0,1), Y \sim U(0,1),$$ which are independent. In order to form a triangle, each side cannot be bigger than the sum of the other two sides. So, each segment cannot be greater than $$1/2$$.

If $$X > Y$$, the first segment is of length $$Y$$, the second is of length $$X-Y$$, and the third is of length $$1-X$$.

Note: $$P(X>Y)=P(X.

So, can we obtain the answer by computing $$2P(Y,X-Y,1-x < 1/2)$$? If so, how would you compute this probability?

Consider the case where $$x>y$$, and sketch the region between the lines $$y<1/2$$, $$x>1/2$$, $$x-y<1/2$$. All possibilities lie in the square $$[0,1]\times[0,1]$$, with an area of $$1$$. So, the area of region between the lines and its symmetric around $$y=x$$ for the case $$x will be the probability you seek for, which is $$1/4$$.