2.2.5.13. Beta law

Defined between a minimum and a maximum, it depends on two parameters \(\alpha\) and \(\beta\), as

\[f(x) = \frac{Y^{\alpha - 1}\times ( 1 - Y )^{\beta - 1}}{B(\alpha,\beta)} \; {\rm 1\kern-0.28emI}_{[x_{\rm min},x_{\rm max}]}(x)\]

where \(Y =\dfrac{(x-x_{\rm min})}{(x_{\rm max}-x_{\rm min})}\) and \(B(\alpha,\beta)\) is the beta function.

In the current implementation, both \(\alpha\) and \(\beta\) must be greater than 0.0001.

Uranie code to simulate a Beta random variable is:

    TDataServer *tds = new TDataServer("tdssampler", "Sampler Uranie demo");
    tds->addAttribute( new TBetaDistribution("bet", 6.0, 6.0, 0.0, 2.0) );
    
    TSampling *fsamp = new TSampling(tds, "lhs", 300);
    fsamp->generateSample(); // Create a representative sample
    
    tds->Draw("bet");

Figure 2.23 shows the PDF, CDF and inverse CDF generated for different sets of parameters.

../../../_images/TBetaDistribution.png

Figure 2.23 Example of PDF, CDF and inverse CDF for Beta distributions.