Acceptance/rejection method:
to sample from a random variable X with p.d.f fX, consider another random
variable Y with pdf fY , such that there exists a constant c > 0 with
fX(x)
fY (x)
≤ c , ∀x with fX(x) > 0 .
• Generate y from the distribution with density function fY .
• Generate u from a uniform (0, 1) distribution.
• If u ≤ fX(y)/(cfY (y)), then take y as the desired realization; otherwise,
return to step 1.
Y should be “easy” to generate and c should be made as small as possible.