Properties of the Distribution
Calculation of Mean and Variance
To calculate the mean of the Beta distribution, we can simply integrate x *(Beta PDF), per the definition of mathematical expectation.
> restart;
> with(plots, display):
> interface( showassumed = 0 );
> assume(alpha>0); assume(beta>0);
> f:=(alpha,beta,x)->GAMMA(alpha+beta)/(GAMMA(alpha)*GAMMA(beta))*x^(alpha-1)*(1-x)^(beta-1);
> EX:=int(x*f(alpha,beta,x),x=0..1);
Calculating Var( X ), the variance of the Beta( ) distribution, we will employ the formula: Var( X ) = E( ) -
> E_X_SQ:=int((x^2)*f(alpha,beta,x),x=0..1);
> VarX:=simplify(E_X_SQ-EX^2);
>