2
$\begingroup$

Let $L_1$ and $L_2$ be two intersecting line segments. Let $\theta$ be the smaller angle of intersection between the two. $L_1$ is divided into segments of length $a$ and $b$ while $L_2$ is divided into segments of length $c$ and $d$ by the point of their intersection (call it $O$). A point $X$ is taken on $L_1$ with uniform probability across its length and another one, $Y$ on $L_2$ with the same probability distribution. Let $Z$ be the distance between these two points. How do we calculate the probability density function for $Z$. From what I can figure out, if $X$ and $Y$ are such that $\angle XOY$ is acute, then $Z^2 = OX^2 + OY^2 - 2*OX*OY*cos\theta$ and otherwise, $Z^2 = OX^2 + OY^2 + 2*OX*OY*cos\theta$. So perhaps the problem can be broken down into two parts.

$P(Z^2 > z) = P(Z^2 > z | \angle XOY acute) * P(\angle XOY acute) + P(Z^2 > z | \angle XOY obtuse) * P(~ \angle XOY obtuse)$.

I can't really understand how do I proceed further or if there is a simpler way from scratch.

$\endgroup$
3
  • $\begingroup$ Welcome to MSE. You'll get a lot more help, and fewer votes to close, if you show that you have made a real effort to solve the problem yourself. What are your thoughts? What have you tried? How far did you get? Where are you stuck? This question is likely to be closed if you don't add more context. Please respond by editing the question body. Many people browsing questions will vote to close without reading the comments. $\endgroup$
    – saulspatz
    Commented Jan 9, 2020 at 12:55
  • $\begingroup$ Thanks @saulspatz but I am stuck at quite the start. I have edited the question though. $\endgroup$
    – kunalc92
    Commented Jan 9, 2020 at 13:10
  • $\begingroup$ You can get the proper font for $\cos$ using \cos. For operators that don't have a command of their own, you can use \operatorname{name}. $\endgroup$
    – joriki
    Commented Jan 9, 2020 at 13:55

1 Answer 1

1
$\begingroup$

Write the segments in parametric form, $\vec a+\lambda\vec x$ and $\vec b+\mu\vec y$ with $\lambda,\mu\in[0,1]$. Then the distance squared is

$$ d^2=\left(\vec a-\vec b+\lambda\vec x-\mu\vec y\right)^2\;, $$

and the density of $d^2$ is

$$ f_{d^2}\left(d^2\right)=\int_0^1\mathrm d\mu\int_0^1\mathrm d\lambda\,\delta\left(\left(\vec a-\vec b+\lambda\vec x-\mu\vec y\right)^2-d^2\right)\;. $$

You can perform the inner integration using the rules for composition of a delta distribution with a function:

$$ f_{d^2}\left(d^2\right)=\sum_i\int_{\mu_{0i}\left(d^2\right)}^{\mu_{1i}\left(d^2\right)}\frac{\mathrm d\mu}{2\vec x\left(\vec a-\vec b+\lambda_i\left(\mu,d^2\right)\vec x-\mu\vec y\right)}{}\;, $$

where $\lambda_i\left(\mu,d^2\right)$ are the roots of the argument of the delta distribution and $\mu_{0i}\left(d^2\right)$ and $\mu_{1i}\left(d^2\right)$ are the limits up to which these roots exist and lie in $[0,1]$.

The integral doesn't look very promising, since the $\lambda_i$ are roots of a quadratic equations and thus contain square roots; but depending on your application you might use numerical quadrature.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .