An algorithm for generating chi random variables
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.
- Algorithm for calculating the noncentral chi-square distribution
- A Complete Guide to Gamma Variate Generation
- A new fast method for computer generation of gamma and beta random variables by transformations of uniform variables
- Generating gamma variates
- An efficient algorithm for computing quantiles of the noncentral chi-squared distribution.
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)