I was doing homework for my probability class and actually have the answer to one of the problems I'm working on. However, I don't quite understand a step of the solution. Could anyone help me out? The question is in the title, where $X$ is a binomial random variable with parameters $n$ and $p$, and the solution is as follows:
$E[\frac{1}{X+1}] = \sum\limits_{k=0}^{n} \frac{1}{k+1} {{n}\choose{k}} p^k (1-p)^{n-k}$
$= \sum\limits_{k=0}^{n} \frac{1}{k+1} \frac{n!}{k!(n-k)!} p^k (1-p)^{n-k}$
$= \sum\limits_{k=0}^{n} \frac{n!}{(k+1)!(n-k)!} p^k (1-p)^{n-k}$
$= \frac{1}{(n+1)p} \sum\limits_{k=0}^{n} \frac{(n+1)!}{(k+1)!(n-k)!} p^{k+1} (1-p)^{n-k}$
$= \frac{1}{(n+1)p} [\sum\limits_{j=0}^{n+1} \frac{(n+1)!}{(n-j+1)!j!} p^j (1-p)^{n-j+1} - (1-p)^{n+1}]$
$= \frac{1}{(n+1)p} [1 - (1-p)^{n+1}]$
In the second to the last step, I am having trouble figuring out where the "$- (1 - p)^{n+1}$" at the end of the summation comes from. Can anyone please explain this to me?
Thanks so much :)
When you do the change of indices $j=k+1$, to start at $j=0$ you need to add a term to the sum -- it starts at $j=1$ otherwise. The $-(1-p)^{n+1}$ is to cancel it: you add a term to the sum, and remove it outside.
$$ \sum_{j=1}^{n+1} \frac{(n+1)!}{(n-j+1)!j!} p^j (1-p)^{n-j+1} = \sum_{j=0}^{n+1} \frac{(n+1)!}{(n-j+1)!j!} p^j (1-p)^{n-j+1} - (1-p)^{n+1} $$