Probabilities::BetaPDF Function

Overload List

#SignatureDescription
1double BetaPDF(double x, double a, double b);Beta distribution probability density function (PDF).
2void BetaPDF(TDenseMtxVec *X, double A, double B, TDenseMtxVec *Res);Beta PDF (vectorized).

Overload 1: double BetaPDF(double x, double a, double b);

Beta distribution probability density function (PDF).

#NameTypeDescription
1xdoubleFunction domain, real value on the closed interval [0,1].
2adoubleFirst shape parameter, real value > 0.
3bdoubleSecond shape parameter, real value > 0.

Returns: 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.

See Also: Probabilities::BetaCDF, Probabilities::BetaCDFInv
Declared in Dew::Math::Units::Probabilities · Dew.Math/Units.Probabilities.h · Cross-compiler

Overload 2: void BetaPDF(TDenseMtxVec *X, double A, double B, TDenseMtxVec *Res);

Beta PDF (vectorized).

#NameTypeDescription
1XTDenseMtxVec *Defines distribution domain, real vector or matrix with integer values on open interval (0,1).
2AdoubleDistribution scale parameter, real positive value.
3BdoubleDistribution shape parameter, real positive value.
4ResTDenseMtxVec *After 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.
Declared in Dew::Math::Units::Probabilities · Dew.Math/Units.Probabilities.h · Cross-compiler