Beta Binomial Distribution

Author

Eric W. Weisstein
October 19, 2005

This notebook downloaded from http://mathworld.wolfram.com/notebooks/Statistics/BetaBinomialDistribution.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/BetaBinomialDistribution.html.

©2005 Wolfram Research, Inc. except for portions noted otherwise

Usage

?BetaBinomialDistribution

Stats

Stats[BetaBinomialDistribution[α,β,n],x]//StatsForm//TraditionalForm

PDF

FullSimplify[Sum[((Beta[x+α,n-x+β] Binomial[n,x])/(Beta[α,β])),{x,0,n}],n∈Integers]

CDF

PDF[BetaBinomialDistribution[α,β,n],x]

Sum[((Beta[x+α,n-x+β] Binomial[n,x])/(Beta[α,β])),{x,0,Floor[t]}]

FullSimplify[Sum[PDF[BetaBinomialDistribution[α,β,n],x],{x,0,t}],n∈Integers&&n>0&&(α|β)∈Reals]

expr1=1+(π Csc[π (n-t+β)] n! Gamma[1+t+α] Gamma[α+β] HypergeometricPFQRegularized[{1,1-n+t,1+t+α},{2+t,2-n+t-β},1])/(Gamma[n-t] Gamma[α] Gamma[β] Gamma[n+α+β])/.{t->x,α->a,β->b};
expr2=Piecewise[{{-((-Beta[a,b]+
(n Beta[-1+b+n-Floor[x],1+a+Floor[x]] Gamma[n]HypergeometricPFQ[{1,1+a+Floor[x],1-n+Floor[x]},
{2+Floor[x],2-b-n+Floor[x]},1])/
(Beta[n-Floor[x],2+Floor[x]] Gamma[2+n]))/Beta[a,b]),0≤x<n},
{1,x≥n}}];

FullSimplify[expr1,(x|n)∈Integers]//TraditionalForm

FullSimplify[expr2,0<=x<n&&(x|n)∈Integers]//FullSimplify//TraditionalForm

FullSimplify[expr1-expr2,x∈Integers&&0≤x<n]

FullSimplify[FunctionExpand[expr1],(x|n)∈Integers]

FullSimplify[FunctionExpand[expr2],(x|n)∈Integers]

Raw Moments

FullSimplify[Sum[((Beta[x+α,n-x+β] Binomial[n,x])/(Beta[α,β]))x^k,{x,0,n}],n∈Integers&&k∈Integers]

FullSimplify[FunctionExpand/@Table[Sum[((Beta[x+α,n-x+β] Binomial[n,x])/(Beta[α,β]))x^k,{x,0,n}],{k,0,4}],n∈Integers&&n>0]

Mean

Mean[BetaBinomialDistribution[α,β,n]]

FullSimplify[Sum[((Beta[x+α,n-x+β] Binomial[n,x])/(Beta[α,β]))x,{x,0,n}],n∈Integers]

Variance

Variance[BetaBinomialDistribution[α,β,n]]

FullSimplify[Sum[((Beta[x+α,n-x+β] Binomial[n,x])/(Beta[α,β]))(((x-((n α)/(α+β))))^2),{x,0,n}],n∈Integers]