# How do I compute $P(X=Y)$? for independent random variables with with geometric distribution.

let $X$ and $Y$ be independent random variables with geometric distribution and parameter $p\in(0,1)$

How do I compute $P(X=Y)$?

Any help would be greatly appreciated.

• Hint: $[X=Y]=\bigcup\limits_{k=0}^\infty [X=k,Y=k]$ – Stefan Hansen Apr 15 '15 at 9:51

Using Stefan Hansen's hint, decompose the event $[X = Y]$ into a union of disjoint events $[X=k, Y=k]$. Now use the property of the probability measure: $$\Pr(X=Y) = \Pr\left(\bigcup\limits_{k=0}^\infty [X=k,Y=k]\right) = \sum_{k=0}^\infty \Pr\left(X=k, Y=k\right)$$ Now use independence of $X$ and $Y$, recall $\Pr(X=k)$, and evaluate the sum.