Deriving the mean and variance of the Beta distribution requires the following result.
A useful integral
For any constants \(a \gt 0\) and \(b \gt 0\),
\[ \int_0^1{x^{a - 1} (1 - x)^{b - 1}} dx \;\;=\;\; \frac{\Gamma(a) \Gamma(b)}{\Gamma(a + b)} \](This result can be used to prove that the beta distribution's pdf integrates to 1.)
Mean and variance of beta distribution
If a random variable, \(X\), has a beta distribution with pdf
\[ f(x) \;\;=\;\; \begin{cases} \dfrac {\Gamma(\alpha + \beta) }{\Gamma(\alpha)\Gamma(\beta)} x^{\alpha - 1} (1 - x)^{\beta - 1}& \text{if }0 \lt x \le 1 \\ 0 & \text{otherwise} \end{cases} \]its mean and variance are
\[ E[X] \;=\; \frac{\alpha}{\alpha + \beta} \spaced{and} \Var(X) \;=\; \frac{\alpha\beta}{(\alpha + \beta)^2(\alpha + \beta + 1)} \](Proved in full version)