RHyper: Simulate random number from the hypergeometric distribution.

Description Usage Arguments Details Value

Description

Generate random integers from the hypergeometric distribution when possible within integer overflow constraints. Otherwise, approximate with the normal distribution.

Usage

1
RHyper(nn, m, n, k)

Arguments

nn

number of observations. If length(nn) > 1, the length is taken to be the number required.

m

the number of white balls in the urn.

n

the number of black balls in the urn.

k

the number of balls drawn from the urn.

Details

The hypergeometric distribution is used for sampling the number of white balls drawn when a fixed number of balls is drawn without replacement from an urn which contains both black and white balls.

Value

Random numbers from the binomial distribution, or its normal approximation. The function will a numeric value, rather than an integer.


google/amss documentation built on May 20, 2019, 5:05 p.m.