Dew Stats Master .NET
RandomChiSquare Routine
Summary
ChiSquared distribution random generator.

Unit
StatRandom

Declaration
Procedure RandomChiSquare(ANu: Integer; Results: TDenseMtxVec; Seed: Integer = -1);

Description
This routine generates Result.Length pseudo random numbers, using the chi-squared distribution with parameter ANu. The random numbers are stored in the Results vector. An exception is raised if Result vector is complex.
Categories
Random number generators

Example 1

Generate 2000 random numbers by using the chi-squared distribution with parameter Nu=7.

Uses MtxExpr, StatRandom; procedure Example; var Res: Vector; begin Res.Size(2000); RandomChiSquare(7, Res); end;
#include "MtxVecCpp.h" #include "StatRandom.hpp" void __fastcall Example() { Vector Res; Res->Size(2000,false); RandomChiSquare(7, Res,-1); }
using Dew.Math; using Dew.Stats.Units; namespace Dew.Examples { private void Example() { Vector r = new Vector(2000,false); StatRandom.RandomChiSquare(7, r,-1); } }


Copyright 2008 Dew Research
http://www.dewresearch.com