For random variables $X$ and $Y$ are independent and have the same geometric distribution. Find $P(X>Y)$. For random variables $X$ and $Y$ are independent and have the same geometric distribution with density $f(x)=q^xp$ with $q=1-p$ and $x=0,1,\dots, $. Find $P(X>Y)$.
My solution is as follows.
$$
P(X>Y)=\sum_y P(X>Y|Y=y)P(Y=y)=\sum_y P(X>y)P(Y=y)=\sum_y q^{2y}p=1-q^y
$$
Is there any error in my solution?
 A: Your approach is fine. However, note that your solution is incomplete because it is in terms of $y$, which is not given (it's a variable that you summed over). Also,
$$Pr (X > y) = \sum_{n = y + 1}^\infty p q^n = p q^{y + 1} \sum_{m = 0}^\infty q^m = \frac{p q^{y + 1}}{1 - q} = q^{y + 1}$$
so that
$$Pr (X > y) Pr(Y = y) = p q^{2 y + 1}$$
a bit different than what you got. Summing over the support gives
$$Pr (X > Y) = \sum_{y = 0}^\infty p q^{2 y + 1} = p q \sum_{n = 0}^\infty (q^2)^n = \frac{p q}{1 - q^2} = \frac{p q}{(1 + q) (1 - q)} = \boxed{\frac{q}{1 + q}}$$
Another way to approach the problem is to note that
$$Pr (X < Y) + Pr (X = Y) + Pr (X > Y) = 1$$
but since $X, Y$ are identically distributed, then $Pr (X < Y) = Pr (X > Y)$. The probability that $X$ and $Y$ are equal is
$$Pr (X = Y) = \sum_{n = 0}^\infty (p q^n)^2 = p^2 \sum_{n = 0}^\infty (q^2)^n = \frac{p^2}{1 - q^2} = \frac{p^2}{(1 + q) (1 - q)} = \frac{p}{1 + q}$$
Therefore,
$$Pr (X > Y) = \frac{1}{2} \left( 1 - \frac{p}{1 + q} \right) = \frac{q}{1 + q}$$
just the same.
