# Finding pdf of the distance between two points (My strategy right or wrong?)

I have $N$ points randomly distributed in between points $A$ and $B$ in an area. I want to find the pdf of the distance between point $A$ and $B$.

Prior Knowledge:

1- $f_{d_{A,i}} \forall i \in (1,...,N)$ is known where $d_{A,i}$ represent the distance between point $A$ and $i$-th point)

2- $f_{d_{i,B}} \forall i \in (1,...,N)$ is known where $d_{i,B}$ represent the distance between point $i$ and $B$ point

3- It is assumed that $d_{A,i}$'s and $d_{i,B}$'s are $i.i.d$.

Possible Strategy (Please check if its right or wrong)

1- Use $f_{d_{A,i}}$ to find the CDF of $d_{A,i}$. Then find the CDF of $max (d_{A,i})$, which in this case will be $n$-th power of the CDF of $d_{A,i}$ because of $iid$ assumption.

2- Find CDF of distance between $A$ to $B$ by using CDF of $max (d_{A,i})$ and pdf of $d_{x,B}$. Note here that I have used $x$ to use the fact that all the $d_{i,B}$'s are $i.i.d$ hence pdf will be same for all $i$'s. (I have lot of confusion in this point please clarify if I am wrong.)

3- Differentiate the answer obtained in step 2 of my strategy.

• @joriki you are absolutely right. But in the given condition if it is assumed that they are $i.i.d.$ then what will happen. In my understanding the assumption that $d_{x,B}=d_{i,B}$ (the text in bold) maybe wrong because $d_{x,B}$ maybe conditioned on the fact that we are using maximum of $d_{A,i}$'s. Am I right? – Frank Moses Apr 25 '16 at 6:18
• @joriki For example it becomes simple to understand my question if we assume that $x$ point has the maximum distance from point then is it ok to assume that the distance from point $x$ to point $B$ has same distribution as any other point has? – Frank Moses Apr 25 '16 at 6:25
• If they had to be on the bisector, then $d_{A,i} = d_{i,B}$, and then they can't be independent unless they are almost surely constant. – Robert Israel Apr 25 '16 at 6:25
• @RobertIsrael I am just assuming that $d_{A,i}$ and $d_{i,B}$ are $i.i.d$. For example in the case that point $A$ and point $B$ both are not fixed but can assume any position. – Frank Moses Apr 25 '16 at 6:29
• I assume this is in a plane. You could (for fixed $A$ and $B$) give $d_{A,i}$ and $d_{i,B}$ some arbitrary distribution supported on an interval $[a,b]$, where $2a \ge d(A,B) \ge b-a$. Then for every pair $(x,y) \in [a,b] \times [a,b]$, there are one or two points with distance $x$ from $A$ and $y$ from $B$, and – Robert Israel Apr 25 '16 at 6:37
For a concrete example of how the distributions of the $d_{A,i}$ and $d_{i,B}$ don't determine the distribution of $d_{A,B}$, consider the following process.
We will put $A$ at the origin in the plane, and $B$ at $[d_{A,B},0]$ where $d_{A,B}$ is anything from $3$ to $4$. Then choose $s_i$ and $t_i$ iid with a uniform distribution (or whatever other distribution you wish) in the interval $[3,4]$, for $i = 1\ldots N$. Since $3 \le s_i \le 4$ and $3 \le t_i \le 4$, the circles centred at $A$ and $B$ with radii $s_i$ and $t_i$ respectively intersect at some point in the upper half plane, which we take as our $i$'th point, so that $d_{A,i} = s_i$ and $d_{i,B} = t_i$.
Knowledge of the distribution of the $s_i$ and $t_i$ does not determine the distribution of $d_{A,B}$. The only constraint on it comes from the triangle inequality: if it is possible to have $d_{A,i} = s$ and $d_{i,B} = t$, then we must have $s+t \ge d_{A,B} \ge |s-t|$.