3.4.1 ANSWERS TO EXERCISES 551 13. (Web server application) Take b,

3.4.1 ANSWERS TO EXERCISES 551 13. Take b, = p3; consider now the problem with pL3 = 0 for each j. In matrix notation, if Y = AX, where A = (a,,), we need AAT = C = (ct3). (In other notation, if Y3 = c alkXk, then the average value of YiY3 is c a,kajk.) If this matrix equation can be solved for A, it can be solved when A is triangular, since A = BU for some orthogonal matrix U and some triangular B, and BBT = C. The desired triangular solution can be obtained by solving the equations ufl = ~11, alla21 = c12, a21 2 + a22 2 = c22, alla31 = c13, a21a31 $-a22a32 = c23, . . , successively for all, a21, ~22, ~31, ~32, etc. [Note: The covariance matrix must be positive semidefinite, since the average value of (c y,Y,) is c c%,y,yj, which must be nonnegative. And there is always a solution when C is positive semidefinite, since C = U- diag(Al, . . . , X,)U, where the eigenvalues X, are nonnegative, and U- diag(&, . . . , &)U is a solution.] 14. F(s/c) if c > 0, a step function if c = 0, and 1 -F(z/c) if c < 0. 15. Distribution s- , Fl(z -t) &72(t). Density s- , fl(l: -t)fi(t) dt. This is called the convolution of the given distributions. 16. It is clear that f(t) 2 cg(t) f or all t as required. Since sooo g(t) dt = 1 we have g(t) = CtaP1 for 0 5 t < 1, Cc-t for t 2 1, where C = ue/(u + e). A random variable with density g is easy to obtain as a mixture of two distributions, Gl(z) = za for 0 5 z < 1, and Gz(s) = 1 -e -% for 5 2 1: Gl. [Initialize.] Set p +-e/(u + e). (This is the probability that G1 should be used.) G2. [Generate G deviate.] Generate independent uniform deviates U, V, where V # 0. If U < p, set X +-V lfa and q + ePX; otherwise set X + 1 -In V and q + X - . (Now X has density g, and q = f(X)/cg(X).) G3. [Reject?] Generate a new uniform deviate U. If U 2 q, return to G2. m The average number of iterations is c = (a + e)/(er(a + 1)) < 1.4. It is possible to streamline this procedure in several ways. First, we can replace V by an exponential deviate Y of mean 1, generated by Algorithm S, say, and then we set X + ePy or X + 1 + Y in the two cases. Moreover, if we set q t pe-* in the first case and q t p + (1 -p)X - in the second, we can use the original U instead of a newly generated one in step G3. Finally if U < p/e we can accept V la immediately, avoiding the calculation of q about 30 percent of the time. 17. (a) F(z) = 1 -(1 -p) , for z 2 0. (b) G(z) = pz/(l -(1 -p)z). (c) Mean l/p, standard deviation m/p. To do the latter calculation, observe that if H(z) = q + (1 -q)z, then H (1) = 1 -q and H (1) + H (1) -(H (1))2 = q(l -q), so the mean and variance of l/H(z) are q -1 and q(q -l), respectively. (See Section 1.2.10.) In this case, q = l/p; the extra factor z in the numerator of G(z) increases the mean by one. 18. Set N c Nl + NZ -1, where N1 and NZ independently have the geometric distribution for probability p. (Consider the generating function.) 19. Set N + N1 +. . . + Nt -t, where the Nj have the geometric distribution for p. (This is the number of failures before the tth success, when a sequence of independent trials are made each of which succeeds with probability p.) Fort=p= f, and in general when the mean value (namely t(1 -p)/p) of the distribution is small, we can simply evaluate the probabilities pn = ( -iWn)p (l -p) consecutively for n = 0, 1, 2, . . . as in the following algorithm:
Please visit Domain Name Hosting services for high quality webhost to host and run your jsp applications.

Leave a Reply