116 RANDOM NUMBERS 3.4.1 We can do this (Database web hosting)

116 RANDOM NUMBERS 3.4.1 We can do this using (3), if k = 16 and x3 = j for 0 5 j < 16, and if the P and Y tables are set up as follows: pj=oo 4 8 1~111~~~~000 Yj=59 7 4 * 6 * * * 8 4 7 10 6 7 8 (When Pj = 1, y3 is not used.) For example, the value 7 occurs with probability & . ((1 -Pz) + P7 + (1 -PII) + (1 -PI,)) = & as required. It is a peculiar way to throw dice, but the results are indistinguishable from the real thing. B. General methods for continuous distributions. The most general real-valued distribution may be expressed in terms of its distribution function F(x), which specifies the probability that a random quantity X will not exceed x: F(z) = probability that (X 5 x). (4 This function always increases monotonically from zero to one; i.e., F(G) I F(x2), if xl I x2; F(-co) = 0, F(+cm) = 1. (5) Examples of distribution functions are given in Section 3.3.1, Fig. 3. If F(x) is continuous and strictly increasing (so that F(xl) < F(Q) when x1 < x2), it takes on all values between zero and one, and there is an inverse function F-l(y) such that, for 0 < y < 1, Y = F(x) if and only if x = F- (y). (6) In general we can compute a random quantity X with the continuous, strictly increasing distribution F(z) by setting x = F- (U), (7) where U is uniform; this works because the probability that X 5 x is the prob- ability that F-l(U) 2 x, i.e., the probability that U 5 F(x), and this is F(x). The problem now reduces to one of numerical analysis, namely to find good methods for evaluating F- (U) to the desired accuracy. Numerical analysis lies outside the scope of this seminumerical book; yet there are a number of important shortcuts available to speed up this general approach, and we will consider them here. In the first place, if Xr is a random variable having the distribution Fl(x) and if Xz is an independent random variable with the distribution Fz(x), then m&Xl, X2) has the distribution J ~(x)~z(x), min(Xl, X2) has the distribution Fl(x)+Fz(x)–l(x)F2(~). (8) (See exercise 4.) For example, a uniform deviate U has the distribution F(x) = x, for 0 5 x 5 1; if VI, U2, . . . . Ut are independent uniform deviates, then

Leave a Reply