4. A line segment of length 18 is randomly divided into three segments. The probability that these three segments can form a triangle is $\qquad$ .
4.0.25.

Let the lengths of two sides of a triangle be $x, y$, then
$$
\left\{\begin{array}{l}
9<x+y<18, \\
0<x<9, \\
0<y<9 .
\end{array}\right.
$$

This forms the medial triangle of Rt $\triangle A O B$ (as shown in Figure 5), the shaded area is $\frac{1}{4}$ of the entire $\triangle A O B$. Therefore, the probability of forming a triangle is 0.25.