.DESLib.RandomLib.Variates.Continuous.Beta

Information

Beta

Beta probability distribution function.

Syntax

Beta(g,alpha1,alpha2)

Description

Generates a random variate following the Beta probability distribution, with parameters alpha1 and alpha2.

The pseudo-code algorithm used for this distribution is:

1. Generate Y1 as gamma(alpha1,1), and Y2 as gamma(alpha2,1) independent from Y1.
2. Return x = Y1/(Y1+Y2)

Examples

(u,g) := Beta(g,0.6,0.4);

Interface

function Beta
  extends Var;
end Beta;

Generated at 2024-11-21T19:25:40Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos