# BetaBinomialDistribution

BetaBinomialDistribution[α,β,n]

represents a beta binomial mixture distribution with beta distribution parameters and , and binomial trials.

# Details • BetaBinomialDistribution is also known as a Pólya distribution and as a negative hypergeometric distribution.
• The beta binomial distribution is a binomial distribution with n trials whose probability parameter follows a beta distribution with shape parameters α and β. »
• BetaBinomialDistribution allows α and β to be any positive real numbers, and n to be any positive integer.
• BetaBinomialDistribution can be used with such functions as Mean, CDF, and RandomVariate. »

# Background & Context

• BetaBinomialDistribution[α,β,n] represents a discrete statistical distribution defined at integer values , where the parameters α, β are positive real numbers known as shape parameters, which determine the overall shape and behavior of the probability density function (PDF). In general, the beta binomial distribution has a discrete PDF, and depending on the values of α and β, the PDF may have monotonically increasing values, values that have a single "peak" or "valley" within the interior of its domain, or may be uniform. The beta binomial distribution is sometimes referred to as a Pólya distribution or as a negative hypergeometric distribution.
• The beta binomial distribution can be thought of as an abstraction of the Bernoulli (BernoulliDistribution) and binomial (BinomialDistribution) distributions in which the success probability p of a known number of Bernoulli trials is random, and the associated binomial distribution has success probability p, which follows the beta distribution (BetaDistribution). In Bayesian terms, this means that the beta binomial distribution arises as a posterior predictive distribution of a binomial variable in which the prior distribution on the success probability p is a beta distribution. The first documented application of the beta binomial distribution dates back to the work of Hugo Muench on probabilistic modeling of medical trials in the 1930s, and even today, a number of real world phenomena can be modeled by a beta binomial distribution. For example, the beta binomial distribution can be utilized in the Pólya urn model for a specific set of drawing and replacement rules. More recently, beta binomial distributions have been used to assess the performance of biometric identification devices, in the study of Bayesian networks, and in various artificial intelligence algorithms.
• RandomVariate can be used to give one or more machine- or arbitrary-precision (the latter via the WorkingPrecision option) pseudorandom variates from a beta binomial distribution. Distributed[x,BetaBinomialDistribution[α,β,n]], written more concisely as xBetaBinomialDistribution[α,β,n], can be used to assert that a random variable x is distributed according to a beta binomial distribution. Such an assertion can then be used in functions such as Probability, NProbability, Expectation, and NExpectation.
• The probability density and cumulative distribution functions may be given using PDF[BetaBinomialDistribution[α,β,n],x] and CDF[BetaBinomialDistribution[α,β,n],x]. The mean, median, variance, raw moments, and central moments may be computed using Mean, Median, Variance, Moment, and CentralMoment, respectively. These quantities can be visualized using DiscretePlot.
• DistributionFitTest can be used to test if a given dataset is consistent with a beta binomial distribution, EstimatedDistribution to estimate a beta binomial parametric distribution from given data, and FindDistributionParameters to fit data to a beta binomial distribution. ProbabilityPlot can be used to generate a plot of the CDF of given data against the CDF of a symbolic beta binomial distribution and QuantilePlot to generate a plot of the quantiles of given data against the quantiles of a symbolic beta binomial distribution.
• TransformedDistribution can be used to represent a transformed beta binomial distribution, CensoredDistribution to represent the distribution of values censored between upper and lower values, and TruncatedDistribution to represent the distribution of values truncated between upper and lower values. CopulaDistribution can be used to build higher-dimensional distributions that contain a beta binomial distribution, and ProductDistribution can be used to compute a joint distribution with independent component distributions involving beta binomial distributions.
• BetaBinomialDistribution is related to a number of other statistical distributions. As previously mentioned, BetaBinomialDistribution combines features from both BinomialDistribution and BetaDistribution, a fact made precise by observing that ParameterMixtureDistribution[BinomialDistribution[n,p],pBetaDistribution[α,β]] evaluates to BetaBinomialDistribution[α,β,n]. Similarly, DiscreteUniformDistribution[{0,n}] is precisely the same as BetaBinomialDistribution[1,1,n], a fact that subsequently induces qualitative links with UniformDistribution, TriangularDistribution, and PERTDistribution. In a very natural way, BetaBinomialDistribution is related to BetaNegativeBinomialDistribution, and because of the fact that MultinomialDistribution and DirichletDistribution are higher-dimensional analogues of BinomialDistribution and BetaDistribution, respectively, BetaBinomialDistribution can be viewed as a one-dimensional analog of the so-called Dirichlet-multinomial distribution.

# Examples

open all close all

## Basic Examples(3)

Probability mass function:

 In:= Out= In:= Out= In:= Out= Cumulative distribution function:

 In:= Out= In:= Out= In:= Out= Mean and variance:

 In:= Out= In:= Out= ## Possible Issues(3)

Introduced in 2007
(6.0)