Overload List
| # | Signature | Description |
|---|---|---|
| 1 | double GeometricPDF(int x, double p); | Geometric probability mass function (PMF). |
| 2 | void GeometricPDF(TMtxVecInt *X, double p, TDenseMtxVec *Res); | Geometric distribution PDF (vectorized). |
Overload 1: double GeometricPDF(int x, double p);
Geometric probability mass function (PMF).
| # | Name | Type | Description |
|---|---|---|---|
| 1 | x | int | Function domain, non-negative integer (number of failures before the first success). |
| 2 | p | double | Success probability; valid on the half-open interval (0,1]. |
Returns: the geometric probability mass function (PMF) for value x using parameter p. Returns NAN when p is outside (0,1].
Remarks:
Computes the geometric PMF in the "number of failures before the first success" parameterization:
PMF(x| p)=p (1-p)^x, x=0,1,2,...
Domain: x >= 0, p in (0,1]. For p <= 0 or p>1 the result is NaN. (This support starts at 0, unlike the "number of trials" convention which starts at 1.)
Declared in Dew::Math::Units::Probabilities · Dew.Math/Units.Probabilities.h · Cross-compiler
Overload 2: void GeometricPDF(TMtxVecInt *X, double p, TDenseMtxVec *Res);
Geometric distribution PDF (vectorized).
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtxVecInt * | Defines distribution domain, real vector or matrix with positive integers. |
| 2 | p | double | Defines success probability. p must lie on the [0,1] closed interval. |
| 3 | Res | TDenseMtxVec * | After calculation stores the PDF calculated from X and p. 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