Previous | Next --- Slide 29 of 38
Back to Lecture Thumbnails
JavaSwing

Can't you also generate P without knowing the inverse CDF using the accept-reject method? I.e., given the max value of the pdf for P, M, we can do: Generate Y ~ Uniform(a,b) where [a,b] is the support for P. With probability (b-a)p(y)/M accept the sample. Otherwise, generate a new Y and repeat.