I want to find mean and variances of beta distribution . The distributions function is as follows: when $x$ is between $0$ and $1$

$$ f(x;\alpha,\beta) = \frac{x^{\alpha-1}(1-x)^{\beta-1}}{\int_0^1 u^{\alpha-1} (1-u)^{\beta-1}} \, du $$

Searching over internet I have found the following question. Beta distributions. But could not understand the procedure to find the mean and variances.

\begin{align} \mu=\operatorname E[X] & = \int_0^1 x f(x;\alpha,\beta) \, dx \\[6pt] & = \int_0^1 x \frac{x^{\alpha-1} (1-x)^{\beta-1}}{B(\alpha,\beta)} \, dx \\[6pt] & = \frac \alpha {\alpha+\beta} \\[6pt] & = \frac 1 {1 + \frac\beta\alpha} \end{align}

Guyz, can you please help me to find the mean and variances of the beta distributions?

  • $\begingroup$ To say "the distribution is as follows" without mentioning that $x$ is constrained to lie between $0$ and $1$ could leave someone who first finds out about this by reading your posting confused and uninformed. $\endgroup$ Sep 18, 2013 at 15:06
  • 1
    $\begingroup$ I am extremely sorry . You can edit my question . $\endgroup$ Sep 18, 2013 at 15:08

2 Answers 2


By definition, the Beta function is $B(\alpha,\beta) = \int_0^1 x^{\alpha - 1} (1-x)^{\beta - 1}\ dx$ where $\alpha, \beta$ have real parts $ > 0$ (but in this case we're talking about real $\alpha, \beta > 0$). This is related to the Gamma function by $$ B(\alpha,\beta) = \dfrac{\Gamma(\alpha)\Gamma(\beta)}{\Gamma(\alpha+\beta)}$$ Now if $X$ has the Beta distribution with parameters $\alpha, \beta$, $$\mu = E[X] = \dfrac{\int_0^1 x^{\alpha} (1-x)^{\beta-1}\ dx}{B(\alpha,\beta)} = \dfrac{B(\alpha+1,\beta)}{B(\alpha,\beta)} = \dfrac{\Gamma(\alpha+1) \Gamma(\beta)}{\Gamma(\alpha+\beta+1)} \dfrac{\Gamma(\alpha+\beta)}{\Gamma(\alpha)\Gamma(\beta)} = \dfrac{\alpha}{\alpha+\beta}$$ using the identity $\Gamma(t+1) = t \Gamma(t)$. Similarly $$ \sigma^2 + \mu^2 = E[X^2] = \dfrac{B(\alpha+2,\beta)}{B(\alpha,\beta)} = \dfrac{\alpha(\alpha+1)}{(\alpha+\beta)(\alpha+\beta+1)}$$ from which $$\sigma^2 = \dfrac{\alpha\beta}{(\alpha+\beta)^2 (\alpha+\beta+1)}$$


If you know that $$ \int_0^1 x^{\alpha-1}(1-x)^{\beta-1}\, dx = \frac{\Gamma(\alpha)\Gamma(\beta)}{\Gamma(\alpha+\beta)} $$ and if you also know that $$ \alpha\Gamma(\alpha)=\Gamma(\alpha+1), $$ then you've got what you need. It follows that $$ f(x) = \frac{\Gamma(\alpha+\beta)}{\Gamma(\alpha)\Gamma(\beta)}x^{\alpha-1}(1-x)^{\beta-1} $$ is a probability density on $[0,1]$.

Now suppose you want the expected value of the second power of a random variable with this distribution. That is $$ \begin{align} \int_0^1 x^2 f(x)\,dx & =\int_0^1 x^2\frac{\Gamma(\alpha+\beta)}{\Gamma(\alpha)\Gamma(\beta)}x^{\alpha-1}(1-x)^{\beta-1}\,dx \\[12pt] & = \frac{\Gamma(\alpha+\beta)}{\Gamma(\alpha)\Gamma(\beta)} \int_0^1 x^{(\alpha+2)-1} (1-x)^{\beta-1} \,dx. \end{align} $$ Now you have the SAME integral whose value was mentioned earlier, except that it has $\alpha+2$ where $\alpha$ appeared earlier. So its value is $$ \frac{\Gamma(\alpha+2)\Gamma(\beta)}{\Gamma((\alpha+2)+\beta)}. $$ Now do the multiplication: $$ \frac{\Gamma(\alpha+\beta)}{\Gamma(\alpha)\Gamma(\beta)}\cdot\frac{\Gamma(\alpha+2)\Gamma(\beta)}{\Gamma((\alpha+2)+\beta)} = \frac{\Gamma(\alpha+\beta)}{\Gamma(\alpha+\beta+2)}\cdot\frac{\Gamma(\alpha+2)}{\Gamma(\alpha)} $$ $$ =\frac{1}{(\alpha+\beta)(\alpha+\beta+1)}\cdot\alpha(\alpha+1). $$

Now recall that $$ \operatorname{var}(X)=\operatorname E(X^2) - (\operatorname E X)^2 $$ and do the algebraic simplifications.

Remeber that if your bottom line is not symmetric in the two parameters $\alpha$ and $\beta$, then something's wrong.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.