The previous post looked at an application of the beta-binomial distribution. The probability mass function for a beta-binomial with parameters n, a, and b is given by
The mean μ and the variance σ² are given by
Solving for a and b to meet a specified mean and variance appears at first to require solving a cubic equation, but it’s easier than that.
If we define p = a/(a+b) then the system becomes
We assume n is known and so p is known, and we are left with a linear equation for a. With a little work we find
I verified the calculations above with Mathematica.
One use for solving for a and b would be to fit a beta-binomial distribution to data using moment matching. I don’t know how robust this would be, but at least it’s something.
Another application would be to find a beta-binomial prior distribution with elicited mean and variance.