# Computing $\displaystyle \sum_{k\ge2}k(1-p)^{k-2}$

Computing $\displaystyle \sum_{k\ge2}k(1-p)^{k-2}$, $p\in ]0,\space1[$

WolframAlpha says it is $\cfrac {p+1}{p^2}$ but I couldn't get that value but anyway here is what I did:

$$\displaystyle \sum_{k\ge2}k(1-p)^{k-2} = (1-p)^{-1}\sum_{k\ge2}k(1-p)^{k-1} = (1-p)^{-1} \left (-\sum_{k\ge1}(1-p)^{k} \right)'= (1-p)^{-1} \left (-\cfrac {1-p}{p}\right)' = (1-p)^{-1} \left (1-p^{-1}\right)'=(1-p)^{-1} p^{2} = \cfrac 1{p^2(1-p)}$$

Please tell me what I'm doing wrong or is WolframAlpha wrong on this one?

-
You have to derive wrt to $(1-p)$, not $p$! – Jack D'Aurizio Oct 28 '12 at 17:30
@JackD'Aurizio what? – user31280 Oct 28 '12 at 17:35
@Jack: No, you don’t; the problem is that F'Ola changed the summation from $\sum_{k\ge 2}$ to $\sum_{k\ge 1}$ when it should have remained $\sum_{k\ge 2}$. The method is fine. – Brian M. Scott Oct 28 '12 at 17:41
@BrianM.Scott But I thought one has to change it when applying derivation or integration? – user31280 Oct 28 '12 at 17:45
Whether you have to shift it or not depends on how you’ve written the general term inside the summations. When in doubt, write out the first two or three terms in each summation to make sure that they match up properly. I said a bit about this in my answer; see if it helps. – Brian M. Scott Oct 28 '12 at 17:48

You shifted the index when you should not have done so:

\begin{align*} \sum_{k\ge 2}k(1-p)^{k-1}&=-\left(\sum_{k\ge 2}(1-p)^k\right)'\\ &=-\left(\frac{(1-p)^2}p\right)'\\ &=\frac{(1-p)^2+2p(1-p)}{p^2}\\ &=\frac{1-p^2}{p^2}\\ &=\frac{(1-p)(1+p)}{p^2}\;. \end{align*}

You had $-\left(\sum_{k\ge 1}(1-p)^k\right)'$, but if you write out the first couple of terms, you’ll see that this gives you a term that isn’t present in the original summation: the $k=1$ term, after differentiation, is $-1\cdot(1-p)^0(-1)=1$, while $\sum_{k\ge 2}k(1-p)^{k-1}$ has no constant term.

If you keep the right range of indices, you get

$$(1-p)^{-1}\cdot\frac{(1-p)(1+p)}{p^2}=\frac{1+p}{p^2}\;,$$ just as Wolfram|Alpha does.

By the way, you could reduce the chance of making computational errors by letting $q=1-p$ and working with $q$; dealing with $\sum_{k\ge 2}kq^{k-1}$ is easier than dealing with $\sum_{k\ge 2}k(1-p)^{k-1}$, especially when you get to the differentiations.

-

$$f(x):=\sum_{n=0}^\infty x^n=\frac{1}{1-x}\,\,\,,\,\,|x|<1\Longrightarrow$$

$$\Longrightarrow f'(x)=\sum_{n=1}^\infty nx^{n-1}=\frac{1}{(1-x)^2}\Longrightarrow$$

$$\Longrightarrow \frac{1}{x(1-x)^2}-\frac{1}{x}=\sum_{n=2}^\infty nx^{n-2}$$

so substituting $\,x=1-p\,$ (why can we?), we get

$$\frac{1}{p^2(1-p)}-\frac{1}{1-p}=\sum_{n=2}^\infty n(1-p)^{n-2}$$

And since

$$\frac{1}{p^2(1-p)}-\frac{1}{1-p}=\frac{1+p}{p^2}$$

we're then done.

-