TITLE: Mean And Variance Of Beta Distributions
QUESTION [8 upvotes]: 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?

REPLY [15 votes]: 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)}$$