StatRandom.RandomNegBinom Method

procedure RandomNegBinom(const R: Double; const p: Double; const results: TMtxVecInt; Seed: Integer);

Negative binomial distribution random generator.

#NameTypeDescription
1RDouble
2pDouble
3resultsTMtxVecInt
4SeedInteger

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;