Overload List
| # | Signature | Description |
|---|---|---|
| 1 | procedure NegBinomPDF(const X: TMtxVecInt; R: Double; P: Double; const Res: TDenseMtxVec); | Negative binomial distribution PDF (vectorized). |
| 2 | function NegBinomPDF(x: Integer; R: Double; p: Double): Double; | Negative binomial probability mass function (PMF). |
Overload 1: procedure NegBinomPDF(const X: TMtxVecInt; R: Double; P: Double; const Res: TDenseMtxVec);
Negative binomial distribution PDF (vectorized).
| # | Name | Description |
|---|---|---|
| 1 | X | Defines distribution domain, vector or matrix with integer values. |
| 2 | R | Defines number of successes, positive integer. |
| 3 | P | Defines probability of each trial, real value on closed interval [0,1]. |
| 4 | Res | After calculation stores the PDF calculated from X, R and P 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 NegBinomPDF(x: Integer; R: Double; p: Double): Double;
Negative binomial probability mass function (PMF).
| # | Name | Description |
|---|---|---|
| 1 | x | Function domain, non-negative integer (number of failures before the R-th success). |
| 2 | R | Number of successes, real positive value (R>0). |
| 3 | p | Success probability of each trial, real value on the closed interval [0,1]. |
Returns: Double - the negative binomial probability mass function (PMF) at x using parameters R and p. Returns NAN when p is outside [0,1] or R<=0.
Remarks:
Computes the negative binomial PMF in the "number of failures before R successes" parameterization (R may be real):
PMF(x| R,p)=(Gamma(R+x))/(Gamma(x+1) Gamma(R)) p^R (1-p)^x, x=0,1,2,...
Domain: x >= 0, R>0, p in [0,1]. For p not in [0,1] or R <= 0 the result is NaN.