Suppose is a target probability density and is a proposal density with . Draw and an independent , and accept whenThe accepted value has density , the acceptance probability is , and the expected number of proposals is .
Stopping after a fixed number of rejection sampling proposals preserves the target law of accepted labels, conditional on the number accepted. Stopping instead after a fixed amount of elapsed computing time can change the finite-sample law if processing costs depend on the proposed state. The deadline may censor precisely the expensive states.
For an exact counterexample, let both target and proposal be uniform on two states, so every proposal is accepted. Let processing cost be one time unit for the first state and two for the second. Stop between one and two units and retain only finished proposals. Conditional on obtaining an output, the first state is the only possible value, despite its target probability being one half. This proves that a runtime cutoff need not be an unbiased stopping rule for the realized finite output. It does not imply asymptotic bias of the indefinitely growing completed sequence; it identifies a finite-horizon censoring effect.
Consider independent rejection sampling trials with proposal density , accepted-value density , acceptance probability and rejection probability . Splitting the proposal law by its accept/reject outcome gives , where is the rejected-proposal distribution.
If an algorithm permits trials, returns the first accepted value when one occurs, and otherwise returns the final rejected proposal, its output density is the displayed mixture. The event of failures has probability and gives the conditional law ; every successful stopping trial gives law . Hence the forced return introduces bias unless , and its contribution decays geometrically with the cap. Conditional on success before any specified trial, the output still has law , since accepted value and successful-trial index are independent.
For a Poisson distribution target of mean and a geometric distribution proposal with probability mass function on the nonnegative integers, the tight rejection sampling envelope isSuccessive target-to-proposal ratios have ratio , proving this maximizing index. The function is the maximum of the convex functions . Within a branch its derivative is .
Writing , the optimum is , and the success parameter is . For , is a branch boundary; the left and right derivatives are nonpositive and nonnegative respectively. For , the active branch has a zero derivative at , including a tie at the upper endpoint. Convexity proves global optimality. The minimum expected proposal count is ; no claim about machine-specific instruction costs is implied.
Draw proposals with probability density function or probability mass function , independently draw from the uniform distribution on , and repeat until for a nonnegative threshold . The actual acceptance probability given is . If , the returned probability distribution has density or mass . Indeed the joint law of a proposal and acceptance has density or mass , and conditioning on acceptance divides by . Summing over failed trials gives the same law and expected trial count . Thresholds exceeding one cannot be used as unbounded reweighting factors.
A lower envelope can save evaluations of an expensive unnormalized target in rejection sampling. Draw with probability density function and an independent uniform distribution value . Accept immediately if . Otherwise draw a fresh independent uniform distribution value and accept ifFor a fixed proposal, writing , and gives total acceptance probability . If , the first stage accepts with probability one and the residual test is skipped. Thus the accepted probability density function is , and the overall acceptance probability is . The probability of avoiding a target evaluation on one proposal is .
If , and for a proposal probability density function , accept a proposal when an independent uniform distribution value is at most . Integrating the joint acceptance probability density function gives and conditional accepted probability density function . For independent proposals the accepted count has binomial distribution with parameters .
For target density proportional to on , use the Pareto distribution proposal with . Its density ratio is proportional to , maximized at if that point exceeds . The tight envelope yields the highest acceptance probability for this fixed proposal. An inverse draw is with uniformly distributed on .
For , the maximum of on occurs at . If one parameter is one, the maximum is attained at the corresponding endpoint; if both are one, is constant. Let . Accept an independent uniform distribution proposal when another uniform draw is at most . The accepted probability density function is the beta distribution, and acceptance probability is .
With proper prior independent of the neutral Kingman's coalescent times, propose from their joint prior and accept with probability . The accepted density is proportional to the prior times the observed-count likelihood, hence is the posterior given . The acceptance rate is the prior predictive probability . For , divide the acceptance function by its maximum , achieved at , to improve the rate to without altering the accepted distribution. For , .
For a proper prior distribution independent of coalescent times , let with and . Observing under an infinite sites mutation model gives posterior density , where is the prior predictive probability of . Multiplication by the conditional Poisson mass and normalization is an application of Bayes' theorem.
// Target: statistical-inference.bigb
Accepting a fresh uniform deck permutation with a probability depending only on whether its endpoint ranks match preserves uniform individual rank marginals by symmetry. It changes their joint law. For four cards of each of thirteen ranks and rejection probability on a mismatch, the accepted matching probability is . The two accepted ranks are independent precisely at ; equality of marginals alone does not imply independence.
Write . Against an exponential distribution proposal of mean , the chi-squared distribution density has envelope constant . The density ratio divided by is . Thus generate and accept when for independent uniform distributions. The inequality validates the acceptance probability. The accepted probability density function is the target because rejection sampling weights the proposal by its target-to-envelope ratio.
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.
For the half-normal distribution, the density ratio to is maximized at . Completing the square gives the envelope constant above and acceptance probability . Its logarithmic derivative is , so the optimal rate is . Give an accepted nonnegative value an independent fair sign to obtain the standard normal distribution. The expected number of proposals is , while the probability of rejecting one proposal is ; these are different quantities.
Reject pairs of independent uniform coordinates from the square until their squared radius lies in . Multiply each coordinate by to obtain two independent variables with the standard normal distribution. Squaring either gives a chi-squared variable with one degree of freedom.
For n independent proposals and an envelope constant , each rejection decision succeeds with probability . The accepted count is Bin(n,1/M). Conditional on any acceptance pattern, the accepted values have independent target density f; summing over patterns preserves that product law conditional on the count. The empty-output probability is .
For rejection sampling with acceptance probability , , the accepted count in trials has binomial distribution, mean and variance . To obtain at least acceptances with approximate probability , use the standard normal distribution quantile . The central limit theorem without continuity correction gives . Solving this quadratic inequality in gives the displayed threshold, rounded upward. It exceeds the average stopping cost because it allows for fluctuations in the accepted count. For , the count is deterministic and exactly. Exact coverage uses the binomial distribution tail rather than the approximation.
Conditional iid accepted values have the ordinary target-sample CLT at scale . Since , the same estimator has asymptotic variance at scale . The centered count has limiting variance . Any fixed convention on an empty output is asymptotically negligible.
With normalized densities and envelope , , conditioning a proposal on rejection gives density . It can be used as an importance sampling proposal only if it covers the relevant target support. If on a set of positive target mass, rejected draws never visit that set.
Adaptive rejection sampling builds a piecewise linear upper envelope for a differentiable log-concave probability density, samples from its piecewise exponential form, and accepts with the target-to-envelope ratio. Adding evaluated points improves the envelope without changing the target distribution. Initial tangent slopes must yield integrable tails. The accepted draws are exact samples, unlike a finite run of Markov chain Monte Carlo.
Articles by others on the same topic
There are currently no matching articles.