Probabilities.BetaPDF Method

Overload List

#SignatureDescription
1procedure BetaPDF(const X: TDenseMtxVec; A: Double; B: Double; const Res: TDenseMtxVec);Beta PDF (vectorized).
2function BetaPDF(x: Double; a: Double; b: Double): Double;Beta distribution probability density function (PDF).

Overload 1: procedure BetaPDF(const X: TDenseMtxVec; A: Double; B: Double; const Res: TDenseMtxVec);

Beta PDF (vectorized).

#NameDescription
1XDefines distribution domain, real vector or matrix with integer values on open interval (0,1).
2ADistribution scale parameter, real positive value.
3BDistribution shape parameter, real positive value.
4ResAfter calculation stores the PDF calculated from X, A and B. Length and Complex properties of Res are adjusted automatically to match Length and Complex properties of X.

Result: stored in self (calling object)

Overload 2: function BetaPDF(x: Double; a: Double; b: Double): Double;

Beta distribution probability density function (PDF).

#NameDescription
1xFunction domain, real value on the closed interval [0,1].
2aFirst shape parameter, real value > 0.
3bSecond shape parameter, real value > 0.

Returns: Double - the beta distribution probability density function (PDF) at x for shape parameters a and b. Returns NAN when a <= 0, b <= 0, x < 0 or x > 1; returns +INF at x=0 when a < 1 and at x=1 when b < 1.

Remarks:

Computes the beta PDF

PDF(x|a,b)=1/B(a,b) x^(a-1)(1-x)^(b-1)* I_([0,1])(x)

where B(a,b)B(a,b) is the Probabilities.Beta function and the density is nonzero only on [0,1][0,1]. Domain: x in [0,1], a > 0, b > 0. Behaviour: NAN for invalid parameters or x not in [0,1]; at the boundary x=0 (with a < 1) and x=1 (with b < 1) the density diverges and +INF is returned. A scalar form (this one) and a vectorized TDenseMtxVec overload are provided.

Examples
Uses Probabilities;

procedure Example;
var pdf,cdf: double;
begin
    pdf := BetaPDF(0.55, 3.0, 2.1);
    cdf := BetaCDF(0.55, 3.0, 2.1);
end;
See Also: Probabilities.BetaCDF, Probabilities.BetaCDFInv