An algorithm for generating chi random variables

From MaRDI portal





The author searches for an algorithm covering the chi-square distribution down to the Gaussian (normal) or gamma (i.e. one degree of freedom), which has a simple initialization part for any degree, suited for repeated calls with ever changing degree \(\alpha\) ; as needed for Wishart distribution using Bartlett decomposition. The presented algorithm is a combined acception-rejection algorithm, based on the quotient of two random variables uniform in 0...1 resp. \(v_-...v_+\), where the v's are derived from \(\alpha\) by some constant initializing arithmetic, mainly in \(\sqrt{\alpha -1}.\) The acception condition uses a closely minorizing function (with a jump at zero); the rejection is based on a broader majorant for the limiting Gaussian and a second test on the actual chi-square distribution. The gain in performance results from the acceptance test, which does not require computation of the actual distribution. Comparisons with earlier (and somewhat similar, and also different) algorithms are given and show the improvement in performance against the only earlier one meeting the requirements, by a table of used machine time in appropriate test runs. The actual formulae within the statements of the presented program require verification.











This page was built for publication: An algorithm for generating chi random variables

Report a bug (only for logged in users!)Click here to report a bug for this page (MaRDI item Q3030105)