For a nonnegative integrable function with integral , its ratio-of-uniforms region has area . A uniform point in the region transforms under with Jacobian determinant ; integrating over gives density . A rectangle containing the region gives a practical rejection sampling algorithm using only uniform random variables, with acceptance .
For the unnormalized Laplace distribution probability density function , the ratio-of-uniforms method uses . The maximum of is one. On , the maximum of occurs at and equals . On , it occurs at and equals . Thus the displayed rectangle contains the region. Its area is , while the target region has area . Uniform proposals in the rectangle, accepted when , therefore return the correct Laplace distribution with acceptance probability .
For the unnormalized normal density , the smallest axis-aligned envelope is and . The boundary reaches that width at . Region area is , so the acceptance rate is , independently of . Multiplying by a positive constant rescales both coordinates and their areas consistently.
A finite bounding rectangle exists when and are bounded. This is not automatic for every probability density function: tails proportional to give an unbounded second coordinate. In principle any finite-area measurable region has an open envelope of finite area, decomposable up to null boundaries into disjoint dyadic rectangles. Select a rectangle with probability proportional to its area, then sample its two coordinates uniformly and reject outside the target region. The accepted point is uniform on the region, with acceptance equal to the ratio of their areas. Constructing an effective envelope remains a density-specific computational step.

Articles by others on the same topic (0)

There are currently no matching articles.