Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

enter image description here

If either point is above or on the y=1/4 line, or below or on the y=-1/4 line, then the two points are definitely on the same side of the x-axis. For the other possible points I know I need to calculate portions of the areas of circles with radius=1/4; I'm just not sure how to go about that.

share|improve this question
    
Doesn't the unit square have sides of length 1? You appear to be defining it over (-1,1) in each dimension??? –  wolfies Dec 6 '13 at 5:25
1  
After you ask a question here, if you get an acceptable answer, you should "accept" the answer by clicking the check mark ✓ next to it. This scores points for you and for the person who answered your question. You can find out more about accepting answers here: How do I accept an answer?, Why should we accept answers?. –  user40314 Jan 8 at 21:43

2 Answers 2

Let $(X_1, Y_1)$ and $(X_2, Y_2)$ be the Cartesian coordinates of the two random points with $D$. Then $X_1$, $X_2$, $Y_1$ and $Y_2$ and independent and uniformly distributed over $(-1,1)$ interval.

The event of interest is $A = \{Y_1 Y_2 > 0\}$, conditioned on another event $$B = \{(X_1-X_2)^2 + (Y_1-Y_2)^2 < \tfrac{1}{4}$$

You are to compute $$ \begin{eqnarray} \Pr(A \mid B) &=& \frac{\Pr(A, B)}{\Pr(B)} \\ &=& \frac{ \int_{-1}^1 \int_{-1}^1 \int_{-1}^1 \int_{-1}^1 \left[y_1 y_2 > 0\right] \cdot \left[ (x_1-x_2)^2 + (y_1-y_2)^2 < \frac{1}{4^2} \right] \mathrm{d}x_1 \mathrm{d}x_2 \mathrm{d}y_1 \mathrm{d}y_2}{ \int_{-1}^1 \int_{-1}^1 \int_{-1}^1 \int_{-1}^1 \left[ (x_1-x_2)^2 + (y_1-y_2)^2 < \frac{1}{4^2} \right] \mathrm{d}x_1 \mathrm{d}x_2 \mathrm{d}y_1 \mathrm{d}y_2 } \end{eqnarray} $$

Asking Mathematica to evaluate this gives: enter image description here

The answer agrees with Monte-Carlo simulation:

In[55]:= bset = 
  Cases[RandomVariate[
    UniformDistribution[{-1, 1}], {2 10^6, 2, 
     2}], {{x1_, y1_}, {x2_, y2_}} /; (x1 - x2)^2 + (y1 - y2)^2 < 
     1/4^2];

In[56]:= Length[Cases[bset, {{x1_, y1_}, {x2_, y2_}} /; y1 y2 > 0]]/
  Length[bset] // N

Out[56]= 0.942381
share|improve this answer

This is an odd definition of a "unit square" since it has an area of $4\text{units}^2$! Notwithstanding:

You are on the right track:

  1. By symmetry, you only need to consider one side of the axis, lets make it the positive side.
  2. As you say, if $y_1\ge \frac{1}{4}$ then they are on the same side. The probability of this is $0.75$.
  3. As you say, if $y_1\lt \frac{1}{4}$ the probability that $y_2$ is on the same side of the x-axis is the ratio of the upper segment of the circle formed by the x-axis to the circle as a whole. How's your circle geometry?
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.