Overload List
| # | Signature | Description |
|---|---|---|
| 1 | double HypGeometricPDF(int x, int M, int K, int N); | Hypergeometric probability mass function (PMF). |
| 2 | void HypGeometricPDF(TMtxVecInt *X, int M, int K, int N, TDenseMtxVec *Res); | Hypergeometric distribution PDF (vectorized). |
Overload 1: double HypGeometricPDF(int x, int M, int K, int N);
Hypergeometric probability mass function (PMF).
| # | Name | Type | Description |
|---|---|---|---|
| 1 | x | int | Distribution domain, integer (number of successes drawn). |
| 2 | M | int | Total number of elements in the population, M>=0. |
| 3 | K | int | Number of elements with the desired trait, 0<=K<=M. |
| 4 | N | int | Number of samples drawn without replacement, 0<=N<=M. |
Returns: the hypergeometric probability mass function (PMF) at x for population M, K success states and N draws. Returns NAN on parameter violations; 0 outside the support.
Remarks:
Computes the hypergeometric PMF, the probability of drawing exactly x of the K success items in N draws without replacement from a population of M:
PMF(x| M,K,N)=(dbinomKxdbinomM-KN-x)/dbinomMN
Support: max(0,N-(M-K)) <= x <= min(K,N). The result is NaN when , and 0 outside the support.
Declared in Dew::Math::Units::Probabilities · Dew.Math/Units.Probabilities.h · Cross-compiler
Overload 2: void HypGeometricPDF(TMtxVecInt *X, int M, int K, int N, TDenseMtxVec *Res);
Hypergeometric distribution PDF (vectorized).
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TMtxVecInt * | Distribution domain, with integer values on closed interval [0,N]. |
| 2 | M | int | Defines total number of elements, valid values ae integers on closed interval [0,X]. |
| 3 | K | int | Defines number of elements with certain traits, valid values are integers on closed interval [X,M]. |
| 4 | N | int | Defines number of samples, valid values are integers on closed interval [X,M]. |
| 5 | Res | TDenseMtxVec * | After calculation stores the PDF calculated from X, K, M and N. 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