Problem

(a) Demonstrate the validity of the algorithm given in Sec. 8.4.5 for generating from the...

(a) Demonstrate the validity of the algorithm given in Sec. 8.4.5 for generating from the geom(p) distribution. (Hint: For a real number x and an integer i, ⌊x⌋ = i if and only if ix < i + 1.) Also verify (with 1 – U in place of U) that this is the inverse-transform algorithm.


(b) Show that the following algorithm is also valid for generating X ~ geom(p):

1. Let i = 0.


2. Generate U ~ U(0, 1) independent of any previously generated U(0, 1) random variates.


3. If Up, return X = i. Otherwise, replace i by i + 1 and go back to step 2.

Note that if p is large (close to 1), this algorithm is an attractive alternative to the one given in Sec. 8.4.5, since no logarithms are required and early termination is likely.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 8