But that is exactly what it does! First, note that \(\displaystyle f_Y(y)\) depends only upon y so can be taken out of the x integration. We can write that expression as
\(\displaystyle \int_0^\infty f_Y(y) \left(\int_0^y f_X(x)dx\right)dy\).
The integral inside the parentheses is the probability that x is less than a given y and the integral outside the parentheses extends that to all y.
Thank you so much for your help!
Resurrecting this thread more that 2 months later - realised it's much more relevant to my research now.
I just want to confirm how this works when there are restrictions on X and Y.
Suppose I have restrictions \(\displaystyle x \in (a, b) \) and \(\displaystyle y\in[0, b) \). Also suppose that the PDF of x is \(\displaystyle f_{X}(\cdot) \) and the PDF of y is \(\displaystyle f_{Y}(\cdot) \), with corresponding CDFs \(\displaystyle F_{X} \) and \(\displaystyle F_{Y} \). The two distributions are independent. (To clarify, the support of both distributions is still \(\displaystyle [0, \infty) \), these restrictions are just for the certain events as outlined below - so I want to make sure I don't include probabilities of things that I don't want)
Here are two scenarios that I am considering, followed by possible solutions based on the advice given in this thread so far:
1. \(\displaystyle \Pr(x<y) \) and also \(\displaystyle x \in (a, b) \) and \(\displaystyle y\in[0, b) \)
Solution 1.1:
\(\displaystyle \displaystyle{\Pr(x<y \cap x \in (a, b) \cap y\in[0, b)) = \int_{0}^{b} \int_{a}^{y} f_{Y}(y) f_{X}(x) dx dy} \)
Solution 1.2:
\(\displaystyle \displaystyle{\Pr(x<y \cap x \in (a, b) \cap y\in[0, b) = \int_{a}^{b} \int_{a}^{y} f_{Y}(y) f_{X}(x) dx dy} \) - This solution comes from the fact that if x<y, then y must be at least a given the restrictions on x?
Solution 1.3:
\(\displaystyle \displaystyle{\Pr(x<y \cap x \in (a, b) \cap y\in[0, b) = \int_{0}^{\infty} \int_{0}^{y} f_{Y}(y) f_{X}(x) dx dy} \times f_{Y}(b) \times \left(f_{X}(b) - f_{X}(a) \right) \) - is this equivalent to either of the other two representations? This would be great to know. But I'm suspecting there may be some problems with independence
2. \(\displaystyle \Pr(x>y) \) and also \(\displaystyle x \in (a, b) \) and \(\displaystyle y\in[0, b) \)
Solution 2.1:
\(\displaystyle \displaystyle{\Pr(x>y \cap x \in (a, b) \cap y\in[0, b) ) = \int_{0}^{b} \int_{y}^{b} f_{Y}(y) f_{X}(x) dx dy} \) - This answer is problematic as it does not restrict x to be above a
Solution 2.2:
\(\displaystyle \displaystyle{\Pr(x>y \cap x \in (a, b) \cap y\in[0, b) ) = \int_{a}^{b} \int_{y}^{b} f_{Y}(y) f_{X}(x) dx dy} \) - I don't think this is correct either because its restricting y to be above a, when y can be between 0 and a.
How do I incorporate a and b into these formulations? Thanks again for your help freemathhelp community.