3.5.2.4.2.1 Beta

Description

This function calculates Beta function with parameter a and b. The formula of the Beta function is:

beta(a,b)=\int_{0}^{1}t^{a-1}(1-t)^{b-1}\, dt

Syntax

double beta(double a,double b)

Parameters

a

Input parameter. The first shape parameter, a, of the required beta distribution, must be positive( a>0 ).

b

Input parameter. The second shape parameter, b, of the required beta distribution, must be positive ( b>0 ).

Return

Returns the value of Beta function with parameters a and b.

Example

aa = beta(2,2);
aa = ; //aa=0.16666666666879

See Also

incbeta(x, a, b), betacdf(x, a, b)