Calculating the expectation of $X=$ the number of failures until the $r^{th}$ success I need to calculate the expectation of $X=$ the number of failures until the $r$-th success in an infinite series of Bernoulli experiments with $p$ the probability of success. ($q=1-p$ the probability of failure)
My solution:
I figured $$P(X=x)={x+r \choose x}q^xp^r$$ (is this correct?) and $x\geq 0$ (In other words, $X\sim Bin(x+r,q)$.
So by definition, $\Bbb EX=\sum_{x=0}^\infty x{x+r \choose x}q^xp^r$.
Trying to simplify this, I got to
\begin{align*}
\frac{qp^r}{r!}\sum_{x=0}^\infty (x+r)(x+r-1) \ldots (x+1)xq^{x-1} & =\frac{qp^r}{r!}\left(\sum_{x=0}^\infty q^{x+r}\right)^{(r+1)}\\ & =\frac{qp^r}{r!}\left(q^r\sum_{x=0}^\infty q^{x}\right)^{(r+1)}\\ & =\frac{qp^r}{r!}(\frac{q^r}{1-q})^{(r+1)}
\end{align*}
$(r+1)$ denotes taking the $(r+1)^{th}$ derivative in respect to $q$.
Now what? How can I simplify that further? Is there a simpler way?
 A: The random variable $X$ you are studying has the negative binomial distribution with parameters $r$ and $1-p$ (there are several notations, see the link). There are also several ways to calculate its expected value, which should be equal to $$E[X]=\frac{r(1-p)}{p}=r\left(\frac1p-1\right)$$
One way to obtain this, is to see that you sum up $r$-times the geometric distribution (failures to the first success). Another proof, close to your approach is given here. Be careful to interpret the parameters correctly because you refer to failures and they refer to successes.
A: Let $N(r)$ be the expected number of trials until the $r^{th}$ success, and $p$ the probability of success. Make one trial. This gives:$$N(r)=1+(1-p)N(r)+pN(r-1)$$Where the $1$ is for the trial and the other terms represent failure and success.
It is trivial that $N(0)=0$ and rearranging the formula gives $N(r)=N(r-1)+\frac 1p$ whence $N(r)=\frac rp$. Now let $F(r)$ be the number of failures with $$F(r)=N(r)-r=\frac rp-r=\frac {r(1-p)}p$$
