[Math] Deriving Mean for Negative Binomial Distribution.

probabilityprobability distributions

A negative binomial distribution is given by
$$P(X=x) = \binom{x-1}{k-1}p^{k}(1-p)^{(x-k)},$$
where $p$ is probability of a success and $x \in \{k , k+1 , k+2 , \ldots\}$.

Its mean is given by
$$
E(X) = \sum_{x=k}^{\infty} \binom{x-1}{k-1}p^{k}(1-p)^{(x-k)} \cdot x
$$

So what I tried
$$
\sum_{x=k}^{\infty} \binom{x-1}{k-1}p^{k}(1-p)^{(x-k)}\cdot x
= \sum_{x=k}^{\infty} \binom{x}{k}p^{k}(1-p)^{(x-k)} \cdot k,
$$

as $\binom{x-1}{k-1} \cdot x$ = $\binom{x}{k} \cdot k$

Now,
$$
\sum_{x=k}^{\infty} \binom{x}{k}p^{k}(1-p)^{(x-k)} \cdot k
= k \sum_{x=k}^{\infty} \binom{x}{k}\frac{p^{k+1}}{p}(1-p)^{(x-k)}
= \frac{k}{p} \sum_{x=k}^{\infty} \binom{x}{k}p^{k+1}(1-p)^{(x-k)}.
$$

So,
$$
\sum_{x=k}^{\infty} \binom{x}{k}p^{k+1}(1-p)^{(x-k)}=1
$$

(Sum of all probabilities).
This implies
$$
\frac{k}{p}\sum_{x=k}^{\infty} \binom{x}{k}p^{k+1}(1-p)^{(x-k)}
\frac{k}{p}.
$$

Thus, Mean = $\frac{k}{p}$
But this isn't the correct answer, could anyone tell what am I doing wrong ?

Best Answer

You didn't ask for it, but I cannot withold myself from offering you an alternative route to find $\mathbb EX$. One that happily confirms that you are correct.

Write: $$X=G_1+G_2+\cdots+G_k$$

If e.g. $k=3$ then sequence is $FFSFFFFSS$ results in $G_1=3$, $G_2=5$ and $G_3=1$.

Here $G_1$ corresponds with the number of trials needed to come to the first success, $G_2$ after that likewise for the second success, et cetera.

The $G_i$ are iid and geometrically distributed with parameter $p$.

Then: $$\mathbb EX=\mathbb EG_1+\cdots\mathbb EG_k=k\mathbb EG_1=\frac{k}{p}$$


edit:

Even calculation of $\mathbb EG_1$ can be avoided.

If $S$ denotes the event that the first trial is a success then:

$\mathbb{E}X=\mathbb{E}\left(X\mid S\right)p+\mathbb{E}\left(X\mid S^{c}\right)q$.

Here $\mathbb{E}\left(X\mid S\right)=1+\frac{k-1}{k}\mathbb{E}X$ and $\mathbb{E}\left(X\mid S^{c}\right)=1+\mathbb{E}X$.

To understand the expression for $\mathbb E(X|S)$ realize that a success in the first trial gives $X$ the form $1+G_2+\cdots+G_k$.

This gives you the equality:

$$\mathbb{E}X=\left[1+\frac{k-1}{k}\mathbb{E}X\right]p+\left[1+\mathbb{E}X\right]q$$

Easy to solve and resulting in $\mathbb{E}X=\frac{k}{p}$.