# Find $P(X/2 < Y < X)$

Hello people I have a small confusion regarding a given problem.

Lets see it a bit.

We have given that:

$f(x,y) =\begin{cases} x y \text{ if } 0 \leq x \leq 2 \text{ and } 0\leq y\leq 1 \text{ , }\\ 0 \text{ else. }\end{cases}$

So, I have to find this probability $P(X/2 < Y < X)$

To begin with, I found $f$, $y$.

$f_x(x)=x/2$ and $f_y(y)= 2y$
So as you can see $f_x$ and $f_y$ are independent as $f_x \cdot f_y = f(x,y)$.

Now, my main problem is that I am not sure that integral limits should I take!

I have done quite a paper work already, and my "best bet" is this:

• If $x$ belongs to $(0,1)$ then I take integral from $$\int_{x/2}^x 2y dy= \frac 3 4 x^2.$$ So finally, to calculate this interval, we take integral $$\int_0^1 \frac 3 4 x^2\cdot \frac x 2 dx=3/32. \tag{Eq 1}$$

• If $x$ belongs to $(1,2)$ then, $$\int_0^1 2y dy= 1.$$ Basically I should take also another integral from $1$ to $y$, but that one equals to $0$. So finally, to calculate this interval, we take $$\int_1^2 x/2 dx = 3/4 \tag{Eq 2}$$

To sum up just add Eq1 + Eq2.

As you can see, I cant understand if my second bullet is correct, and why? (Maybe 1st bullet is wrong as well, but at least it makes more sense.

-
Many if not most people find their own questions very interesting. I don't think placing this very subjective assessement into the title adds valuable information about the question to it. Also, note that the tags are visible whereever the title is visible, so having "probability" as the only substantial word in the title makes it entirely redundant. Please consider replacing the title by one that more specifically summarizes the question. –  joriki Nov 13 '12 at 18:22

In the second bullet, if $x\in (1,2)$, then the integral limit for $y$ should be $(\frac{x}{2},1)$.

-
+1. This is the exact point to draw the OP's attention to to allow them to complete successfully their attempt. –  Did Nov 13 '12 at 19:49

We can find the answer by integrating the joint density function over a suitable region. You have correctly identified the integration that needs to be done. Presumably you have drawn a picture. (I probably could not solve the problem without drawing a picture.) The region of integration is the triangle with corners $(0,0)$, $(2,1)$, and $(1,1)$.

For the integration the way you did it, integrating first with respect to $x$, yes, things break up naturally into two parts, $x=0$ to $1$ and $x=1$ to $2$. The first part was done correctly.

For the second part, we want $$\int_{x=1}^2 \left(\int_{y=x/2}^1 xy\,dy\right)\,dx.$$

Another way: We do not need to break up the region! Integrate first with respect to $x$, which goes from $y$ to $2y$. Then integrate with respect to $y$. We get $$\int_{y=0}^1 \left(\int_{x=y}^{2y} xy\,dx\right)\,dy.$$ The calculations are straightforward.

-
It is conceptually not a good idea... I am a tad puzzled by this admonestation. Could you expand on it? –  Did Nov 13 '12 at 19:50
In the case of independence (the thing factors and we are working over a rectangle, note second part is needed), one can do it, it makes no difference, except for the (small) added work. But in the non-independent case, we cannot compute the answer just from knowing the marginals. Thus, in the general case, going after the marginals is a mistake. (I will now remove that part of the post, since it has done its intended work.) –  André Nicolas Nov 13 '12 at 20:10
Sure. But in the present case, to represent (X,Y) as a couple of independent random variables is a very good idea (one could even write them as functions of i.i.d. uniform random variables). In the general case, note that if we are not working on a rectangle, what you call the thing does not factor anyway--that is, unless one is guilty of the sin of not putting the indicator function of the domain in the density. –  Did Nov 13 '12 at 20:15
@did: The indicator function is indeed very useful. Many (most?) elementary texts do not use it. I have seen from students all too many times the assertion of independence with a constant density over a triangle, or circle. –  André Nicolas Nov 13 '12 at 20:22
Andre Nicolas, I just saw your answer. Thank you to begin with. I found it as 9/32, and it seems correct. But I have a major question regarding this second part. We put the integration limits from x/2 to 1 , alright I can understand this. But shouldn't we actually put limits from 0 to x/2 , and then from x/2 to 1 , and then from 1 to 2 , although the limits from 1 to 2 would produce zero in this case , since X<2 ? Thank you! –  Tms Jns Nov 13 '12 at 20:31