# Probability of estimated distance 1 smaller than estimated distance 2 if distance 1 is smaller than distance 2

Suppose we have a network with node $i$ in the origin $[0,0]$ and node $1$ and node $2$ located in $[x_1,y_1]$ and $[x_2,y_2]$ respectively, where $x_1,y_1,x_2,y_2$ follow a Uniform distribution $\sim\mathcal{U}(-L,L)$ . However, we also have estimated positions so for each node, ${[\hat{x_i},\hat{y_i}]}=[x_i,y_i]+\vec{e_{i}}\sim\mathcal{N}(0,\sigma^2\mathbf{I}_{2 \times 2})$. This means that we add a gaussian noise to the real locations to have the estimated positions, based on the variance $\sigma^2$ we define.

We want to find $P[\hat{d_{i1}}<\hat{d_{i2}} | d_{i1}<d_{i2}]$ where $\hat{d_{i1}}$ is the estimated distance from point 1 to origin, $\hat{d_{i2}}$ is the estimated distance from point 2 to origin, $d_{i1}$ is the real distance from point 1 to origin and $d_{i2}$ is the real distance from point 2 to origin using the real positions or estimated ones accordingly, so:

$d_{i1}=\sqrt{(x_1)^2+(y_1)^2}$

$d_{i2}=\sqrt{(x_2)^2+(y_2)^2}$

$\hat{d_{i1}}=\sqrt{(\hat{x_1})^2+(\hat{y_1})^2}$

$\hat{d_{i2}}=\sqrt{(\hat{x_2})^2+(\hat{y_2})^2}$

The answer has to be based on the variance of the noise $\sigma^2$ so depending on that value, the probability will be higher or lower.

How would you approach this problem?

We know that $P[d_{i1}<d_{i2}]=1/2$ and $P[\hat{d_{i1}}<\hat{d_{i2}}]=1/2$ for random variables with the same parameters, but the conditional probability is causing me problems.