Uniform Distribution question 
Two independent random variables X and Y are uniformly
  distributed in the interval $[0, 1]$. For a $z \in[0, 1]$, we are told
  that probability that $\max(X, Y )\leq z$ is equal to the probability
  that $\min(X, Y ) \leq (1 − z)$. What is the value of z?

My method of solving:
Suppose $X>Y$ 
$$\max(X,Y)=X\leq z$$
$$\int_0^z \frac 1 {1-0} \, dx=z \Rightarrow P(\max(X,Y)=X\leq z)=z$$
Similarly, $P( \min(X,Y)=Y\leq (1-z))=(1-z)$
So, $z=1-z \Rightarrow z=\frac 1 2$
But, the correct answer is $\dfrac 1{\sqrt{2}}$!
Can someone tell me where I'm going wrong, any help will be highly appreciated.
 A: $$
\Pr(\max\{X,Y\}\le z) = \Pr(X\le z\ \&\ Y\le z) = \Pr(X\le z)\cdot\Pr(Y\le z) = z^2.
$$
\begin{align}
\Pr(\min\{X,Y\le 1-z) = 1-\Pr(\min\{X,Y\} >1-z) & = 1 - \Pr(X>1-z\ \&\ Y>1-z) \\[10pt]
& = 1-z^2.
\end{align}
So you're looking for a value of $z$ for which $z^2 = 1-z^2.$
A: If you are given that $$\Pr[\max(X,Y) \le z] = \Pr[\min(X,Y) \le 1-z]$$ then, because both sides are symmetric in $X$ and $Y$, they are independent of $X>Y$, so you are perfectly within your rights to assume $X>Y$ and pass to conditional probabilities:
$$\Pr[\max(X,Y) \le z \mid X>Y] = \Pr[\min(X,Y) \le 1-z \mid X>Y]$$
And it's also okay to replace $\max(X,Y)$ by $X$ and $\min(X,Y)$ by $Y$, when we are conditioning on $X>Y$, to get
$$\Pr[X \le z \mid X>Y] = \Pr[Y \le 1-z \mid X>Y].$$
But at this step, you want to switch to
$$\color{red}{\Pr[X \le z] = \Pr[Y \le 1-z]}$$
and this you are not allowed to do: $X\le z$ is definitely not independent of $X>Y$, since $X>Y$ is information telling you that $X$ is more likely to be large. Similarly, $Y \le 1-z$ is not independent of $X>Y$.
My advice is to avoid assuming anything about $X>Y$ or $X<Y$. Instead, replace:


*

*"$\max(X,Y) \le z$" by "$X\le z$ and $Y\le z$", 

*"$\min(X,Y) \le 1-z$" by "$X \le 1-z$ or $Y \le 1-z$".

