Density of min(X,Y), max(X,Y) for iid Uniform (Related to other post)

There's a very detailed answer, but while I was doing the same exercise by myself I was thinking in a similar but slightly different way, which lead me to a different answer. Here I'll share with you my work so I can understand the why of the difference.

Also, I am making focus on the value of the CDF, and not yet working on the joint pdf.

Given $$(Z,W)=(min(X,Y), max(X,Y))$$ for $$X,Y$$ iid Uniform(0,1), find the CDF.

I thought of : $$$$P(Z\leq a,W\leq b)=\\ P(min(X,Y)\leq a,max(X,Y)\leq b)=\\ P( \{X\leq a, a \leq Y\leq b\} \cup \{a \leq X \leq b, Y\leq a\} )=(1)\\ P(\{X\leq a, a \leq Y\leq b\}) + P(\{a \leq X \leq b, Y\leq a\})= (2)\\ P(X\leq a) P( a \leq Y\leq b) + P(a \leq X \leq b) P(Y\leq a)= (3)\\ F_X(a)( F_Y(b)-F_Y(a)) + ( F_X(b)-F_X(a)) F_Y(a)=\\ F(a)(F(b)-F(a))+ (F(b)-F(a)) F(a)= (4)\\ 2F(a)(F(b)-F(a)) =\\ 2F(a)F(b) - 2F(a)^2$$$$ Where $$a$$ would be the minimum, $$b$$ the maximum and I use:

1. {X is the minimum, Y the maximum} union {Y is the minimum, X the maximum}
2. Probability of the union of disjoint set
3. Independence of $$X$$ and $$Y$$
4. The fact that $$F_X$$ = $$F_Y$$ = $$F$$

This result is different to $$F_{X,Y}(a,b) + F_{X,Y}(b,a) - F_{X,Y}(a,a)$$, as given in the original question (there are differences in variable naming, but the setting is essentially the same)

I notice that if I use the idea (4) about equality of CDFs, it would be really close: with the answer to the original question being $$- F(a)^2$$ compared to $$- 2F(a)^2$$ in the way I am doing it.

I did the drawings of the regions considered and I can clearly see the missing "infinite square" $$(X, but my argument is that if $$X$$ is the minimum, then $$Y$$ should be integrated over a region where $$Y$$ would be the maximum (and vice-versa), hence the difference in the proposed sets considered.

• In (1), what about the case $X\leq a, Y\leq a$? Aug 13 at 10:52
• Since I derive the $X$,$Y$ limits from $Z$,$W$ I would say that if $Z< \leq a$ and $W \leq b$ it is a necessary condition that $a \leq b$ by definition of $max$ and $min$, therefore that case should not occur. I think that the problem in my argument is the following: Taking $min(5,50)$, $max(5,50)$ I can say that $5 \leq 100$ and that does not imply that $50 \geq 100$. In general: saying that the $min$ of two numbers is less than another number, doesn't mean that the $max$ of the two is greater than that number. And that is the flaw of my previous reasoning. Aug 13 at 12:40
• I don't understand, if $X\leq a$ and $Y\leq a$, then automatically, $\min(X,Y)\leq a$ and $\max(X,Y)\leq a\leq b$. But, this case is not covered. Aug 13 at 12:42
• Exactly, that is what I was trying to say in my comment. You put it more clearly in mathematical terms, but you're right. That was the flaw of my argument, since I was saying that $min(X,Y)\leq a$ implies $a \leq max(X,Y)$, which now I see it is not necessary the case. Aug 13 at 12:47

$$P( \{X\leq a, a \leq Y\leq b\} \cup \{a \leq X \leq b, Y\leq a\} )$$
Is excluding the cases $$X and $$X, when both $$X$$ and $$Y$$ are smaller than $$a$$.
This is because your expression with either $$a \leq Y\leq b$$ or $$a \leq X\leq b$$ you make the restriction that at least one of the variables must be above $$a$$.
When you incorporate these cases with both $$X\leq a, Y \leq a$$, then your end result will be increased by $$P(X \leq a,Y \leq a) = F(a)^2$$. You will get a result of $$2F(a)F(b)-F(a)^2$$ instead of $$2F(a)F(b)-2F(a)^2$$