4. As shown in Figure 1, in the cube $A B C D-A^{\prime} B^{\prime} C^{\prime} D^{\prime}$, points $E$, $F$, and $G$ are moving points on segments $B B^{\prime}$, $A B$, and $A^{\prime} C$, respectively. The following four propositions are given:
(1) For any point $E$, there exists a point $F$ such that $D^{\prime} F \perp C E$;
(2) For any point $F$, there exists a point $E$ such that $C E \perp D^{\prime} F$;
(3) For any point $E$, there exists a point $G$ such that $D^{\prime} G \perp C E$;
(4) For any point $G$, there exists a point $E$ such that $C E \perp D^{\prime} G$.
From the above four propositions, the probability $P=$ that exactly one of the two chosen propositions is true is . $\qquad$
4. $\frac{2}{3}$.

First, regardless of the position of point $F$, the projection of $D^{\prime} F$ on the plane $B C B^{\prime} C^{\prime}$ is always $B C^{\prime}$. Therefore, (1) is a false statement, and (2) is a true statement.

Second, regardless of the position of point $E$, as shown in Figure 5, $\angle C^{\prime} C E$ and $\angle C^{\prime} E C$ are both acute angles. Therefore, there always exists a point $X$ on line segment $C E$ such that $C^{\prime} X \perp C E$. Let the intersection of line segment $C^{\prime} X$ and $B^{\prime} C$ be point $Y$. In the plane $A^{\prime} B^{\prime} C D$, draw $Y G$ $/ / C D$ intersecting $A^{\prime} C$ at point $G$, which satisfies $D^{\prime} G \perp C E$. Thus, (3) is a true statement. However, when point $G$ is taken as $A^{\prime}$, 
$D^{\prime} G / / B C \Rightarrow D^{\prime} G$ is not perpendicular to $C E$, so (4) is a false statement.

In summary, among the four statements, there are exactly two true statements and two false statements.

Therefore, the probability $P$ of randomly selecting two statements, one of which is true and the other false, is $P=\frac{4}{6}=\frac{2}{3}$.