# Thread: Expectation a RV with negative binomial distribution

1. ## Expectation a RV with negative binomial distribution

Hi,
In a derivation for the expectation of an RV with a geometric distribution I have the following:

$E(X) = \sum^{\infty}_{k=r} k \binom{k-1}{r-1}p^{r} (1-p)^{k-r} = \frac{r}{p} \sum^{\infty}_{k=r} \binom{k}{r} p^{r+1} (1-p)^{k-r} = \frac{r}{p}$

I have several questions.

1. What sorcery took place with the binomial coefficient and k, such that k disappeared, r appeared as a factor and its now $\binom{k}{r}$ rather than $\binom{k-1}{r-1}$ ?

2. Presumably the logic is that $\sum^{\infty}_{k=r} \binom{k}{r} p^{r+1} (1-p)^{k-r} = 1$. Can anyone show me how to prove this and what class of distribution is this, not binomial right?

2. ## Re: Expectation a RV with negative binomial distribution

$k\binom{k-1}{r-1}p^r$

$=\frac{r}{p}\frac{k}{r}\binom{k-1}{r-1}p^{r+1}$

$=\frac{r}{p}\frac{k}{r}\frac{(k-1)!}{(k-r)!(r-1)!}p^{r+1}$

$=\frac{r}{p}\frac{k!}{(k-r)!r!}p^{r+1}$

$=\frac{r}{p}\binom{k}{r}p^{r+1}$

I haven't answered your second question but if you're trying to find E(X) for a geometric distribution I think there is an easier way.

$\displaystyle E(X)=\sum_{i=1}^\infty i p q ^{i-1}$

$\displaystyle =p\sum_{i=1}^\infty \frac{d}{dq}q^i$

$\displaystyle =p \frac{d}{dq} \sum_{i=1}^\infty q^i$

etc.