I am struggling with the following conditional probability problem.
Let $G \sim \mathrm{Geometric}(p)$, $U \sim \mathrm{Unif} \{1, \ldots ,n\}$, and $G$ & $U$ be independent. Determine the conditional probability $\mathrm{Pr}(G=U \mid G \le n)$.
Using the definition of conditional probability we obtain
$$\mathrm{Pr}(G=U \mid G \le n) = \frac{\mathrm{Pr}(G=U, G \le n)}{Pr(G \le n)}$$
The denominator is easy enough to compute,
$$\mathrm{Pr}(G \le n) = \sum_{i=1}^{n}p(1-p)^{i-1}$$
As for the numerator, I believe we have
$$\mathrm{Pr}(G=U, G \le n) = \sum_{i=1}^{n}\left(p(1-p)^{i-1} \cdot \frac{1}{n}\right) = \frac{1}{n} \sum_{i=1}^{n}p(1-p)^{i-1},$$
so that the final answer is $\frac{1}{n}$. Is this correct?