Question 11.EX.3: Give a method for simulating a hypergeometric random variabl......

Give a method for simulating a hypergeometric random variable.

The blue check mark means that this solution has been answered and checked by an expert. This guarantees that the final answer is accurate.
Learn more on how we answer questions.

If a random sample of size n is chosen from a set of N + M items of which N are acceptable, then X, the number of acceptable items in the sample, is such that

P\{X=k\}=\left(\begin{array}{l}N\\k\end{array}\right)\left(\begin{array}{c}M \\n-k\end{array}\right)\bigg/\left(\begin{array}{c}N+M \\k\end{array}\right)

To simulate X, note that if

I_{j}= \begin{cases}1, & \text { if the } j \text { th selection is acceptable } \\ 0, & \text { otherwise }\end{cases}

then

P\left\{I_{j}=1|I_{1}, \ldots, I_{j-1}\right\}=\frac{N-\sum_{1}^{j-1} I_{i}}{N+M-(j-1)}

Hence, we can simulate I1, . . . , In by generating random numbers U1, . . . ,Un and then setting

I_{j}= \begin{cases}1, & \text { if } U_{j}<\frac{N-\sum_{1}^{j-1} I_{i}}{N+M-(j-1)} \\ 0, & \text { otherwise }\end{cases}

and X=\sum_{j=1}^{n} I_{j} has the desired distribution. Another way is to let

X_{j}= \begin{cases}1, & \text { the } j \text { th acceptable item is in the sample } \\ 0, & \text { otherwise }\end{cases}

and then simulate X1, . . . , XN by generating random numbers U1, . . . ,UN and then setting

X_{j}= \begin{cases}1, & \text { if } U_{j}<\frac{n-\sum_{i=1}^{j-1} X_{i}}{N+M-(j-1)} \\ 0, & \text { otherwise }\end{cases}

and X=\sum_{j=1}^{N} X_{j} then has the desired distribution. The former method is preferable when n ≤ N and the latter when N ≤ n.

Related Answered Questions

Question: 11.EX.32

Verified Answer:

\begin{aligned}\operatorname{Var}[(X+Y) / 2...
Question: 11.EX.23

Verified Answer:

Let m(t)=\int_{0}^{t} \lambda(s)\, d s[/lat...
Question: 11.EX.16

Verified Answer:

(a) They can be simulated in the same sequential f...
Question: 11.EX.6

Verified Answer:

Let \begin{aligned}& c(\lambda)=\max _{...
Question: 11.EX.1

Verified Answer:

(a) Let U be a random number. If \sum_{j=1}...