Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Beta-binomial distribution

From Wikipedia, the free encyclopedia
Discrete probability distribution
Probability mass function
Probability mass function for the beta-binomial distribution
Cumulative distribution function
Cumulative probability distribution function for the beta-binomial distribution
NotationBetaBin(n,α,β){\displaystyle \mathrm {BetaBin} (n,\alpha ,\beta )}
ParametersnN0 — number of trials
α>0{\displaystyle \alpha >0} (real)
β>0{\displaystyle \beta >0} (real)
Supportx ∈ { 0, …,n }
PMF(nx)B(x+α,nx+β)B(α,β){\displaystyle {\binom {n}{x}}{\frac {\mathrm {B} (x+\alpha ,n-x+\beta )}{\mathrm {B} (\alpha ,\beta )}}\!}

whereB(x,y)=Γ(x)Γ(y)Γ(x+y){\displaystyle \mathrm {B} (x,y)={\frac {\Gamma (x)\,\Gamma (y)}{\Gamma (x+y)}}} is thebeta function
CDF{0,x<0(nx)B(x+α,nx+β)B(α,β)3F2(a;b;x),0x<n1,xn{\displaystyle {\begin{cases}0,&x<0\\{\binom {n}{x}}{\tfrac {\mathrm {B} (x+\alpha ,n-x+\beta )}{\mathrm {B} (\alpha ,\beta )}}{}_{3}\!F_{2}({\boldsymbol {a}};{\boldsymbol {b}};x),&0\leq x<n\\1,&x\geq n\end{cases}}}

where3F2(a;b;x) is thegeneralized hypergeometric function
3F2(1,x,nx+β;nx+1,1xα;1){\displaystyle {}_{3}\!F_{2}(1,-x,n\!-\!x\!+\!\beta ;n\!-\!x\!+\!1,1\!-\!x\!-\!\alpha ;1)\!}
Meannαα+β{\displaystyle {\frac {n\alpha }{\alpha +\beta }}\!}
Variancenαβ(α+β+n)(α+β)2(α+β+1){\displaystyle {\frac {n\alpha \beta (\alpha +\beta +n)}{(\alpha +\beta )^{2}(\alpha +\beta +1)}}\!}
Skewness(α+β+2n)(βα)(α+β+2)1+α+βnαβ(n+α+β){\displaystyle {\tfrac {(\alpha +\beta +2n)(\beta -\alpha )}{(\alpha +\beta +2)}}{\sqrt {\tfrac {1+\alpha +\beta }{n\alpha \beta (n+\alpha +\beta )}}}\!}
Excess kurtosisSee text
MGF2F1(n,α;α+β;1et){\displaystyle _{2}F_{1}(-n,\alpha ;\alpha +\beta ;1-e^{t})\!} where2F1{\displaystyle _{2}F_{1}} is thehypergeometric function
CF2F1(n,α;α+β;1eit){\displaystyle _{2}F_{1}(-n,\alpha ;\alpha +\beta ;1-e^{it})\!}
PGF2F1(n,α;α+β;1z){\displaystyle _{2}F_{1}(-n,\alpha ;\alpha +\beta ;1-z)\!}

Inprobability theory andstatistics, thebeta-binomial distribution is a family of discreteprobability distributions on a finitesupport of non-negative integers arising when the probability of success in each of a fixed or known number ofBernoulli trials is either unknown or random. The beta-binomial distribution is thebinomial distribution in which the probability of success at each ofn trials is not fixed but randomly drawn from abeta distribution. It is frequently used inBayesian statistics,empirical Bayes methods andclassical statistics to captureoverdispersion inbinomial type distributed data.

The beta-binomial is a one-dimensional version of theDirichlet-multinomial distribution as the binomial and beta distributions are univariate versions of themultinomial andDirichlet distributions respectively. The special case whereα andβ are integers is also known as thenegative hypergeometric distribution.

Motivation and derivation

[edit]

As a compound distribution

[edit]

Thebeta distribution is aconjugate distribution of thebinomial distribution. This fact leads to an analytically tractablecompound distribution where one can think of thep{\displaystyle p} parameter in the binomial distribution as being randomly drawn from a beta distribution. Suppose we were interested in predicting the number of heads,x{\displaystyle x} inn{\displaystyle n} future trials. This is given by

f(xn,α,β)=01Bin(x|n,p)Beta(pα,β)dp=(nx)1B(α,β)01px+α1(1p)nx+β1dp=(nx)B(x+α,nx+β)B(α,β).{\displaystyle {\begin{aligned}f(x\mid n,\alpha ,\beta )&=\int _{0}^{1}\mathrm {Bin} (x|n,p)\mathrm {Beta} (p\mid \alpha ,\beta )\,dp\\[6pt]&={n \choose x}{\frac {1}{\mathrm {B} (\alpha ,\beta )}}\int _{0}^{1}p^{x+\alpha -1}(1-p)^{n-x+\beta -1}\,dp\\[6pt]&={n \choose x}{\frac {\mathrm {B} (x+\alpha ,n-x+\beta )}{\mathrm {B} (\alpha ,\beta )}}.\end{aligned}}}

Using the properties of thebeta function, this can alternatively be written

f(xn,α,β)=Γ(n+1)Γ(x+α)Γ(nx+β)Γ(n+α+β)Γ(x+1)Γ(nx+1)Γ(α+β)Γ(α)Γ(β){\displaystyle f(x\mid n,\alpha ,\beta )={\frac {\Gamma (n+1)\Gamma (x+\alpha )\Gamma (n-x+\beta )}{\Gamma (n+\alpha +\beta )\Gamma (x+1)\Gamma (n-x+1)}}{\frac {\Gamma (\alpha +\beta )}{\Gamma (\alpha )\Gamma (\beta )}}}

As an urn model

[edit]

The beta-binomial distribution can also be motivated via anurn model for positiveinteger values ofα andβ, known as thePólya urn model. Specifically, imagine an urn containingα red balls andβ black balls, where random draws are made. If a red ball is observed, then two red balls are returned to the urn. Likewise, if a black ball is drawn, then two black balls are returned to the urn. If this is repeatedn times, then the probability of observingx red balls follows a beta-binomial distribution with parametersn,α and β.

By contrast, if the random draws are with simple replacement (no balls over and above the observed ball are added to the urn), then the distribution follows a binomial distribution and if the random draws are made without replacement, the distribution follows ahypergeometric distribution.

Moments and properties

[edit]

The first three rawmoments are

μ1=nαα+βμ2=nα[n(1+α)+β](α+β)(1+α+β)μ3=nα[n2(1+α)(2+α)+3n(1+α)β+β(βα)](α+β)(1+α+β)(2+α+β){\displaystyle {\begin{aligned}\mu _{1}&={\frac {n\alpha }{\alpha +\beta }}\\[8pt]\mu _{2}&={\frac {n\alpha [n(1+\alpha )+\beta ]}{(\alpha +\beta )(1+\alpha +\beta )}}\\[8pt]\mu _{3}&={\frac {n\alpha [n^{2}(1+\alpha )(2+\alpha )+3n(1+\alpha )\beta +\beta (\beta -\alpha )]}{(\alpha +\beta )(1+\alpha +\beta )(2+\alpha +\beta )}}\end{aligned}}}

and thekurtosis is

β2=(α+β)2(1+α+β)nαβ(α+β+2)(α+β+3)(α+β+n)[(α+β)(α+β1+6n)+3αβ(n2)+6n23αβn(6n)α+β18αβn2(α+β)2].{\displaystyle \beta _{2}={\frac {(\alpha +\beta )^{2}(1+\alpha +\beta )}{n\alpha \beta (\alpha +\beta +2)(\alpha +\beta +3)(\alpha +\beta +n)}}\left[(\alpha +\beta )(\alpha +\beta -1+6n)+3\alpha \beta (n-2)+6n^{2}-{\frac {3\alpha \beta n(6-n)}{\alpha +\beta }}-{\frac {18\alpha \beta n^{2}}{(\alpha +\beta )^{2}}}\right].}

Lettingp=αα+β{\displaystyle p={\frac {\alpha }{\alpha +\beta }}\!} we note, suggestively, that the mean can be written as

μ=nαα+β=np{\displaystyle \mu ={\frac {n\alpha }{\alpha +\beta }}=np\!}

and the variance as

σ2=nαβ(α+β+n)(α+β)2(α+β+1)=np(1p)α+β+nα+β+1=np(1p)[1+(n1)ρ]{\displaystyle \sigma ^{2}={\frac {n\alpha \beta (\alpha +\beta +n)}{(\alpha +\beta )^{2}(\alpha +\beta +1)}}=np(1-p){\frac {\alpha +\beta +n}{\alpha +\beta +1}}=np(1-p)[1+(n-1)\rho ]\!}

whereρ=1α+β+1{\displaystyle \rho ={\tfrac {1}{\alpha +\beta +1}}\!}. The parameterρ{\displaystyle \rho \;\!} is known as the "intra class" or "intra cluster" correlation. It is this positive correlation which gives rise to overdispersion. Note that whenn=1{\displaystyle n=1}, no information is available to distinguish between the beta and binomial variation, and the two models have equal variances.

Factorial moments

[edit]

Ther-thfactorial moment of a Beta-binomial random variableX is

E[(X)r]=n!(nr)!B(α+r,β)B(α,β)=(n)rB(α+r,β)B(α,β){\displaystyle \operatorname {E} {\bigl [}(X)_{r}{\bigr ]}={\frac {n!}{(n-r)!}}{\frac {B(\alpha +r,\beta )}{B(\alpha ,\beta )}}=(n)_{r}{\frac {B(\alpha +r,\beta )}{B(\alpha ,\beta )}}}.

Point estimates

[edit]

Method of moments

[edit]

Themethod of moments estimates can be gained by noting the first and second moments of the beta-binomial and setting those equal to the sample momentsm1{\displaystyle m_{1}} andm2{\displaystyle m_{2}}. We find

α^=nm1m2n(m2m1m11)+m1β^=(nm1)(nm2m1)n(m2m1m11)+m1.{\displaystyle {\begin{aligned}{\widehat {\alpha }}&={\frac {nm_{1}-m_{2}}{n({\frac {m_{2}}{m_{1}}}-m_{1}-1)+m_{1}}}\\[5pt]{\widehat {\beta }}&={\frac {(n-m_{1})(n-{\frac {m_{2}}{m_{1}}})}{n({\frac {m_{2}}{m_{1}}}-m_{1}-1)+m_{1}}}.\end{aligned}}}

These estimates can be non-sensically negative which is evidence that the data is either undispersed or underdispersed relative to the binomial distribution. In this case, the binomial distribution and thehypergeometric distribution are alternative candidates respectively.

Maximum likelihood estimation

[edit]

While closed-formmaximum likelihood estimates are impractical, given that the pdf consists of common functions (gamma function and/or Beta functions), they can be easily found via direct numerical optimization. Maximum likelihood estimates from empirical data can be computed using general methods for fitting multinomial Pólya distributions, methods for which are described in(Minka 2003).TheR package VGAM through the function vglm, via maximum likelihood, facilitates the fitting ofglm type models with responses distributed according to the beta-binomial distribution. There is no requirement that n is fixed throughout the observations.

Example: Sex ratio heterogeneity

[edit]

The following data gives the number of male children among the first 12 children of family size 13 in 6115 families taken from hospital records in 19th centurySaxony (Sokal and Rohlf, p. 59 from Lindsey). The 13th child is ignored to blunt the effect of families non-randomly stopping when a desired gender is reached.

Males0123456789101112
Families324104286670103313431112829478181457

The first two sample moments are

m1=6.23m2=42.31n=12{\displaystyle {\begin{aligned}m_{1}&=6.23\\m_{2}&=42.31\\n&=12\end{aligned}}}

and therefore the method of moments estimates are

α^=34.1350β^=31.6085.{\displaystyle {\begin{aligned}{\widehat {\alpha }}&=34.1350\\{\widehat {\beta }}&=31.6085.\end{aligned}}}

Themaximum likelihood estimates can be found numerically

α^mle=34.09558β^mle=31.5715{\displaystyle {\begin{aligned}{\widehat {\alpha }}_{\mathrm {mle} }&=34.09558\\{\widehat {\beta }}_{\mathrm {mle} }&=31.5715\end{aligned}}}

and the maximized log-likelihood is

logL=12492.9{\displaystyle \log {\mathcal {L}}=-12492.9}

from which we find theAIC

AIC=24989.74.{\displaystyle {\mathit {AIC}}=24989.74.}

The AIC for the competing binomial model is AIC = 25070.34 and thus we see that the beta-binomial model provides a superior fit to the data i.e. there is evidence for overdispersion.Trivers and Willard postulate a theoretical justification for heterogeneity in gender-proneness amongmammalian offspring.

The superior fit is evident especially among the tails

Males0123456789101112
Observed Families324104286670103313431112829478181457
Fitted Expected (Beta-Binomial)2.322.6104.8310.9655.71036.21257.91182.1853.6461.9177.943.85.2
Fitted Expected (Binomialp = 0.519215)0.912.171.8258.5628.11085.21367.31265.6854.2410.0132.826.12.3

Role in Bayesian statistics

[edit]

The beta-binomial distribution plays a prominent role in the Bayesian estimation of a Bernoulli success probabilityp{\displaystyle p} which we wish to estimate based on data. LetX={X1,X2,Xn1}{\displaystyle \mathbf {X} =\{X_{1},X_{2},\cdots X_{n_{1}}\}} be asample ofindependent and identically distributed Bernoulli random variablesXiBernoulli(p){\displaystyle X_{i}\sim {\text{Bernoulli}}(p)}. Suppose, our knowledge ofp{\displaystyle p} - in Bayesian fashion - is uncertain and is modeled by theprior distributionpBeta(α,β){\displaystyle p\sim {\text{Beta}}(\alpha ,\beta )}. IfY1=i=1n1Xi{\displaystyle Y_{1}=\sum _{i=1}^{n_{1}}X_{i}} then throughcompounding, the prior predictive distribution of

Y1BetaBin(n1,α,β){\displaystyle Y_{1}\sim {\text{BetaBin}}(n_{1},\alpha ,\beta )}.

After observingY1{\displaystyle Y_{1}} we note that theposterior distribution forp{\displaystyle p}

f(p|X,α,β)(i=1n1pxi(1p)1xi)pα1(1p)β1=Cpxi+α1(1p)n1xi+β1=Cpy1+α1(1p)n1y1+β1{\displaystyle {\begin{aligned}f(p|\mathbf {X} ,\alpha ,\beta )&\propto \left(\prod _{i=1}^{n_{1}}p^{x_{i}}(1-p)^{1-x_{i}}\right)p^{\alpha -1}(1-p)^{\beta -1}\\&=Cp^{\sum x_{i}+\alpha -1}(1-p)^{n_{1}-\sum x_{i}+\beta -1}\\&=Cp^{y_{1}+\alpha -1}(1-p)^{n_{1}-y_{1}+\beta -1}\end{aligned}}}

whereC{\displaystyle C} is anormalizing constant. We recognize the posterior distribution ofp{\displaystyle p} as aBeta(y1+α,n1y1+β){\displaystyle \mathrm {Beta} (y_{1}+\alpha ,n_{1}-y_{1}+\beta )}.

Thus, again through compounding, we find that theposterior predictive distribution of a sumY2{\displaystyle Y_{2}} of a future sample of sizen2{\displaystyle n_{2}} ofBernoulli(p){\displaystyle \mathrm {Bernoulli} (p)} random variables is

Y2BetaBin(n2,y1+α,n1y1+β){\displaystyle Y_{2}\sim \mathrm {BetaBin} (n_{2},y_{1}+\alpha ,n_{1}-y_{1}+\beta )}.

Generating random variates

[edit]

To draw a beta-binomial random variateXBetaBin(n,α,β){\displaystyle X\sim \mathrm {BetaBin} (n,\alpha ,\beta )} simply drawpBeta(α,β){\displaystyle p\sim \mathrm {Beta} (\alpha ,\beta )} and then drawXB(n,p){\displaystyle X\sim \mathrm {B} (n,p)}.

Related distributions

[edit]

See also

[edit]

References

[edit]

External links

[edit]
Discrete
univariate
with finite
support
with infinite
support
Continuous
univariate
supported on a
bounded interval
supported on a
semi-infinite
interval
supported
on the whole
real line
with support
whose type varies
Mixed
univariate
continuous-
discrete
Multivariate
(joint)
Directional
Degenerate
andsingular
Degenerate
Dirac delta function
Singular
Cantor
Families
Retrieved from "https://en.wikipedia.org/w/index.php?title=Beta-binomial_distribution&oldid=1330116173"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp