Click or press any key to close help Help screen describing the interactive elements

The beta-binomial(n, α, β) distribution is a discrete distribution generated by choosing the probability p for a binomial(n, p) distribution from a beta(α, β) distribution. The number of successes is a beta-binomial(n, α, β) random variable.

The function B(a, b) in the pdf and cdf denotes the beta function, while the function ⌊x⌋ in the cdf denotes the "floor" or greatest integer function.

Parameter Range Description
n n = 1, 2, ... Number of trials
α α > 0 Shape parameter
β β > 0 Shape parameter

Probability Mass Function

P ( X = x ; n , α , β ) = ( n x ) B ( x + α , n x + β ) B ( α , β )
F ( x ; n , α , β ) = i = 0 x ( n i ) B ( i + α , n i + β ) B ( α , β )

Support

x = 0 , , n

Mean

Variance

Example n α β
The probability each year that an apple contains a worm is a beta(0.5, 8) random variable. 100 apples are picked one year. Let X be the number containing worms. 100 0.5000 8.000
The probability that a random student can answer an exam question correctly has a beta(3, 2) distribution. Let X be the number of correct answers on a 20 question exam. 20 3.000 2.000
The probability that an archer in the Night's Watch can hit a white walker has a beta(10, 3) distribution. A randomly chosen archer fires 36 arrows. Let X be the number of white walkers hit. 36 10.00 3.000

X ∼ Beta-Binomial(n, α, β)

n = α = β =
Chart of the beta-binomial distribution Chart area for displaying the beta-binomial pdf, cdf, and simulation

E(X) = , Var(X) =

Note that the variance is the product of two terms:

  • nαβ/(α + β)² is the variance for a binomial distribution with the same expected value as the beta-binomial distribution.
  • (α + β + n)/(α + β + 1) is a multiplier greater than 1 for n > 1.

So, a beta-binomial distribution with n > 1 always has greater variance than a binomial distribution with the same expected value and number of trials.

Note that the variance is the product of two terms:

  • nαβ/(α + β)² is the variance for a binomial distribution with the same expected value as the beta-binomial distribution.
  • (α + β + n)/(α + β + 1) is a multiplier greater than 1 for n > 1.

So, a beta-binomial distribution with n > 1 always has greater variance than a binomial distribution with the same expected value and number of trials.

The illustration above shows a set of n independent Bernoulli(p) trials, where p is chosen at random from a beta(α, β) distribution. The number of successes has a beta-binomial(n, α, β) distribution. This is similar to a binomial distribution, with the difference being that p is randomly chosen from a beta distribution instead of being fixed.

The simulation above shows a set of n independent Bernoulli(p) trials, where p is chosen at random from a beta(α, β) distribution. Successful trials are shown in green and failures in grey. The number of successes has a beta-binomial(n, α, β) distribution. The histogram accumulates the results of each simulation.

Y = Beta-Binomial(1, α, β) ∼ Bernoulli(α/(α + β)) limα+β→∞ X ∼ Binomial(n, α/(α + β)) Beta-Binomial(n, 1, 1) ∼ Discrete Uniform(0, n)

Chart of the related distribution Chart area for displaying the related pdf, cdf, and simulation

E(Y) = , Var(Y) =