A beta binomial distribution is a discrete distribution obtained by mixing a binomial distribution
with a beta distribution for its probability
parameter .
For positive parameters
and
and a nonnegative integer
,
its probability mass function for
,
...,
is
|
(1)
|
where
is the beta function and
is a binomial coefficient.
For integer
with
, the distribution
function is
|
(2)
|
where
is a gamma function and
|
(3)
|
is a terminating generalized hypergeometric function. For real arguments between 0 and ,
, where
is the floor function.
The endpoint values are
for
and
for
.
It is implemented as BetaBinomialDistribution[alpha, beta, n].
The first few raw moments are
|
(4)
| |||
|
(5)
| |||
|
(6)
|
giving the mean and variance as
|
(7)
| |||
|
(8)
|