1

We randomly (uniformly) generate points $[a,b]$, where $0 \leq a,b \leq 1$. Let $\epsilon$ be a given real number from the interval $[0, \sqrt{2}]$. What is the probability that if we generate two points $P_1,P_2$, then their distance will be at most $\epsilon$.

It's not an assignment. I'm just curious if it can be somehow solved :)

1 Answers1

1

We can solve this without any particularly clever probabilistic insights, just by computing a double integral. First, let's fix $\epsilon$. What's the probability that $a$ and $b$ are at most $\epsilon$ apart? For $\epsilon = 0.1$, it's the area of the shaded region in this diagram:

RegionPlot[Abs[x - y] < 0.1, {x, 0, 1}, {y, 0, 1}]

There are two unshaded triangles which when combined form a square of side length $1-\epsilon$. So the area of the shaded region is $p(\epsilon) = 2\epsilon - \epsilon^2.$ If we pick $\epsilon$ uniformly at random from $[0,1]$, our answer will be $\int_0^1p(\epsilon)\mathrm d \epsilon = \frac23.$