Bernoulli trials required for k successes What is the expected value of number of Bernoulli trials required for k successes? Assume probability of success in a single trial = $p$, probability of failure = $q = 1 - p$. 
I managed to derive the discrete probability mass function:
$P(X = n) = \binom{n - 1}{k -1} p^{k} (1 - p)^{n - k}$, for $n \geq k$. However, I could not sum the series $E(X) = \sum_{n = k}^{\infty} n\binom{n - 1}{k -1} p^{k} (1 - p)^{n - k}$. Can anybody please help?
 A: If you want to analytically calculate the sum, you can do as follows:
$$
\sum_{n = k}^{\infty} n\binom{n - 1}{k -1} p^{k} (1 - p)^{n - k}=(\frac{p}{1-p})^k\sum_{m = 0}^{\infty} (m+k)\binom{m+k - 1}{m} (1 - p)^{m+k}
$$
Now you can find the following identity in the literature:
$$
\sum_{m = 0}^{\infty} \binom{m+k - 1}{m} y^{m}=\frac{1}{(1-y)^k}
$$
Now by multiplication of $y^k$ and derivation wrt $y$, you get:
$$
\sum_{m = 0}^{\infty} (m+k)\binom{m+k - 1}{m} y^{m+k-1}=\left(\frac{y^k}{(1-y)^k}\right)^{'}=\left(\frac{ky^{k-1}}{(1-y)^{k+1}}\right)
$$
Now put $y=1-p$ in the first identity and you get:

$$
\mathbb{E}(X)=\frac{k}{p}
$$

A: This has a name, and it's the Negative Binomial Distribution $NB(r,p)$. (But with $p$ and $1-p$ switched, and an atypical definition). We have
$$P(X=n) = \binom{n-1}{k-1}p^k(1-p)^{n-k}$$
as you said. Now, we could compute this using some binomial identities, but that takes a while and seems to be unnecessary, because it's easy to see that if $X$ has the disribution of a negative binomial with $k$ successes wanted and probability $p$ for a success, is it also the sum of $k$ geometric random variables with mass function
$$P(X_i = k) = (1-p)^{k-1}p$$
which each have mean $\frac1p$. They are all independent, and there are $k$ of them, so our mean is $\frac kp$. 
A: Let $E_k$ denote the expected number of Bernoulli trials required for $k$ successes.
By definition, we have
\begin{align*}
E_1 &= \sum_{k \geq 1} k\ \mathrm{Pr}(\text{exactly } k \text{ trials for } 1 \text{ success}) \\
&= \sum_{k \geq 1} kq^{k-1}p \\
&= p(1-q)^{-2} & \text{provided } 0\leq q<1\\
&= p^{-1}
\end{align*}
using the Taylor series $(x-1)^{-2}=\sum_{k \geq 1} kx^{k-1}$.
(One could alternatively argue that $E_1=q(E_1+1)+p,$ which also yields $E_1=1/p$.)
By linearity of expectation, it follows that $$E_k=k\ E_1=k/p.$$
