552 ANSWERS TO EXERCISES 3.4.1 Bl. [Initialize.] Set (Web site design)

552 ANSWERS TO EXERCISES 3.4.1 Bl. [Initialize.] Set N +-0, q + pt, r +-q, and generate a random uniform deviate U. (We will have q = pN and r = po + . . . + pN during this algorithm, which stops as soon as U < r.) B2. [Search.] If ZJ 2 r, set N +-- N + 1, q t q(l -p)(t -1 $ N)/iV, r +-r $ q, and repeat this step. m [An interesting technique for the negative binomial distribution, for arbitrarily large real values of t, has been suggested by R. L6ger: First generate a random gamma deviate X of order t, then let iV be a random Poisson deviate of mean X(1 -p)/p.] 20. Rl = 1 + (1 -A/R) . Rl. When R2 is performed, the algorithm terminates with probability I/R; when R3 is performed, it goes to Rl with probability E/R. We have Rl RIA RIA RIA WA R2 0 WA 0 RIA R3 0 0 WA R/A -I/A R4 WA R/A -I/A R/A-E/A R/A -I/A -E/A 21. R = fi z 1.71153; A = fl F=Z1.25331. Since Ju&=&i du = (a -b~)~ ( $(a -bu) -3)/b2, we have I = soaib ud= du = =a 5f2/b2 where a = 4(1 + In c) and b = 4 4c; when c = e114, I has its maximum value g fi Z=Z 1.13020. Finally the following integration formulas are needed for E: JJbu--au2du = ib2a-3/2arcsin(2ua/b -1) + $ba- dn(2ua/b -l), Jdwdu= -&b2a-3f21n(~~+u&+b/2JSi) + +ba- dv(2ua/b + l), where a, b > 0. Let the test in step R3 be X2 2 4e - /U -4x ; then the exterior region hits the top of the rectangle when u = T(X) = (eZ -de2= -2es)/2ez. (Incidentally, T(Z) reaches its maximum value at z = l/2, a point where it is not, differentiable!) We have E = ~~ (~ -m) du where b = 4eZe1 and a = 4x. The maximum value of E occurs near x = –.35, where we have E FZ .29410. 22. (Solution by G. Marsaglia.) Consider the continuous Poisson distribution de- fined by G(s) = s, emttz- dt/r(z), for z > 0; if X has this distribution then 1×1 is Poisson distributed, since G(z + 1) -G(z) = e- @Z/s!. If p is large, G is approximately normal, hence G-l(F,(x)) is approximately linear, where F,(Z) is the distribution function for a normal deviate with mean and variance p; i.e., Fp(z) = F((x -~)ldF), w here F(z) is the normal distribution function (10). Let g(x) be an efficiently computable function such that IG- (F,(x)) -g(x)/ < 6 for -co < 3: < 00; we can now generate Poisson deviates efficiently as follows: Generate a normal deviate X,andset~tg(~++X),Nt~YJ,M~~Y+~~.If(Y-~~>~,outputN; otherwise output M -1 or M, according as G- (F(X)) < M or not.
Check Tomcat Web Hosting services for best quality webspace to host your web application.

Leave a Reply