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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm having trouble finding the a different order of integration.

Here is the problem:

The joint probability distribution of $X$ and $Y$, f($x,y$),is given by:

$\frac{6}{7}(x^2 + \frac{xy}{2})$, where $0 < x < 1, 0 < y < 2$.

I'm supposed to calculate $P(X>Y)$.

I $can$ calculate $P(X>Y)$, by doing this:

$$\int_0^1 \int_0^x \! f(x,y) \, \mathrm{d} y \mathrm{d} x,$$ where $f(x,y)$ is the joint probability distribution of X and Y mentioned above. (FWIW, the solution I get is 15/56.)

$Now$, $this$ $is$ $where$ $my$ $problem$ $lies$. If I would have happened to integrate dx first, instead of dy, I need to change my limits of integration. I would have changed them to:

$$\int_0^2 \int_y^1 \! f(x,y) \, \mathrm{d} x \mathrm{d} y$$

This does not give the right answer. Thus, my question is: how do I set up this integral?

ps. Yes, this is homework (which isn't graded, btw). But I have already solved it. I'm just trying to understand a different way of doing the problem.

share|cite|improve this question
ZulfiqarIII has given a good answer. Put simply, in your second integral you need $y \le 1$ for the integral over $x$ and this needs to feed through into the limits of the integral over $y$. – Henry Jul 20 '12 at 0:49

The event $\{X > Y \}$ can be rewritten as the event $\{ (X,Y) \in B \}$, where $B := \{ (x,y) \in [0,1]\times [0,2] \; | \; x > y \}$; i.e. $$ P(X > Y) = P( (X,Y) \in B) = \int_B f(x,y) dx dy. $$ Now we can write this as an iterated integral, so we may choose an order of integration. First integrating over $y$ and then over $x$ indeed yields the first double integral you wrote down. However, if we first integrate over $x$ and then over $y$, we need to be a bit more careful. Note that $$ B = \{ (x,y) \in [0,1]\times [0,1] \; | \; x > y \} \cup \{ (x,y) \in [0,1]\times [1,2] \; | \; x > y \} = \{ (x,y) \in [0,1]\times [0,1] \; | \; x > y \} \cup \emptyset, $$ so we find that $$ P(X > Y) = \int_0^1 \int_y^1 f(x,y) dx dy. $$ Another way to get to this is by simply interchanging the order of integration in the first integral you wrote down (we may do so since the integral is non-negative), forgetting about $B$ entirely.

share|cite|improve this answer

Your Answer


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.