# Which is a good tool to compute parameters for a beta-distribution?

I have a β-distribution(which looks like a normal distribution), for which I want to calculate the values of α and β using maximum likelihood estimation method. I am new to statistics, so would like to know if there is any tool available which can be used to compute these parameters.

PS: Similar question has been answered before, but the solutions were focused towards using R statistical package. I am looking for an out of the box solution, or a solution I can code in a standard scripting language like python.

Unless you have some good reason to prefer the likelihood estimates to moment estimates, you may want to use the latter, as they are much easier to compute for this case. The wikipedia article on the beta distribution helpfully has the moment estimators written out in closed form as well as a note that the MLE does not have a closed form solution. If you want the MLE, you will have to program an algorithm to find it (not hard, but probably unnecessary effort).

Method of Moments Estimators from http://en.wikipedia.org/wiki/Beta_distribution#Parameter_estimation

Where,

and,

The method of moments estimators for the two parameters are:

• The moment estimators can give nonsensical (e.g. negative) answers. Jul 19, 2011 at 23:33
• True, that is a general problem with moment estimators. However, in this case the author notes that his/her data look normal, which suggests sufficient data far enough from the boundaries at 0 and 1 to ensure that A) the moment estimators will not give nonsense estimates and B) those estimates will be very close to the MLE. Jul 20, 2011 at 18:49

If you are interested in a non-MLE method, there is an interesting routine in the LearnBayes package of R called beta.select. You pass it two quantiles and it returns the alpha and beta parameters. For example, you could stipulate that the median is .3 and the ninetieth percentile is .5 and the stated routine would tell you that the value of alpha is 3.26 and the value of beta is 7.19.

• Dorp, J. R. van, & Mazzuchi, T. A. (2000). Solving for the parameters of a beta distribution under two quantile constraints. Journal of Statistical Computation and Simulation, 67, 189–201.
– a06e
Apr 11, 2014 at 18:34