You are here: Symbol Reference > RndGenerators Namespace > Classes > TRngStream Class > public > TRngStream.RandomNegbinomial Method
MtxVec VCL
ContentsIndex
PreviousUpNext
TRngStream.RandomNegbinomial Method

Generates an array of integer amples distributed according to the Negative binomial probability distribution.

Pascal
procedure RandomNegbinomial(const Dst: TMtxVecInt; const r: double; const p: double);

Returns random numbers distributed according to the Negative binomial probability density function (PDF) as defined here Probabilities.NegBinomPDF. 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.

Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!