# Probability that the two segments intersect

P and Q are uniformly distributed in a square of side AB. What is the probability that segments AP and BQ intersect?

Suppose we start with $Q = (x, y)$. The admissible positions for $P$ will be in the triangle $BQR$ if $y < x$ or in the quadrilateral $BQRC$ if $y > x$. The areas are calculated from the sides and the heights, and $$p = \int_0^1 \int_0^x \frac {y (1 - x)} {2 x} dy dx + \int_0^1 \int_x^1 \left( 1 - \frac x {2 y} - \frac y 2 \right) dy dx = \frac 1 4.$$

Inspired by Lee David Chung Lin's answer.

Consider the four events $$AP \cap BQ \neq \varnothing, \\ AP \cap DQ \neq \varnothing, \\ CP \cap BQ \neq \varnothing, \\ CP \cap DQ \neq \varnothing.$$

Ignoring degenerate configurations, the events are mutually disjoint, equiprobable, and cover the whole space. $p = 1/4$.

• This is really great. The reason I felt it was necessary to awkwardly make rigorous the $1/4$ (argument in the last part of my post), was exactly due to the lack of symmetry on the $AB$-and-$PQ$ configuration with respect to the square. I think this is THE canonical treatment of it as a geometric probability problem. May 2 '18 at 8:14

Here's a calculation free "cut-and-paste" argument. Feel free to skip the words and directly examine the figures.

Consider the point $Q$ only in a quarter of the square $\square ABCD$, as shown in the left plot below. We will combine the "region of $P$ that creates a crossing" associated with $Q$ and its 4-fold symmetric mirror images.

As the right plot below shows, point $Q'$ is reflected with respect to (WRT) the main diagonal $\overline{AC}$, point $q$ is reflected WRT the off-diagonal $\overline{BD}$, and point $q'$ is doubly-reflected (equivalent to rotated $180^{\circ}$). The region that is admissible (borrowing the great term from @Maxim) associated with $Q$ is highlighted below on the left (in magenta), and the region for $Q'$ is highlighted on the right plot (in blue).

The labels for corner points $A,B,C,D$ will be omitted in the plots from now on, because they are unnecessary most of the time and a bit distracting. We can cut-and-paste the triangular blue "$Q'$ region" in the manner demonstrated below, thanks to the mirror symmetry by construct of $Q'$.

Note that the resultant quadrilateral consists of an obtuse triangle ($\triangle DQB$) plus THE isosceles right triangle, which is half of $\square ABCD$. Similarly, the admissible regions associated with $q$ and $q'$ can be cut-and-paste into a quadrilateral that is half of $\square ABCD$ minus an obtuse triangle ($\triangle DqB$).

I sincerely apologize for the poor choice of colors if the readers find the figures unclear.

Due to the symmetry WRT the off-diagonal, we can cut-and-paste (flip) the combined-$(q,q')$-region and have the exact full square.

In short, since we effectively quadrupled the admissible region to arrive at $1$ (unity), the actual probability is $\displaystyle \frac14$.

If one is unsatisfied with the brief ending remark just above, below is the more detailed explanation.

Formally, instead of scanning point $Q$ over the entire square, we scan it only in a quadrant and reallocate the probability mass from the 3 mirrored positions $(Q',q,q')$. That is, we redefine the mass associated with $(Q',q,q')$ as the contribution associated with $Q$.

By reallocation, it means that the (conditional) probability of crossing is to be defined as zero when $Q$ is outside of the quadrant.

After the reallocation, when $Q$ is in the quadrant, the (conditional) probability of making an intersection is $1$, because $\square ABCD$ (result of cut-and-paste) divided by $\square ABCD$ (the domain of point $P$) is one.

In other words, the re-distributed conditional probability is $1$ over one-fourth of the domain (of $Q$) and $0$ elsewhere. Thus the overall probability is one-fourth.

• A really nice answer. I suppose the last part can also be explained by saying that when computing the integral sums $S(x, y) \Delta x \Delta y$ over a symmetric grid, we can combine the four related terms, and the result will be the same as summing $\Delta x \Delta y / 4$. I've added another answer, exploiting the symmetry over the vertices of the square instead of the symmetries over the positions of $P$ and $Q$. May 2 '18 at 8:03