Conditional distribution from order statistics I have the following data generating process:

*

*I have two Uniform RVs $X$ and $Y$

*I sample $n$ times from $X$ and $m$ times from $Y$, and then pick the max. Call this $Z$.

*I'm trying to find the conditional distribution of $Z$ for each class $X$ and $Y$ separately. That is, the distribution of $Z$, given $Z$ came from $X$, and from $Y$.

$$X\sim \textit{Unif}[0,1]$$ $$Y\sim \textit{Unif}[0,b], \space  b>1$$
$$Z \sim Max\{X_1,X_2...X_n,Y_1,Y_2...Y_m\}$$
This is what I have so far.

*

*I have the overall distribution of $Z$.

$Z$ can be written as $Z\sim Max(Max(X), Max(Y))$. Then,
\begin{align}
F_Z(z) &= Pr(Z \leq z) &\\ 
&=Pr(Max(X) \leq z)P(Max(Y) \leq z) \\
&=F_{Max(X)}(z)F_{Max(Y)}(z) 
\end{align}
$F_{Max(X)}(x) = x^{n}$ and $F_{Max(Y)}(y) = (y/b)^{m}$
This gives
$$F_Z(z) = \begin{cases} 
      (z/b)^m & z \geq 1 \\
      (z/b)^m z^n  & otherwise
   \end{cases}
$$
Note that $z$ is bounded by $[0,b]$. I checked this with simulation, and I got the same plots.



*I also have $Pr(Max(X)>Max(Y))$, i.e probability that X is picked.
\begin{align}
Pr(Max(X)>Max(Y)) &= Pr(Max(Y)=x)Pr(Max(X)>x) \\
&= \int{f_{Max(X)}(1-F_{Max(Y)})dx} \\
&= \frac{b^{-m}n}{n+m}
\end{align}
I also checked this with simulation, and it looks right.
With this information, I'm trying to find the conditional distribution of Z given that it's from class $X$ and class$Y$ separately.
Here are the empirical pdfs of Z, where the different colors are $X$ and $Y$. This is what I'm trying to find analytically.

Thanks in advance for the help!

Turns out, I was overcomplicating this. All I had to figure out was
$$f(Max(X)|Max(X)>Max(Y)$$ and
$$f(Max(Y)|Max(Y)>Max(X)$$
$$f_{X\mid X>Y}(x)=\frac{f_X(x)F_Y(x)}{P(X>Y)}$$
see Conditional expectation of X given X is greater than Y
