StatRandom.RandomGeometric Method

procedure RandomGeometric(const P: Double; const results: TDenseMtxVec; Seed: Integer);

Geometric distribution random generator.

#NameTypeDescription
1PDouble
2resultsTDenseMtxVec
3SeedInteger

Result: stored in self (calling object)

Remarks:

This routine generates Result.Length pseudo random numbers, using the geometric distribution with parameter P. The random numbers are stored in the Results vector. An exception is raised if Result vector is complex.

Examples
Uses MtxExpr, StatRandom;
procedure Example;
var Res: Vector;
begin
    Res.Size(2000);
    RandomGeometric(0.6, Res, -1);
end;