How to compute the distribution of $\min\{X,Y,1-Y,1-X$ $,|X-Y|,1-|X-Y|\}$, where $X,Y \overset{\text{iid}}{\sim} \operatorname{Unif}(0,1)$

independencemathematical modelingprobabilityprobability distributionsuniform distribution

Let $X,Y \overset{\text{iid}}{\sim} \operatorname{Unif}(0,1)$. Let $$M = \min\{X,Y,1-Y,1-X,|X-Y|,1-|X-Y|\}.$$ Supposedly $\operatorname{image}(M) \subseteq (0,\frac13)$ and distribution of $M$ is $$F_M(m)= (3m(2-3m))1_{(0,\frac13)}(m) + 1_{(\frac13,\infty)}(m).$$ See here.

Question: How do I compute the distribution of $M$? I wonder if there's a clever way of doing this like with $W$ here. Below is what I've tried so far.

Well $|X-Y| \ge m$ and $1-|X-Y| \ge m$ tell me $m \le |X-Y| \le 1-m$. So it looks like I have 4 cases

  1. $x+(m-1) \le y \le x-m$

  2. $x+m \le y$

  3. $y \le x-m$

  4. $x-(m-1) \le y \le x+m$ (but I think I rule out this last case because here I have $m \ge \frac12$.

Then $X,Y,1-Y,1-X \ge m$ tell me $m \le X \le 1-m$ and $m \le Y \le 1-m$. So I guess the 3 cases become

  1. $x+m-1 = \max\{m,x+m-1\} \le y \le \min\{x-m,1-m\} = x-m$

  2. $x+m = \max\{m,x+m\} \le y \le 1-m$

  3. $m \le y \le \min\{x-m,1-m\} = x-m$

But it seems if I do $\int_0^1 \int_{\cdot}^{\cdot} 1\, dy \,dx$ for each case and then add them up I get only $2-6m$.

Best Answer

As a function of $X$ and $Y$, $M$ has the following symmetries:

$$ \begin{align} M(X,Y)&=M(Y,X), \\ M(X,Y)&=M(1-X,1-Y), \\ M(X,Y)&=M(|X-Y|,\max(X,Y)). \end{align} $$

Being the minimum of piecewise-linear functions, its graph is piecewise-linear (the symmetries can help understand this graph):

enter image description here

Alternatively, here is the corresponding contour plot:

enter image description here

Having found the maximum of $M$ to be $1/3$, we can see that the survival function, $P(M(X,Y)>m)$ is obtained by integrating over 2 congruent right triangles in the uniform $(X,Y)$ space.

Note that the length of a leg of one of these triangles, $l(m)$, satisfies $$l(0)=1, \\l(1/3)=0. $$ Linear interpolation then gives

$$l(m)=1-3m, $$ and thus $$P(M(X,Y)>m) = (1-3m)^2. $$

Finally, the CDF is

$$1-(1-3m)^2 , 0 \leq m \leq 1/3.$$

Related Question