This is an old revision of this page, as edited by KH-1(talk | contribs) at 23:43, 16 April 2016(Reverted edits by Nschuma714 (talk) to last version by 192.152.134.249). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Revision as of 23:43, 16 April 2016 by KH-1(talk | contribs)(Reverted edits by Nschuma714 (talk) to last version by 192.152.134.249)
Using the properties of the beta function, this can alternatively be written
Beta-binomial as an urn model
The beta-binomial distribution can also be motivated via an urn model for positive integer values of α and β, known as the Polya 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 repeated n times, then the probability of observing k red balls follows a beta-binomial distribution with parameters n,α and β.
Note that 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 a hypergeometric distribution.
Letting we note, suggestively, that the mean can be written as
and the variance as
where . The parameter is known as the "intra class" or "intra cluster" correlation. It is this positive correlation which gives rise to overdispersion.
The method of moments estimates can be gained by noting the first and second moments of the beta-binomial namely
and setting these raw moments equal to the first and second raw sample moments respectively
and solving for α and β we get
Note that 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 the hypergeometric distribution are alternative candidates respectively.
Maximum likelihood estimation
While closed-form maximum 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).
The R package VGAM through the function vglm, via maximum likelihood, facilitates the fitting of glm type models with responses distributed according to the beta-binomial distribution. Note also that there is no requirement that n is fixed throughout the observations.
Example
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 century Saxony (Sokal and Rohlf, p. 59 from Lindsey). The 13th child is ignored to assuage the effect of families non-randomly stopping when a desired gender is reached.
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 posit a theoretical justification for heterogeneity (also known as "burstiness") in gender-proneness among mammalian offspring (i.e. overdispersion).
The superior fit is evident especially among the tails
Males
0
1
2
3
4
5
6
7
8
9
10
11
12
Observed Families
3
24
104
286
670
1033
1343
1112
829
478
181
45
7
Fitted Expected (Beta-Binomial)
2.3
22.6
104.8
310.9
655.7
1036.2
1257.9
1182.1
853.6
461.9
177.9
43.8
5.2
Fitted Expected (Binomial p = 0.519215)
0.9
12.1
71.8
258.5
628.1
1085.2
1367.3
1265.6
854.2
410.0
132.8
26.1
2.3
Further Bayesian considerations
It is convenient to reparameterize the distributions so that the expected mean of the prior is a single parameter: Let
while the marginal distribution m(k|μ, M) is given by
Substituting back M and μ, in terms of and , this becomes:
which is the expected beta-binomial distribution with parameters and .
We can also use the method of iterated expectations to find the expected value of the marginal moments. Let us write our model as a two-stage compound sampling model. Let ki be the number of success out of ni trials for event i:
We can find iterated moment estimates for the mean and variance using the moments for the distributions in the two-stage model:
We want point estimates for and . The estimated mean is calculated from the sample
The estimate of the hyperparameter M is obtained using the moment estimates for the variance of the two-stage model:
Solving:
where
Since we now have parameter point estimates, and , for the underlying distribution, we would like to find a point estimate for the probability of success for event i. This is the weighted average of the event estimate and . Given our point estimates for the prior, we may now plug in these values to find a point estimate for the posterior
Shrinkage factors
We may write the posterior estimate as a weighted average: