Find the probability that $(a-c)^2+(b-d)^2<1/4$ I was trying to solve for $P((a-c)^2+(b-d)^2<1/4)$ where $a,b,c,d$ are independent and uniformly distributed on $[0,1]$. One thing that I found online was $a-c$ has a triangular distribution.
I think that you have to find the probability cumulative function, but I don't know how to do that. Though I am willing to look through some resources which could point to how to solve these kinds of problems. I briefly looked through a probability and statistics textbook, but couldn't find what I needed.
 A: Let $X_1, X_2,X_3,X_4$ be iid (independant identically distributed) Unif[0,1] random variables. Let
$$D:=(X_1-X_2)^2 \ \ \ \text{and}  \ \ \ E:=(X_3-X_4)^2.$$
The pdf of $X_1-X_2$ is known to be the "tent function" with support on $[-1,1]$ (its equation is $f(x)=1-|x|(-1\le x\le 1)$ but we do not need it).
$$P(D<x)=P((X_1-X_2)^2<x)=P(|X_1-X_2|^2<x)=P(-\sqrt{x} \le |X_1-X_2|<\sqrt{x})=1-(1-\sqrt{x})^2 \tag{1}$$
(the last equality comes from a geometrical reasoning on the shape of the tent function: total area minus the area of 2 triangles on the left and right side).
(1) means that the cdf of Random Variable $D$ is
$F_D(x)=1-(1-\sqrt{x})^2=2 \sqrt{x}-x$
Therefore, by derivation, the associated pdf is:
$$f_D(x)=\dfrac{1}{\sqrt{x}}-1 \ \ \text{for} \ \ 0 \le x \le 1\tag{2}$$
$E$ has the same pdf as $D$.
The pdf of their sum $D+E$ is the convolution of their pdf, i.e., (obtained through Wolfram Alpha: see remark at the bottom)
$$f_{D+E}(a)=\pi+a-4\sqrt{a} \ \  \text{when} \ \ 0<a<1 \tag{2}$$
(if $a>1$ there is a different expression for $f_{D+E}(a)$, but we do not need it here; see Remark below).
Therefore, by integration, its cdf is
$$F_{D+E}(a)=\pi a + \frac12 a^2 - \frac83 a\sqrt{a}$$
Here is now the final computation:
$$P(D+E<1/4)=F_{D+E}(1/4)=\pi/4-29/96 \approx 0.483315$$
Remark dealing with the obtention of the convolution. I have asked to Wolfram Alpha the indefinite integral (primitive function):
$$\Phi(x)=\int \underbrace{\left(\dfrac{1}{\sqrt{x}}-1\right)}_{f_D(x)}\underbrace{\left(\dfrac{1}{\sqrt{a-x}}-1\right)}_{f_E(a-x)}dx \tag{3}$$
$$\Phi(x)=x+2(\sqrt{a-x}-\sqrt{x})+2 \arcsin \sqrt{\tfrac{x}{a}}$$
out of which the cdf of $D+E$ is obtained
$$F_{D+E}(x)=\left[\Phi(x)\right]_{x=0}^{x=a}$$
giving relationship (3).
In fact, if one needs for further calculations to consider values of $a$ in interval $(1,2)$, one should write (2) under the form:
$$f_D(x)=(\dfrac{1}{\sqrt{x}}-1)_+=(\dfrac{1}{\sqrt{x}}-1)(0 \le x \le 1)$$
the "+" index meaning "positive part" and the multiplication by $(0 \le x \le 1)$ meaning "multiplication by $\mathbb{1}_{[0,1]}$".
For all this, see this paper and this one generalizing these computations (in particular with different versions of integral similar to (3)).
Remark: the computation of (3) can as well be found here.
A: The quantity $(a-c)^2 + (b-d)^2$ is the square of the distance between the coordinates $(a,b)$ and $(c,d)$, where we clearly have both points independent and identically distributed uniformly in the unit square $[0,1]^2$.  Thus, your probability is geometrically equivalent to asking for the probability that two points, picked uniformly at random in the unit square, will be less than $1/2$ units apart.  How might you reason from this point forward?
