Probabilities.BetaPDF Method

Overload List

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

Overload 1: void BetaPDF(TDenseMtxVec X, Double A, Double B, TDenseMtxVec Res)

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: Double BetaPDF(Double x, Double a, Double b)

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 Dew.Math.Units.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 Dew.Math.TDenseMtxVec overload are provided.

Examples
using Dew.Probability;
using Dew.Probability.Units;

namespace Dew.Examples
{
    void Example()
    {
        double pdf = BetaPDF(0.55, 3.0, 2.1);
        double cdf = BetaCDF(0.55, 3.0, 2.1);
    }
}
See Also: Probabilities.BetaCDF, Probabilities.BetaCDFInv