# conditional joint density for uniform random variables

Let U1, U2 be independent random variables both uniformly distributed on [0, 1], and set M = max(U1, U2) and N = min(U1, U2).

Find the conditional joint density of (U1, U2) given M ≤ 1/2

I know that the joint density of (U1, U2) is 1 since it's a square. But given the condition M, visually it's like restricting the U's to a square 1/4 the size. So conditional joint density of (U1, U2) when M = 1/2 should be 4. But I'm not sure how to account for M less than or equal to 4.

Observe that $M \le 1/2$ is the same as saying $U_1 \le 1/2$ and $U_2 \le 1/2$. Now, by independence of $U_1$ and $U_2$, we have the following: $$P(U_1 \le u_1, U_2 \le u_2 \mid M \le 1/2) = P(U_1 \le u_1, U_2 \le u_2, \mid U_1 \le 1/2, U_2 \le 1/2) \\ = P(U_1 \le u_1 \mid U_1 \le 1/2) P(U_2 \le u_2 \mid U_2 \le 1/2).$$ Now, for $U \sim \text{Unif}[0,1]$, for $u \le u'$, $$P(U \le u \mid U \le u') = P(U \le u)/P(U \le u') = u / u'.$$ This is because $U \le u$ implies $U \le u'$. Hence, in summary, $$P(U_1 \le u_1, U_2 \le u_2 \mid M \le 1/2) = (u_1/\tfrac12) \cdot (u_2/\tfrac12) = 4 u_1 u_2.$$ This is, of course, only valid for $u_1,u_2 \in [0,\tfrac12]$.