To install click the Add extension button. That's it.

The source code for the WIKI 2 extension is being checked by specialists of the Mozilla Foundation, Google, and Apple. You could also do it yourself at any point in time. 4,5
Kelly Slayton
Congratulations on this excellent venture… what a great idea!
Alexander Grigorievskiy
I use WIKI 2 every day and almost forgot how the original Wikipedia looks like.
Live Statistics
English Articles
Improved in 24 Hours
Languages
Recent
Show all languages
What we do. Every page goes through several hundred of perfecting techniques; in live mode. Quite the same Wikipedia. Just better.
.
Leo
Newton
Brights
Milds # Beta negative binomial distribution

Parameters $\alpha >0$ shape (real)$\beta >0$ shape (real) $r>0$ — number of failures until the experiment is stopped (integer but can be extended to real) k ∈ { 0, 1, 2, 3, ... } ${\frac {\Gamma (r+k)}{k!\;\Gamma (r)}}{\frac {\mathrm {B} (\alpha +r,\beta +k)}{\mathrm {B} (\alpha ,\beta )}}$ ${\begin{cases}{\frac {r\beta }{\alpha -1}}&{\text{if}}\ \alpha >1\\\infty &{\text{otherwise}}\ \end{cases}}$ ${\begin{cases}{\frac {r(\alpha +r-1)\beta (\alpha +\beta -1)}{(\alpha -2){(\alpha -1)}^{2}}}&{\text{if}}\ \alpha >2\\\infty &{\text{otherwise}}\ \end{cases}}$ ${\begin{cases}{\frac {(\alpha +2r-1)(\alpha +2\beta -1)}{(\alpha -3){\sqrt {\frac {r(\alpha +r-1)\beta (\alpha +\beta -1)}{\alpha -2}}}}}&{\text{if}}\ \alpha >3\\\infty &{\text{otherwise}}\ \end{cases}}$ undefined ${\frac {\Gamma (\alpha +r)\Gamma (\alpha +\beta )}{\Gamma (\alpha +\beta +r)\Gamma (\alpha )}}{}_{2}F_{1}(r,\beta ;\alpha +\beta +r;e^{it})\!$ where $\Gamma$ is the gamma function and ${}_{2}F_{1}$ is the hypergeometric function.

In probability theory, a beta negative binomial distribution is the probability distribution of a discrete random variable X equal to the number of failures needed to get r successes in a sequence of independent Bernoulli trials where the probability p of success on each trial, while constant within any given experiment, is itself a random variable following a beta distribution, varying between different experiments. Thus the distribution is a compound probability distribution.

This distribution has also been called both the inverse Markov-Pólya distribution and the generalized Waring distribution. A shifted form of the distribution has been called the beta-Pascal distribution.

If parameters of the beta distribution are α and β, and if

$X\mid p\sim \mathrm {NB} (r,p),$ where

$p\sim {\textrm {B}}(\alpha ,\beta ),$ then the marginal distribution of X is a beta negative binomial distribution:

$X\sim \mathrm {BNB} (r,\alpha ,\beta ).$ In the above, NB(rp) is the negative binomial distribution and B(αβ) is the beta distribution.

## Definition

If $r$ is an integer, then the PMF can be written in terms of the beta function,:

$f(k|\alpha ,\beta ,r)={\binom {r+k-1}{k}}{\frac {\mathrm {B} (\alpha +r,\beta +k)}{\mathrm {B} (\alpha ,\beta )}}$ .

More generally the PMF can be written

$f(k|\alpha ,\beta ,r)={\frac {\Gamma (r+k)}{k!\;\Gamma (r)}}{\frac {\mathrm {B} (\alpha +r,\beta +k)}{\mathrm {B} (\alpha ,\beta )}}$ or

$f(k|\alpha ,\beta ,r)={\frac {\mathrm {B} (r+k,\alpha +\beta )}{\mathrm {B} (r,\alpha )}}{\frac {\Gamma (k+\beta )}{k!\;\Gamma (\beta )}}$ .

### PMF expressed with Gamma

Using the properties of the Beta function, the PMF with integer $r$ can be rewritten as:

$f(k|\alpha ,\beta ,r)={\binom {r+k-1}{k}}{\frac {\Gamma (\alpha +r)\Gamma (\beta +k)\Gamma (\alpha +\beta )}{\Gamma (\alpha +r+\beta +k)\Gamma (\alpha )\Gamma (\beta )}}$ .

More generally, the PMF can be written as

$f(k|\alpha ,\beta ,r)={\frac {\Gamma (r+k)}{k!\;\Gamma (r)}}{\frac {\Gamma (\alpha +r)\Gamma (\beta +k)\Gamma (\alpha +\beta )}{\Gamma (\alpha +r+\beta +k)\Gamma (\alpha )\Gamma (\beta )}}$ .

### PMF expressed with the rising Pochammer symbol

The PMF is often also presented in terms of the Pochammer symbol for integer $r$ $f(k|\alpha ,\beta ,r)={\frac {r^{(k)}\alpha ^{(r)}\beta ^{(k)}}{k!(\alpha +\beta )^{(r)}(r+\alpha +\beta )^{(k)}}}$ ## Properties

### Non-identifiable

The beta negative binomial is non-identifiable which can be seen easily by simply swapping $r$ and $\beta$ in the above density or characteristic function and noting that it is unchanged.

### Relation to other distributions

The beta negative binomial distribution contains the beta geometric distribution as a special case when $r=1$ . It can therefore approximate the geometric distribution arbitrarily well. It also approximates the negative binomial distribution arbitrary well for large $\alpha$ and $\beta$ . It can therefore approximate the Poisson distribution arbitrarily well for large $\alpha$ , $\beta$ and $r$ .

### Heavy tailed

By Stirling's approximation to the beta function, it can be easily shown that

$f(k|\alpha ,\beta ,r)\sim {\frac {\Gamma (\alpha +r)}{\Gamma (r)\mathrm {B} (\alpha ,\beta )}}{\frac {k^{r-1}}{(\beta +k)^{r+\alpha }}}$ which implies that the beta negative binomial distribution is heavy tailed and that moments less than or equal to $\alpha$ do not exist.