TRngStream.RandomBinomial Method

procedure RandomBinomial(Dst: TMtxVecInt; n: Integer; p: Double);

Generates an array of integer samples distributed Binomially.

#NameTypeDescription
1DstTMtxVecIntsource TVecInt or TMtxInt
2nInteger
3pDoublescalar

Result: stored in self (calling object)

Remarks:

Returns random numbers distributed according to the Binomial probability density function (PDF) as defined here Probabilities.BinomPDF. The number of samples generated is defined with the Dst.Length parameter. The result is an array of integers which can be accessed via Dst.IValues property. Dst is automatically resized to store 32bit integers, if needed.