Suppose we flip a random number $N$ of fair coins, and the total number of heads is $H$. If $P(N=n)=2^{-n}$ for $n=1,2,\dots$, what is $P(N=n\mid H=1)$?
My attempt: $$P(N=n\mid H=1)=\frac{P(H=1\mid N=n)P(N=n)} {P(H=1)}$$ by conditional probability. Now $P(H=1\mid N=n)=\dbinom{n} {1}\cdot\dfrac{1}{2^n}$, but I don't know how to compute ${P(H=1)}$?
\begin{align}P(H=1)&=\sum_{n=1}^{\infty}P(H=1\mid N=n)P(N=n)\end{align}