Skip to content

beta

Syntax

beta(alpha, beta)

Parameters

alpha
a shape parameter \(\alpha\) where \(\alpha \gt 0\)
beta
a shape parameter \(\beta\) where \(\beta \gt 0\)

Returns

Returns a random value from the constructed beta distribution with the given shape parameters.

Description

The probability density function PDF for the beta distribution defined on the interval [0,1] is given by:

\(\displaystyle p(x) = \frac{x^{\alpha-1}(1-x)^{\beta-1}}{B(\alpha, \beta)}\)

Examples

if(beta(2,5) >= 0.4) then next(Selection)

See Also