Algorithm Rejection Sampling
We want to sample from PDF , but this is difficult to do. Suppose we have proposed PDF , then we can:

  1. Generate from
  2. Accept with probability
    Or equivalently,
  3. Generate from
  4. Generate from
  5. Accept if
    where we require for all . For efficiency, we can let .
    rejSamp|500