I was looking at Determine density of $\min(X,Y)$ and $\max(X,Y)$ for independently uniform distributed variables

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 : \begin{equation} 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 \end{equation} 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<a, Y<a)$, 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.

  • 1
    $\begingroup$ In (1), what about the case $X\leq a, Y\leq a$? $\endgroup$
    – gunes
    Commented Aug 13, 2021 at 10:52
  • $\begingroup$ 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. $\endgroup$
    – nico_so
    Commented Aug 13, 2021 at 12:40
  • $\begingroup$ 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. $\endgroup$
    – gunes
    Commented Aug 13, 2021 at 12:42
  • 1
    $\begingroup$ 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. $\endgroup$
    – nico_so
    Commented Aug 13, 2021 at 12:47
  • $\begingroup$ I think this should be tagged self study. There are many "right" conceptual answers. $\endgroup$
    – AdamO
    Commented Apr 22 at 17:08

2 Answers 2



$$P( \{X\leq a, a \leq Y\leq b\} \cup \{a \leq X \leq b, Y\leq a\} )$$

Is excluding the cases $X<Y<a$ and $X<Y<a$, 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$


For early probability theory questions like this, it's so so important to draw a picture. The below shows densities on the unit square. If you performed an imaginary projection, you see "Z" has a triangular density with mode at 0 and "W" triangular with mode at 1.

enter image description here

  • 2
    $\begingroup$ I, too, advocate drawing pictures: but they help most when they are clear and accurate. Could you therefore explain how the two patches of color represent the random variables $Z$ and $W$? Neither of them appears closely related to the minimum and maximum of $X$ and $Y.$ Consider instead diagramming typical distribution-determining events of the form $Z\le z$ or $W\le w.$ $\endgroup$
    – whuber
    Commented Apr 22 at 18:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.