Let $X’_is$ be independent random variables with some common distribution function $F$, and suppose they are independent of$N$, a geometric random variable with parameter $p$. If $M = max(X_1,X_2,\dots,X_n)$, obtain the distribution function of $M$ while conditioning on $N$.
My approach :
Since $M$ is independent of $N$, I just divided the distribution function of $M$ by $P(X=n)$
So I get, $$F_{M|N}(m|n) = \frac{[F_X(a)]^n}{(1-p)^{n-1}p} $$
I am not sure if this is the right method and answer, can someone clarify and provide the correct method if this is wrong.