When working with the binomial distribution, it's sometimes useful to compute the probability of "at least one", which is 1 - P(none) or, after setting x to 0 in the formula for the PDF of the binomial distribution:

$$ P(x|n) = \frac{n!}{x!(n-x)!}(p)^x(1-p)^{n-x} $$

$$ P(0|n) = \frac{n!}{0!(n-0)!}(p)^0(1-p)^{n-0} $$

$$ P(none) = (1 - p)^n $$

$$ P(at least one) = 1 - (1 - p)^n $$

The similar formula for the beta-binomial is:

$$ P(x|n) = \frac{n!}{x!(n-x)!}\frac{B(x+\frac{\pi}{\theta},n+\frac{1-\pi}{\theta}-x)}{B(\frac{\pi}{\theta},\frac{1-\pi}{\theta})} $$

So a similar process for the formula for a beta-binomial "at least one" should be:

$$ P(0|n) = \frac{n!}{0!(n-0)!}\frac{B(0+\frac{\pi}{\theta},n+\frac{1-\pi}{\theta}-0)}{B(\frac{\pi}{\theta},\frac{1-\pi}{\theta})} $$

$$ P(none) = \frac{B(\frac{\pi}{\theta},n+\frac{1-\pi}{\theta})}{B(\frac{\pi}{\theta},\frac{1-\pi}{\theta})} $$

$$ P(at least one) = 1-\frac{B(\frac{\pi}{\theta},n+\frac{1-\pi}{\theta})}{B(\frac{\pi}{\theta},\frac{1-\pi}{\theta})} $$

But when I try to apply this to my data, I'm not getting the expected results. Given some amount of overdispersion, I would expect, as n increases from 1 to 5, for example, for the beta-binomial with $\pi=0.519215045$ and $\theta=0.015210626$ to approach 1 more slowly than the standard binomial, but instead it approaches 1 more quickly (Binomial: n=1: .519; n=2: 0.769; n=3: 0.889; n=4: 0.947; n=5: 0.974 -- Beta-binomial: n=1: 0.519; n=2: 0.882; n=3: 0.971; n=4: 0.993; n=5: 0.998).

Is my reasoning sound in deriving this formula, or have I done something wrong? Can someone point me to a proper worked-out example that compares the binomial and beta-binomial in this way?


1 Answer 1


I cannot reproduce your calculations for the beta-binomial distribution.

pi <- 0.519215045
theta <- 0.015210626
1-pbinom(0,1:5,prob = pi)

1-beta(pi/theta,1:5+(1-pi)/theta)/(beta(pi/theta,(1-pi)/theta))     # your formula
1-pbetabinom.ab(0, size=1:5, shape1=pi/theta, shape2=(1-pi)/theta)  # according to the VGAM package

The latter both produce

[1] 0.5192150 0.7651057 0.8834657 0.9413315 0.9700460

This seems more in line with your intuition.

  • $\begingroup$ For my original calculations of the beta-binomial I used Excel gamma functions. I'm not sure what I did wrong, but it isn't worth the time to spend on it because you have clearly demonstrated the right way (or at least a right way) to do what I was trying to do. Thank you! $\endgroup$
    – Jim Lewis
    Mar 6, 2017 at 18:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.