StatRandom.RandomHypGeometric Method

procedure RandomHypGeometric(const M: Integer; const K: Integer; const N: Integer; const results: TMtxVecInt; Seed: Integer);

Hypergeometric distribution random generator.

#NameTypeDescription
1MInteger
2KInteger
3NInteger
4resultsTMtxVecInt
5SeedInteger

Result: stored in self (calling object)

Remarks:

This routine generates Result.Length pseudo random numbers, using the hypergeometric distribution with parameters M (lot size), K (size of sampling) and N (marked elements in the lot). 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);
    RandomHypGeometric(100,50,30, Res);
end;