Integral swapping in probability calculation for joint density function

ISTER_REG

Junior Member
Joined
Oct 28, 2020
Messages
59
Hello,

I have a joint density function of [MATH]X[/MATH] and [MATH]Y[/MATH] with

[MATH]f(x,y) = \begin{cases} 2e^{-x}e^{-2y}, \quad 0 < x < \infty, 0 < y < \infty \\ 0, \quad \text{else}\end{cases}[/MATH]
Now I want to calculate [MATH]P(X<Y)[/MATH] and [MATH]P(X<a)[/MATH]. For this there is the following example calculation, which I would like to reproduce here very briefly:

[MATH]P(X<Y) = \int_{0}^{\infty}\int_{0}^{y} 2e^{-x}e^{-2y} \, dx\, dy[/MATH]
[MATH]P(X<a) = \int_{0}^{a}\int_{0}^{\infty} 2e^{-x}e^{-2y} \, dy\, dx[/MATH]
My question here is, if I look at both integrals for [MATH]P(X<Y)[/MATH] and [MATH]P(X<a)[/MATH], I notice that in the last case the integral limits are swapped ([MATH]dx\, dy[/MATH] vs. [MATH]dy\, dx[/MATH]), but why?.

For the last case, I have additionally found that one can calculate alternatively the following:

[MATH]P(X<a) = \int_{0}^{\infty}\int_{0}^{a} 2e^{-x}e^{-2y} \, dx\, dy[/MATH]
So the following relationship holds:

[MATH]P(X<a) = \int_{0}^{a}\int_{0}^{\infty} 2e^{-x}e^{-2y} \, dy\, dx = \int_{0}^{\infty}\int_{0}^{a} 2e^{-x}e^{-2y} \, dx\, dy[/MATH]
The question I have is, what is correct now? Why did one exchange the integral limits for [MATH]P(X<a)[/MATH]? Which style of integrating should one get used to here?

Unfortunately, it is not explained that why one has swapped the limits in the case of [MATH]P(X<a)[/MATH]. I have a guess Fubini, but I'm not sure and so I ask here :)
 
They are equal so what is the problem?

Did you notice that you can move e^-x in front of the 1st integral sign. The 2nd integral will just be a constant (it is a definite integral!) and can be moved in front of the 1st integral sign after it is computed. That is in the end you are doing each integral separately. Since multiplication of real numbers commute then in this case the integrals commute.

I left out a bit of the details (for you to think about) so if you are not clear what I am saying just ask.
 
Did you notice that you can move e^-x in front of the 1st integral sign. The 2nd integral will just be a constant (it is a definite integral!) and can be moved in front of the 1st integral sign after it is computed. That is in the end you are doing each integral separately. Since multiplication of real numbers commute then in this case the integrals commute.

Exactly that is completely correct, I recognized that and then also packed it into my contribution (see equality of the two double integrals). As far as I know, however, one may not always exchange the integral limits in such a way (here it went by chance).

What bothers me and therefore I have actually inquired is that I have three examples with the textbook, which is present to me (Ross), of which I have quoted here more or less two:

[MATH]P(X<Y) = \int_{0}^{\infty}\int_{0}^{y} 2e^{-x}e^{-2y} \, dx\, dy[/MATH]
and

[MATH]P(X<a) = \int_{0}^{a}\int_{0}^{\infty} 2e^{-x}e^{-2y} \, dy\, dx[/MATH]
why was the integral swapped in the last case, with what justification (why not keep the integration pattern "\int \int ... dx dy" for the last case ?). In my textbook I find no reasoning.... Did the author simply have fun with the reader here? I have calculated both cases via hand and yes the integrals are the same, but why then confuse the reader unnecessarily by exchanging the integral limits completely by chance? Do you know what I mean?
 
Last edited:
I guess that you did not understand what I said. I will give more details in this post.

[math]\int_0^a \int_0^\infty e^{-x}e^{-2y}dydx = \int_0^a e^{-x}(\int_0^\infty e^{-2y}dy)dx = \int_0^\infty e^{-2y}dy\int_0^a e^{-x}dx = \int_0^a e^{-x}dx\int_0^\infty e^{-2y}dy[/math]
Is this clearer?
 
Yes, but that is exactly what I have here on my personal notes, however, I have omitted the long calculation as you have written it down. I know that you can pull out the "constant" and integrate that way. So I also showed that it doesn't matter if you calculate dx dy or dy dx (I then tried to show this with the equality of the double integrals).

I have only the question, if in two examples always after the pattern "\in \int ... dx dy" was calculated/integrated, why then not also in the third example. Why using there the patter "\in \int ... dy dx" without any statement/reason/justification?
 
Last edited:
I finally understand your question! The short answer is that the author felt like it. There is no reason that I can see to make that change. Possibly the author had it written in that form earlier in the text and just wanted to maintain that form? Not trying to be rude, but (in this case) it seems to me that only the author could answer your question.
 
Hey, and thanks for your efforts here. I really appreciate it!

To briefly go back to what you were trying to express with the double integrals. That's Fubini's rule, which says that you can integrate just like you did in your example if it's certain definite integrals, right? And since both integrals here are definite, so that also possible here? I ask because I'm briefly thinking about whether the infinite also applies as a constant, but it had to, since it is yet a definite integral?! :) If all this is teh case that makes many integral calculations for joint density functions much easier!
 
I mark this topic as solved, thanks to @Jomo for the help!

Who wants to can still comment on my last question, I will read that!
 
Top