Overload List
| # | Signature | Description |
|---|---|---|
| 1 | void BetaPDF(TDenseMtxVec X, Double A, Double B, TDenseMtxVec Res) | Beta PDF (vectorized). |
| 2 | Double 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).
| # | Name | Description |
|---|---|---|
| 1 | X | Defines distribution domain, real vector or matrix with integer values on open interval (0,1). |
| 2 | A | Distribution scale parameter, real positive value. |
| 3 | B | Distribution shape parameter, real positive value. |
| 4 | Res | 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. |
Result: stored in self (calling object)
Overload 2: Double BetaPDF(Double x, Double a, Double b)
Beta distribution probability density function (PDF).
| # | Name | Description |
|---|---|---|
| 1 | x | Function domain, real value on the closed interval [0,1]. |
| 2 | a | First shape parameter, real value > 0. |
| 3 | b | Second 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.
Computes the beta PDF
PDF(x|a,b)=1/B(a,b) x^(a-1)(1-x)^(b-1)* I_([0,1])(x)
where is the Dew.Math.Units.Probabilities.Beta function and the density is nonzero only on . 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.
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);
}
}