# Estimating the parameters of a Beta distribution using the sample average and standard deviation

This is a simple question, but I just want to be sure.

Imagine that we have a sample of $n$ data $\{x_1, \dots, x_n\}$ and that we want to fit them to a Beta distribution. Imagine that we have calculated $\bar{x}$ and $s_{n-1}$ (or simply $s$), where

$$\bar{x}= \frac{\sum_{i=1}^n{x_i}}{n}$$ and $$s= \sqrt{\frac{\sum_{i=1}^n{(x_i - \bar{x})^2}}{n-1}} \text{.}$$

I think that we can estimate the parameters $\alpha$ and $\beta$ of the Beta distribution by $\hat{\alpha}$ and $\hat{\beta}$, respectively, where the values of $\hat{\alpha}$ and $\hat{\beta}$ are obtained from the following equations:

$$\bar{x} = \frac{\hat{\alpha}}{\hat{\alpha} + \hat{\beta}} \quad, \quad s^2 = \frac{\hat{\alpha}\hat{\beta}}{(\hat{\alpha} + \hat{\beta})^2(\hat{\alpha} + \hat{\beta}+1)} \text{.}$$

Am I right?

This is (a version of) method of moments.

It's certainly possible to estimate parameters this way, though it may not be as efficient as some other estimators.

Note, however, that if you want a four-parameter beta, rather than one on (0,1), things are more complicated.

In the case in your question you can simplify the calculations; note that $\frac{\bar{x}(1-\bar{x})}{s^2}=\hat{\alpha}+\hat{\beta}+1=\hat{\alpha}(\frac{\hat{\beta}}{\hat{\alpha}}+1)+1$, and $1/\bar{x}=\frac{\hat{\beta}}{\hat{\alpha}}+1$.

From there we can readily obtain an equation just in $\hat{\alpha}$; once you have that you can immediately find $\hat{\beta}$.

• So, @Glen_b, do you mean that this estimation (the method of moments in this case) can be biased? I thought that it was somehow equivalent to the maximum likelihood method, in this case of the Beta distribution. – Vicent Jun 23 '15 at 12:42
• (i) Method of moments can certainly be biased, (maximum likelihood usually is as well), but that's not what I was getting at; I referred to efficiency, not bias. (ii) No, method of moments is not equivalent to maximum likelihood in general, and in the case of the beta they're certainly different. – Glen_b Jun 23 '15 at 12:46
• I've seen an explanation of the MLE method for the parameters of a Beta distribution here: math.uah.edu/stat/point/Likelihood.html#bet, which also refers to a nice simulation experiment, but it deals with the case in which either $\alpha$ or $\beta$ are supposed to be known. Then I've seen this link: en.wikipedia.org/… . There I read that I can numerically solve a 2-equation system (this one: upload.wikimedia.org/math/6/9/5/…) in order to get the MLE of $\alpha$ and $\beta$. [...] – Vicent Jun 23 '15 at 13:26
• [...] Did I understand it right? Now, my question is: Do statistic software such as Statgraphics use MLE methods in order to estimate parameters? – Vicent Jun 23 '15 at 13:26
• I answer my last question in the previous comment. According to a help document in Statgraphics, "Estimates are obtained using Maximum Likelihood Estimation (MLE)" (in the context of parameter estimation and distribution fitting of uncensored data). So, thank you, @Glen_b, for your answer, which gave me some information I didn't know/remember and made me think and do some extra research. ;) – Vicent Jun 23 '15 at 13:47