If X and Y are iid $Ge(\lambda)$ then a few questions on max{X,Y} Let $X $ and $Y$ be independent RVs with common geometric PMF :$$P \{X=k\} = \lambda {(1- \lambda)}^k , k=0,1,2,\ldots ; 0 < \lambda < 1$$ 
Now let, $M = \text{max{X,Y}}$. So I was trying to find the followings:
(a) The joint distribution of M and X.
(b) The marginal distribution of M.
(c) The conditional distribution of X, given M.
I only know the definitions in the problem and am finding to solve the problem to be extremely hard, so please provide an answer and help me learn nad understand the problem. Thanks in advance for help!
 A: For each nonnegative integer $k$, we have
$$
\{M=k\} = \{X=k\}\cup\{Y=k\}.
$$
We compute
\begin{align}
\mathbb P(M=k) &= \mathbb P\left(\{X=k\}\cup\{Y=k\}\right)\\
&= \sum_{j=0}^k \mathbb P(X=j)\mathbb P(Y=k) + \sum_{j=0}^{k-1} \mathbb P(X=k)\mathbb P(Y=j)\\
&= \sum_{j=0}^k \lambda^2(1-\lambda)^{j+k} + \sum_{j=0}^{k-1} \lambda^2(1-\lambda)^{j+k}\\
&= \lambda^2(1-\lambda)^k\left(1-(1-\lambda)^{k+1}\right) + \lambda^2(1-\lambda)^k\left(1-(1-\lambda)^k\right)\\
&= \lambda(1-\lambda)^k\left(2-(1-\lambda)^k(2-\lambda)\right).
\end{align}
To compute the joint distribution of $(M,X)$, first consider $0\leqslant j<k$:
$$
\mathbb P(M=k,X=j) = \mathbb P(Y=k,X=j) = \lambda^2(1-\lambda)^{j+k},
$$
and then $k$:
$$
\mathbb P(M=k,X=k) = \mathbb P(X=k,Y\leqslant k) = \lambda(1-\lambda)^k\left(1-(1-\lambda)^{k+1}\right).
$$
The conditional distribution of $X$ given $M$ can be computed by the definition of conditional probability:
$$
\mathbb P(X=j\mid M=k) = \frac{\mathbb P\left(\{X=j\}\cap\{M=k\}\right)}{\mathbb P(M=k)}.
$$
