CDF for distance between two points on line segment

155 Views Asked by At

I am trying to solve a paper and have a basic question which I am unable to understand.

Given a line segment $[0,a]$, two points $x,y$ are randomly selected such that $\mathcal{D} = |x-y| \leq l$. So the CDF would be

$$P(L \leq l) = \iint_{\mathcal D}\mathcal{D}f_{XY}(x,y)dxdy,$$

where $f_{XY}(x,y) = \frac{1}{a^2}$ when $0 \leq x,y \leq a$, else $f_{XY}(x,y) = 0$

Now I dont understand how the author says, taking into account the bounds of both $\mathcal{D}$ and $f_{XY}(x,y)$, the CDF for distance distribution is as follows:

$$P(L\leq l) = \frac{1}{a^2}\Big(\int_0^l\int_0^{x+l}dydx + \int_l^{a-l}\int_{x-l}^{x+l}dydx + \int_{a-l}^a\int_{x-l}^{a}dydx\Big)$$

Can someone explain 'geometrically' how this expression appears?

The actual problem is attached as the figure below.

enter image description here

1

There are 1 best solutions below

0
On BEST ANSWER

The text is cutting a corner here by not saying why this works for $l\gt\frac a2$. I'll first explain it for $l\le\frac a2$.

The outer integration is over $x$, the inner integration is over $y$. We need to distinguish three cases for the outer integration because the bounds for $y$ are different in each case.

  • If $x\le l$, then the lower limit for $y$ is $0$, because any $y$ below $x$ is within $l$ of $x$. The upper limit is $x+l$. This is the first double integral.
  • If $l\lt x\lt a-l$, then any $y$ within $l$ of $x$ lies in $[0,a]$, so the lower and upper limit for $y$ are $x-l$ and $x+l$, respectively. This is the second double integral.
  • If $x\ge a-l$, then the upper limit for $y$ is $a$, because any $y$ above $x$ is within $l$ of $x$. The lower limit is $x-l$. This is the third double integral.

Now comes the tricky part: If $l\gt\frac a2$, the second double integral has the limit for $x$ reversed, so it's negative. This is exactly what we need to cancel the overcounting due to the fact that for $x\in[a-l,l]$, in the first and third double integrals the limits $x+l$ and $x-l$, respectively, went beyond $[0,a]$.