Random numbers from the chi-squared distribution. Equivalent to R's rchisq().
rchisq()
Number of values to generate (fractions are truncated, as in R).
Degrees of freedom.
Optional
Non-centrality parameter. If omitted, the central distribution is used.
An array of n values; NaN for invalid parameters.
n
NaN
setSeed(1);rchisq(2, 3); // [0.9433146, 5.543782]rchisq(2, 3, { ncp: 1 }); Copy
setSeed(1);rchisq(2, 3); // [0.9433146, 5.543782]rchisq(2, 3, { ncp: 1 });
Random numbers from the chi-squared distribution. Equivalent to R's
rchisq().