# Use Points in Euclidean space to find probability based on distributions?

Given a string at the origin in Euclidean real space to a random point (x,y) where x~N(2,1) and y~N(0,1), how can one determine the probability that the string will need to be longer > 3 units from origin?

Introductory work: I recognize to use distance formula: square root($x^2$ + $y^2$) > $3^2$, and to square both sides. I recognize that squaring vector x will produce a non-central $x^2$ and squaring vector y will produce a central $x^2$.

I don't know what to do to solve from here. I have read previous problems on Euclidean distance but do not need to solve for the function. I need to somehow find the probability answer.

• You've described the marginal distributions (each normal), but not the joint distribution. Jan 17, 2016 at 2:26
• In my hint, I assumed the x and y distributions were independent.
– user1566
Jan 17, 2016 at 3:29

## 1 Answer

Solution:

• If |y| is bigger than 3, the string is always longer than 3 units, regardless of the value of x. The chance that the standard normal distribution will be less than -3 or greater than +3 is $\text{erfc}\left(\frac{3}{\sqrt{2}}\right)$ which is about 0.0026998

• For -3 < y < 3, the chance that y = y0 (for any y0) is the PDF of the standard normal at y0 or $\frac{e^{-\frac{\text{y0}^2}{2}}}{\sqrt{2 \pi }}$

• If y=y0, we want to compute the chance that x^2 + y0^2 > 3^2, or x^2 > 3^2 - y0^2 or |x| > Sqrt[3^2-y0^2].

• The chance that x < -Sqrt[3^2-y0^2] is just the CDF of x's distribution to the value, which is $\frac{1}{2} \text{erfc}\left(\frac{\sqrt{9-\text{y0}^2}+2}{\sqrt{2}}\right)$

• The chance that x > Sqrt[3^2-y0^2] is 1 minus the CDF of x's distribution to the value, which is: $1-\frac{1}{2}\text{erfc}\left(-\frac{\sqrt{9-\text{y0}^2}-2}{\sqrt{2}}\right)$

• Since the two events above don't overlap, the total chance that x will be large enough to make the total length bigger than 3 is the sum of the above or: $\frac{1}{2} \left(-\text{erfc}\left(-\frac{\sqrt{9-\text{y0}^2}-2}{\sqrt{2}}\right)+\text{erfc}\left(\frac{\sqrt{9-\text{y0}^2}+2}{\sqrt{2}}\right)+2\right)$

• So, for any given value of y0, the above is the chance x will be big enough to make the total length greater than 3. Since we know the probability of y=y0 (as above), the probability of the combined events is the product of the two probabilities or:

$\frac{e^{-\frac{\text{y0}^2}{2}} \left(-\text{erfc}\left(-\frac{\sqrt{9-\text{y0}^2}-2}{\sqrt{2}}\right)+\text{erfc}\left(\frac{\sqrt{9-\text{y0}^2}+2}{\sqrt{2}}\right)+2\right)}{2 \sqrt{2 \pi }}$

• To find the total probability over all y0, we integrate the above from -3 to +3 (since we made a special case for y < -3 and y > 3 above) numerically to get 0.211662.

• We now add this probability to the probability of |y| > 3 we computed earlier to get 0.214362

Here's a plot of your probability function and a circle of radius 3 (note that the circle looks elongated because it follows the surface of your probability distribution)

Note: I wrote https://github.com/barrycarter/bcapps/blob/master/MATHEMATICA/bc-solve-stats-191040.m to help solve this.

Former answer/hint:

Hint that's too long for a comment. Consider 3 cases:

• if x < -3, the string length is > 3

• if x > 3, the string length is > 3

• For all other values of x, let's take x = 1.5 as an example.

• If x = 1.5, then y^2 > 3^2-1.5^2 = 6.75, or |y| > Sqrt[6.75].

• Thus compute the PDF of x = 1.5 and multiple by the probability that |y| > Sqrt[6.75] (which would involve the CDF).

• Finally, integrate.

Let me know if this doesn't help

• It's not related to the distance formula so much as I'm supposed to show what happens when I sum a non-central $\chi^2$ with its non-centrality parameter (which we're using $\mu'$A$\mu$/2) and a central $\chi^2$, and then use the function pchisq (which I need someone to hopefully explain, I don't know what this is). I don't know how to write or find the sum of these chi-squareds, so that's where I'm stuck. Jan 17, 2016 at 20:51
• OK, I think I understand the issue now, but I'm not sure if I'll update this answer, so if any one else wants to help, please do so.
– user1566
Jan 18, 2016 at 18:50
• en.wikipedia.org/wiki/Noncentral_chi-squared_distribution may or may not help
– user1566
Jan 18, 2016 at 19:29
• I've studied your answer and will come back to it again. Thank you very much for the step by step, I need that as I have not learned the error reducing function erfc nor did we have a worked example. I looked up erfc to start to learn it. If you can clarify just briefly, why do I need to find the p(|y|) > 3, since in the vectors for y, 1-1 = 0? Jan 18, 2016 at 19:45