Let $U \sim \text{Uniform}(0,1)$, and let $(U_1, U_2, \dots, U_Y)$ denote an iid sample of size $Y$, where the number of drawings $Y$ is itself a random variable with pmf:
$$P(Y=y)=\frac{1}{(e-1)y!} \quad \text{ for } y = 1, 2 \dots$$
Here, $Y$ is also independent of $U$.
My interest is to find the expected value and variance of $M$, where $M = \text{max}(U_i)$
Here is what I have so far:
I started with defining the cdf of M as follows.
$Pr(U1<=M)=\int_0^M{U1dU1}=\frac{M^2}{2}$
Since the cdf is the same for all iid $Ui's$,
$Pr(M<=m)=(\frac{m^2}{2})^y$
Is this correct? If so, how do I proceed from here? Can I treat y as a constant and find the pdf of M by integrating the cdf?
Also, I computed for $E[Y]=\sum_{y=1}^\infty {\frac{y}{(e-1)y!}}=\frac{1}{(e-1)}+1$ but I'm not yet sure how/if this can help.