The question I'm trying to solve is the following.
Independent trials, each resulting in success with probability p, are performed until $k$ consecutive successful trials have occurred. Let $X$ be the total number of successes in these trials, and let $P_n = P(X = n)$. Find $P_k$.
The way I understand the question is that I need to find the probability that, if we perform $m$ trials, there will be $k$ successes, and they will be consecutive.
So I did the following:
$$ P_k = \sum_{i=0}^{\infty}P(X=k|F=i)P(F=i) $$ F is the number of failures at the beginning. $$ P_k = \sum_{i=0}^{\infty}P(X=k)P(F=i) $$ $$ P_k = \sum_{i=0}^{\infty}p^k(1-p)^i $$ $$ P_k = p^k\sum_{i=0}^{\infty}(1-p)^i $$ $$ P_k = \frac{p^k}{1-p} $$
However, the answer is $p^{k-1}$ and I'm struggling to understand why.