You are here: Symbol Reference > StatRandom Namespace > Functions > StatRandom.RandomNegBinom Function
Stats Master VCL
ContentsIndex
Example

Generate 2000 random numbers by using the hypergeometric distribution with parameters M=100, K=50 and N=30.

Uses MtxExprInt, StatRandom;
procedure Example;
  var Res: VectorInt;
begin
  Res.Size(2000);
    RandomHegBinom(10,0.2, Res);
end;
#include "MtxExprInt.hpp"
#include "StatRandom.hpp"
void __fastcall Example()
{
  sVector Res;
  Res.Size(2000,false);
  RandomNegBinom(10, 0.2, Res, -1);
}
Copyright (c) 1999-2025 by Dew Research. All rights reserved.