# Setting boundaries for calculating $P(Y/X>2)$ choosing $dx/dy$ order [duplicate]

Given two independent variables $$X$$ and $$Y$$, with marginal pdfs $$f_X(x)=2x, 0 \le x \le 1$$ and $$f_Y(y)=1, 0 \le y \le 1$$, calculate $$P(\frac{Y}{X} > 2)$$. So this can be written as $$P(Y>2X)$$,

and can be solved by solving the following integral: $$\int_0^1 \int_0^{y/2}f_X(x)f_Y(y)dxdy$$

However when switching the $$dx$$ and $$dy$$ it seems to me that this could also be solved this way: $$\int_0^1 \int_{2x}^{1}f_X(x)f_Y(y)dydx$$

But solving the integral, this doesn't give the right answer. Why not? Aren't they both defining the same area?

Thank you so much!

## marked as duplicate by whuber♦ self-study StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Mar 22 at 21:10

• The duplicate is the same question with slightly different limits involved. See the first comment to it as well. – whuber Mar 22 at 21:11
• Sorry about that! It seems like I'm having the same kind of questions! – Sarina Mar 22 at 21:36
• It looks like the advice I provided to another poster at stats.stackexchange.com/questions/398993/… might help you out too: when you find you're asking the same questions about the same fundamental concept or technique, you're probably best off consulting a good textbook, because you need to cope with issues that go deeper than a mere difficulty solving one or two problems. – whuber Mar 23 at 13:51
• Thank you! I've just read my textbook so many times over and still having trouble with a certain aspect of it obviously! I'll try looking at some other resources. Thanks! – Sarina Mar 24 at 21:54

If you draw the region of integration, you’ll see that it’s bounded by the lines $$y=2x, y=1, x=0$$. These intersect at $$(0,0),(0,1),(1/2,1)$$. So, $$x$$ is not bigger than $$1/2$$. Intuitively, if $$x>1/2$$, how can $$y$$ be bigger than $$2x$$, while it is also smaller than $$1$$? Thus, your first integral has limits $$0\rightarrow 1/2$$.

• Wow! Thank you so much! Do you think the best way to figure this out is to draw it out? It seems like that's the only way, right? – Sarina Mar 22 at 20:32
• It’s not the only way, but I think it is the best way :) – gunes Mar 22 at 20:34