Finding distribution of $y$ intercept given by line generated by two uniformly chosen points in $[0,1]^2$

81 Views Asked by At

The method I'm using seems super inefficient. What I did was define $4$ RVs namely $X_1,X_2,Y_1,Y_2$ and thus my two uniformly random points are $(X_1,Y_1),(X_2,Y_2)$ and hence the $y$ intercept is $-X_1(Y_2-Y_1)/(X_2-X_1)+Y_1$ but them I'll have to do Jacobian tranform multiple times.

Is there any simpler method I seem to be missing?

3

There are 3 best solutions below

0
On

I'd approach this by first computing the conditional cdf of the slope given one point $(X_1,Y_1)$, hence the conditional cdf of the $y$-intercept and integrate to get the unconditioned cdf. It still requires some integration and separation into cases but it looks more approachable this way, because the conditional cdf is just really areas of triangles and similar shapes.

0
On

Empirically the density and cumulative distribution functions seem to look something like this, with the probability of the intercept being in $[0,1]$ being $\frac12$ and the density being constant in that interval

enter image description here

I am not convinced that this distribution has a mean, though it is obviously centred at $\frac12$; even if it does, I would be very surprised if it has a finite second moment

0
On

Partial answer: Proofs that (A) $y$-intercept $\in [0,1]$ with probability $\frac12$, and (B) it is uniform within $[0,1]$.

For shorthand, write $E=$ the event that $y$-intercept $\in [0,1]$.

Easy proof of (A): Given any two points $P_1, P_2 \in [0,1]^2$, the line $L$ through them hits a corner of the square with probability $0$. Therefore, $L$ passes through exactly two sides of the square with probability $1$. Now rotate the square by $90^\circ, 180^\circ, 270^\circ$. The $4$ rotations are symmetric, and of the four lines exactly two of them passes through the left side of the square, i.e. has $y$-intercept $\in [0,1]$. Thus $P(E) = \frac12$.

Harder proof of (A) and (B): Let $W = \max(X_1, X_2) =$ the $x$-coordinate of the point that is further to the right. We call this point $P$ and the other point $Q$. Conditioned on $W=w$, the point $Q$ is uniform in the rectangle $R$ with corners $(0,0), (0,1), (w,0), (w,1)$, i.e. the rectangle to the left of $x=w$. Meanwhile, the $y$-intercept $\in [0,1]$ iff $Q$ lies in the triangle $T$ formed by $P, (0,0), (0,1)$. This triangle $T$ is exactly $\frac12$ of rectangle $R$, so the conditional probability $P(E \mid W=w) = P(Q\in T \mid Q \in R) = \frac12$. Since this is true for any $w$, the unconditioned probability $P(E)$ is also $\frac12$, regardless of the distribution of $W$.

More generally, the $y$-intercept $\in [0, c]$ (where $c\le 1$) iff $Q \in$ the smaller triangle $Z$ formed by $P, (0,0), (0,c)$. This triangle $Z$'s area is exactly $c$ of the area of $T$, or equivalently, ${c \over 2}$ of the area of $R$. This shows uniform distribution within $[0,1]$.