procedure RandomNegBinom(const R: Double; const p: Double; const results: TMtxVecInt; Seed: Integer);
Negative binomial distribution random generator.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | R | Double | |
| 2 | p | Double | |
| 3 | results | TMtxVecInt | |
| 4 | Seed | Integer |
Result: stored in self (calling object)
Remarks:
This routine generates Result.Length pseudo random numbers, using the hypergeometric distribution with parameters M, K and N. The random numbers are stored in the Results vector. An exception is raised if Result vector is complex.
Examples
Uses MtxExprInt, StatRandom;
procedure Example;
var Res: VectorInt;
begin
Res.Size(2000);
RandomHegBinom(10,0.2, Res);
end;