# Geometric Distribution versus Negative Binomial Distribution

The pdf of the geomtric distribution is the following: $f(x) = (1-p)^{x}p$. Also $E[X] = \frac{1-p}{p}$ and $\text{Var}[X] = \frac{1-p}{p^2}$. The pdf of the negative binomial distribution is: $f(x) = \binom{r+x-1}{x}p^{r}(1-p)^{x}$. Also $E[X] = \frac{r(1-p)}{p}$ and $\text{Var}[X] = \frac{r(1-p)}{p^2}$. So is the geomtric distribution really a special case of the negative binomial? In each case, $X$ is the number of failures until a success occurs?

Also, does the geometric distribution have a different version as well? The $\binom{r+x-1}{x}$ seems analogous to $\binom{n+k-1}{k}$.

-
Well, you set r = 1 and... –  Qiaochu Yuan Oct 21 '10 at 17:57

## 1 Answer

The geometric distribution describes the probability of "x trials are made before a success", and the negative binomial distribution describes that of "x trials are made before $r$ successes are obtained", where $r$ is fixed. So you see that the latter is a particular case of the former, namely, when $r=1$. As to your last question, it doesn't matter whether you call the variable $x$ or $k$, as long as you keep in mind that it takes on the values $0,1,2...$.

-