## Random Number Generation and Monte Carlo Methods, Second Edition

by James E. Gentle

### Errata and Clarifications

(Many of these were corrected in the second printing.)

• Page 9, line 1b:
Instead of "negative", should be "nonnegative".
• Page 16, Figure 1.3:
Point 14 should be (28,22) and point 15 should be (22,4).
(Thanks to Tom Yost!)
• Page 17, line 2:
Delete 0.35 (there are only 5 lags).
(Thanks to Tom Yost!)
• Page 79, equation (2.13):
The "i" in the second factor in the numerator in the product should be "j".
I should also mention that the product should be interpreted as a 1, if r=0.
• Page 95, last two lines in Table 3.1:
Instead of "0.037037" should be "0.074074" and
instead of "0.370370" should be "0.407407".
(Thanks to Chris Pouliot!)
• Page 105, line 9:
Should be "If u < 1-\pi, then"
• Page 106, line 10:
In the definition of N_k, omit the leading factor, b^{-j}. N_k is just the double sum of the d_{ij}.
• Page 142, first line in Figure 4.16:
y_{i+3} should be y_{i+2} and y_{i+2} should be y_{i+3}.
• Page 181, description of Dagpunar's method for the truncated gamma:
There are three errors:
First, the method using a single exponential majorizing density only applies if the shape parameter, alpha is greater than 1. (For alpha less than 1, a mixture of two exponentials can be used. Second, in the method described here, beta=1; that is, as described, the method is only for a standard truncated gamma. (This is consistent with the previous algorithms on page 179, but the description indicates that this restriction does not apply.)
Third, the "log u1" in step 2 (line 14 of page 181) should be "-log u".
For the case of general beta, remember that the tau is also scaled by beta.
(Thanks to Ted Chang!)
• Page 149, equation on line
The factor exp(x^2/2) should not be present; that is, the joint density should just be
1/sqrt{2\pi}
(Thanks to Ted Chang!)
• Page 191, equation on line 7b:
Should be
x = sigma sqrt ( - 2 log(u) )
(Thanks to Mark Kot!)
• Page 199, line 14 (in step 2 of Algorithm 5.8):
The degrees of freedom should be "n+1-i" (instead of "n-i").
(Thanks to Aki Vehtari!)
• Page 200, Algorithm 5.9:
In Step 5, "w" should be "r", and in step 6, "r" should be "p_k" in both places.
(Thanks to Weijie Cai!)
• Page 202, lines 5 and 11, and 14 and 15:
The u's should be generated from U(-1,1), rather than from U(0,1).
Lines 14 and 15 should be "x_1=u_1" and "x_2=u_2".
(Thanks to Hakan Demirtas!)
• Page 205, equation (5.39):
The limits should also include "\sum x_j \leq 1". Also, in that equation the product and the sum in the normalizing factor extend over j=1,...,d+1, while the product in the function of the x_j extends over j=1,...,d.
(Thanks to Aki Vehtari!)
• Page 206:
The number of variables defined in the equation in line 8 should be d (instead of k), and the parameters in the next line should include \alpha_{d+1} as the last one.
(Thanks to Aki Vehtari!)
• Page 219, Algorithm 6.2:
In step 0, instead of "Set i=n+1", it should be "Set i=n; set w=1".
In step 1, instead of "compute w=u_1^{1/n}", it should be "compute w=wu_1^{1/n}".
In step 3, the instead of "X_{i+s}", it should be "X_{i+s+1}"; that is, the index should be i+s+1 in both places.
In step 3.a. before "go to step 1", should add "set i = i+s+1".
(Thanks to Art Owen!)
• Page 249, line 8b:
The x_i should be y_i, and the x_j should be y_j.
• Page 271, Exercise 7.1:
The true expected value is negative: -0.90501.
( Thanks to Eiji Ishida! )
• Page 293, line 2 in Figure 8.3:
Instead of "rnunif", should be "runif".
( Thanks to Petri Koistinen! )