StatRandom.RandomBinom Method

procedure RandomBinom(const An: Integer; const P: Double; const results: TMtxVecInt; Seed: Integer);

Binomial distribution random generator.

#NameTypeDescription
1AnInteger
2PDouble
3resultsTMtxVecInt
4SeedInteger

Result: stored in self (calling object)

Remarks:

This routine generates Result.Length pseudo random numbers, using the binomial distribution with parameter p. 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);
    RandomBinom(4, 0.2, Res);
end;