# Thread: what does reversing the order of integration mean.

1. ## what does reversing the order of integration mean.

When I have a problem such as

if f(x,y) = 2e^(-x-2y) , x>0, y>0 and 0 elsewhere find the integral when x< 2y
after drawing the picture, it seems like I could either first integrate over x x from 0 to 2 and then over y from x/2 to x or reverse. But only this one gives the right answer. What am I getting the answer to when I switch it?

2. Yes, they will be the same (if the integrals in question are not improper) - reversing the order of integration should make no difference.

Show your working and I'll see if I can work out what you're doing wrong.

3. Originally Posted by Mysc
When I have a problem such as

if f(x,y) = 2e^(-x-2y) , x>0, y>0 and 0 elsewhere find the integral when x< 2y
after drawing the picture, it seems like I could either first integrate over x x from 0 to 2 and then over y from x/2 to x or reverse. But only this one gives the right answer. What am I getting the answer to when I switch it?
The context is probability and statistics, right?

$\displaystyle \Pr(X < 2Y) = \int_{y=0}^{\infty} \int_{x=0}^{2y} 2 e^{-x-2y} \, dx \, dy = 2 \int_{y=0}^{\infty} e^{-2y} \, \int_{x=0}^{2y} e^{-x} dx \, dy = \frac{1}{2}$.

Alternatively:

$\displaystyle \Pr(X < 2Y) = \int_{x=0}^{\infty} \int_{y=x/2}^{\infty} 2 e^{-x-2y} \, dy \, dx = 2 \int_{x=0}^{\infty} e^{-x} \int_{y=x/2}^{\infty} e^{-2y} \, dy \, dx = \frac{1}{2}$.

4. ## yes, probability and statistics

what gives it away?

5. Originally Posted by Mysc
When I have a problem such as

if f(x,y) = 2e^(-x-2y) , x>0, y>0 and 0 elsewhere find the integral when x< 2y
after drawing the picture, it seems like I could either first integrate over x x from 0 to 2 and then over y from x/2 to x or reverse. But only this one gives the right answer. What am I getting the answer to when I switch it?
Originally Posted by mr fantastic
The context is probability and statistics, right?

[snip]
Originally Posted by Mysc
what gives it away?
The stuff in red was the first clue - this is just the style in which a pdf is defined.

Then of course when you calculate $\displaystyle \int_{0}^{\infty} \int_{0}^{\infty} 2 e^{-x-2y} dx \, dy$ on a hunch and get 1 as the answer, the evidence gets stronger.

And the stuff in blue is just the sort of thing you're asked to do with a bivariate pdf ....

So lots of little things add up to a strong hunch.

6. if f(x,y) = 2e^(-x-2y) , x>0, y>0 and 0 elsewhere find the integral when x< 2y
after drawing the picture, it seems like I could either first integrate over x x from 0 to 2 and then over y from x/2 to x or reverse. But only this one gives the right answer. What am I getting the answer to when I switch it?

So if I first integrated from 0 to 2 over x that would give me the probability function for y, and then if I integrated that from y= x/2 to x does that make any kind of sense? I know it doesn't, but I don't know exactly why.

7. Originally Posted by Mysc
if f(x,y) = 2e^(-x-2y) , x>0, y>0 and 0 elsewhere find the integral when x< 2y
after drawing the picture, it seems like I could either first integrate over x x from 0 to 2 and then over y from x/2 to x or reverse. But only this one gives the right answer. What am I getting the answer to when I switch it?

So if I first integrated from 0 to 2 over x that would give me the probability function for y, and then if I integrated that from y= x/2 to x does that make any kind of sense? I know it doesn't, but I don't know exactly why.
I cannot see why you would want to do this ...... Why do you think it would work? Where has "first integrated from 0 to 2 over x" come from? And where has "then if I integrated that from y= x/2 to x" come from?

I don't understand the logic behind your thinking .....

By the way, doing what you say gives a final answer with x in it. Surely you're meant to get a numerical value since you're finding a probability .....