Example 2 Let $A, B, C, D$ be four non-coplanar points in space. With a probability of $\frac{1}{2}$, connect an edge between each pair of points, and whether any pair of points is connected by an edge is independent of each other. Find the probability that points $A, B$ can be connected by a (single edge or a sequence of edges forming a) spatial polyline. ${ }^{[3]}$
Solving: Each pair of points has 2 possibilities for whether they are connected by an edge, totaling $2^{6}=64$ possibilities.

Below, we calculate the number of ways points $A$ and $B$ are connected by a polyline.
(1) There is an edge $A B$, totaling $2^{5}=32$ ways.
(2) There is no edge $A B$, but there is an edge $C D$. In this case, the condition for points $A$ and $B$ to be connected by a polyline is that point $A$ is connected to either $C$ or $D$, and point $B$ is connected to either $C$ or $D$. Multiplying the two local counts, there are $\left(2^{2}-1\right)\left(2^{2}-1\right)=9$ scenarios.
(3) There is no edge $A B$, and no edge $C D$. In this case, the scenarios where $C A$ and $C B$ are both connected total $2^{2}$, and the scenarios where $D A$ and $D B$ are both connected total $2^{2}$. However, the scenario where $C A$, $C B$, $D A$, and $D B$ are all connected is counted once more. By the principle of inclusion-exclusion, the number of scenarios where points $A$ and $B$ are connected by a polyline is $4+4-1=7$.
Thus, the probability that points $A$ and $B$ are connected by an edge is $\frac{48}{64}=\frac{3}{4}$.