Let $X,Y$ be independent geometric random variables, where $X$ has parameter $p$ and $Y$ has parameter $Q$. What is $E[\max(X,Y)]$, and what is $E[X\mid X\leq Y]$?
If we follow the definition of expectations, $E[\max(X,Y)]$ would be $$\sum_{k=1}^\infty k\cdot Pr(\max(X,Y)=k)=\sum_{k=1}^\infty k\cdot [Pr(X=k)Pr(Y\leq k)+Pr(X\leq k)Pr(Y=k)-Pr(X=k)Pr(Y=k)]$$ which is quite messy to compute. Is there an easier way?
(Similar question for computing $E[X\mid X\leq Y]$.)






Hint: Let $Z = \max(X,Y)$. Then $$P[Z \leq z] = P[\max(X,Y) \leq z] = P[X \leq z,Y\leq z]$$ This is because $\max(a,b) \leq z \iff a \leq z, b\leq z$
As for $E[X|X \leq Y]$,consider first $E[X|X \leq y]$. You have to compute the conditional pmf and work with that. Let me know if you have difficulties with this in comments. If so, I will update my answer.