# Determine density of $\min(X,Y)$ and $\max(X,Y)$ for independently uniform distributed variables

Two independent random variables, $X$ and $Y$, are uniformly distributed on the unit interval $(-1,1)$.

Determine the density for $U=\min(X,Y)$ and for $W=\max(X,Y)$

• This looks like a standard problem set for students. Is this homework, or otherwise related to coursework or a question from a text or test? Do you know the general approach for dealing with such questions? What region do you need to integrate? – Glen_b Feb 20 '13 at 4:11
• This is for a review question for an upcoming exam. The hint that was given is to use (X'=(x+1)/2 , Y'=(y+1)/2) since these variables follow uniform(0,1). – Michael Feb 20 '13 at 4:24
• I have added the homework tag (it's self study of a standard problem for coursework and falls under the scope of the tag). The tag also means that 'helpful hints' is what you should expect to get here. – Glen_b Feb 20 '13 at 4:27
• If you come back with more information about what you have tried, I may expand on my hints, or respond to your attempts. – Glen_b Feb 20 '13 at 7:18
• Thanks for your help. I think I solved it via your second suggestion. Ultimately I got F(w)= [(w+1)/2]^2 and F(u)=1-[1-(u+1)/2]^2 as the cdf's. – Michael Feb 20 '13 at 7:45

You will need to either

1) look at the bivariate distribution of $X$ and $Y$ in order to figure out what region of the pdf for $(X,Y)$ corresponds to $U$ and $W$, or

2) alternatively, make an algebraic argument in terms of the cdf - e.g.
$P(W\leq w)=P(X\leq w , Y\leq w)$ ...

That hint you mentioned doesn't help you any if you don't know what you're supposed to do with the standard uniforms.

I think the hint given for this problem is not very helpful. Even if the joint distribution of the minimum and maximum of two independent $U(0,1)$ random variables has been solved as an example in class or in the textbook, teaching a student to rely on plugging-and-chugging from formulas instead of thinking about the problem is very bad pedagogical practice, and even more so in this particular case because the general result is not too difficult to derive.

If $Z = \min(X,Y)$ and $W = \max(X,Y)$, then for $w > z$, \begin{align*} F_{Z,W}(z,w) &= P\{Z \leq z, W \leq w\}\\ &= P\left[\{X \leq z, Y \leq w\} \cup \{X \leq w, Y \leq z\}\right]\\ &= P\{X \leq z, Y \leq w\} + P\{X \leq w, Y \leq z\} - P\{X \leq z, Y \leq z\}\\ &= F_{X,Y}(z, w) + F_{X, Y}(w,z) - F_{X,Y}(z,z) \end{align*} while for $w < z$, \begin{align*} F_{Z,W}(z,w) &= P\{Z \leq z, W \leq w\} = P\{Z \leq w, W \leq w\}\\ &= P\{X \leq w, Y \leq w\}\\ &= F_{X,Y}(w,w). \end{align*} Consequently, if $X$ and $Y$ are jointly continuous random variables, then $$f_{Z,W}(z,w) = \frac{\partial^2}{\partial z \partial w}F_{Z,W}(z,w) = \begin{cases} f_{X,Y}(z,w) + f_{X,Y}(w,z), & \text{if}~w > z,\\ \\ 0, & \text{if}~w < z. \end{cases}$$ One can even think of this end result geometrically. Consider the joint density $f_{X,Y}(x,y)$ as a solid (of volume $1$) sitting on the $x$-$y$ plane. Slice it with a vertical cut along the line $x=y$ and flip over the part below the line $x=y$ so that it sits on top of the part above the line $x=y$. The resulting solid is the joint density of the minimum and the maximum.

For example, if the solid is a rectangular parallelepiped whose base is the square with vertices $(1,1), (-1,1), (-1,-1), (1,-1)$, the slicing and flipping over gives a right triangular prism of twice the height as the parallelepiped whose base has vertices $(1,1), (-1,1), (-1,-1)$.

If only the marginal densities are desired and not the joint density, the solution is even easier for the case of iid $U(-1,1)$ random variables. For $-1 \leq z \leq 1$, \begin{align} 1-F_Z(z) = P\{Z > z\} &= P\{\min(X,Y) >z\}\\ &= P\{X >z, Y > z\} = P\{X>z\}P\{Y>z\} = \left(\frac{1}{2}(1-z)\right)^2 \end{align} giving, upon taking the derivative with respect to $z$ that $$f_Z(z) = \begin{cases}\frac{1-z}{2}, &-1 \leq z \leq 1,\\0, &\text{otherwise.} \end{cases}$$ Similarly, for $-1 \leq z \leq 1$, \begin{align} F_W(z) = P\{W \leq w\} &= P\{\max(X,Y) \leq w\}\\ &= P\{X \leq w, Y \leq w\} = P\{X\leq w\}P\{Y\leq w\} = \left(\frac{1}{2}(w-(-1))\right)^2 \end{align} giving, upon taking the derivative with respect to $w$ that $$f_W(w) = \begin{cases}\frac{1+w}{2}, &-1 \leq w \leq 1,\\0, &\text{otherwise.} \end{cases}$$

• Although we have had this conversation before, and I appreciate your focus on the didactic and pedagogical elements, I still can't help wondering whether this answer is unnecessarily labored. The crux is a one-liner: independence of $X$ and $Y$ asserts that $\Pr(\max(X,Y)\le t)$ = $\Pr(X\le t)\Pr(Y\le t)$ = $((t+1)/2)^2$ and differentiation wrt $t$ yields $(t+1)/2$ for the PDF of the max; the PDF of the min is obtained from $\max(X,Y)=-\min(-X,-Y)$. The simplicity of this approach makes it more likely its answer is correct--even though it differs from yours (which integrates to $2$). – whuber Feb 20 '13 at 18:12
• @whuber I got the same result $((t+1)/2)^2$ for the CDF of $\max(X,Y)$ as you did, essentially via a one-liner and by the same argument that you used, but then I messed up in the differentiation of the CDFs, in that I forgot the factor of $\frac{1}{2}$ which occurs in the application of the chain rule when one differentiates $(1+t)/2$ w.r.t $t$; writing the derivative as $1$ instead of $\frac{1}{2}$. Thanks for pointing out the mistake. I have corrected my answer. My point really was that mapping the RVs to $U(0,1)$ as suggested, using a plug-and-chug formula, and then mapping back is overkill – Dilip Sarwate Feb 20 '13 at 19:16
• Could you explain why $F_{X,Y}(w,w)=0$? – mokebe Apr 9 '17 at 20:16
• @mokebe I never said anywhere that $F_{X,Y}(w,w)$ equals $0$. I did say that its double partial derivative wrt $w$ and $z$ equals $0$. – Dilip Sarwate Apr 9 '17 at 20:44
• @mokebe For $w < z$, $F_{Z,W}(z,w)$ equals $F_{X,Y}((w,w)$ and thus does not depend on $z$ at all.Hence, $$\frac{\partial}{\partial z}F_{Z,W}(z,w) = \frac{\partial}{\partial z}F_{X,Y}(w,w) = 0$$ and so $$\frac{\partial^2}{\partial z \partial w}F_{Z,W}(z,w) = 0,$$ all for the case $w < z$ – Dilip Sarwate Apr 10 '17 at 3:15