StatRandom.RandomBinom Method

void RandomBinom(Int32 An, Double P, TMtxVecInt results, Int32 Seed)

Binomial distribution random generator.

#NameTypeDescription
1AnInt32
2PDoublescalar
3resultsTMtxVecIntsource TVecInt or TMtxInt
4SeedInt32

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
using Dew.Math;
using Dew.Stats.Units;
namespace Dew.Examples
{
    private void Example()
    {
        VectorInt r = new VectorInt(2000);
        StatRandom.RandomBinom(4, 0.2, r,-1);
    }
}