Random numbers from the hypergeometric distribution. Equivalent to R's rhyper().
rhyper()
Number of values to generate.
Number of white balls in the urn.
Number of black balls in the urn.
Number of balls drawn from the urn.
An array of nn values (the number of white balls drawn); NaN for invalid parameters.
nn
NaN
setSeed(1);rhyper(5, 10, 7, 8); // [5, 5, 5, 3, 6] Copy
setSeed(1);rhyper(5, 10, 7, 8); // [5, 5, 5, 3, 6]
Random numbers from the hypergeometric distribution. Equivalent to R's
rhyper().