For define the generalized inverse, or quantile function, byIt is finite because the cumulative distribution function tends to zero and one at the two infinities. Monotonicity and right continuity of give the key equivalenceFor the forward implication, choose points in the defining set approaching its infimum from above. Right continuity gives , and then monotonicity gives whenever . The reverse implication follows immediately because then belongs to the defining set. Consequently, for a continuous uniform distribution draw ,This proves inverse transform sampling for discontinuous as well as continuous distribution functions.
There is a minor endpoint defect in the printed codomain. The true quantile endpoint at probability one is , which equals for an unbounded-above normal distribution. Thus it need not be real at one. Use the extended-real value there, or assign an arbitrary finite value at this single probability level. Since , either choice gives the same sampled distribution; the latter supplies a real-valued version on all of . The endpoint has no effect on the inverse-transform law.
For rejection sampling, choose a proposal probability density function that can be sampled and a finite constant with wherever the target has positive mass. Generate independent pairs , with of density and uniform. Accept if ; otherwise discard the pair and repeat with fresh independent draws. At points where both densities vanish the acceptance rule may be defined arbitrarily. For any measurable set ,Thus one trial accepts with probability , and the conditional density given acceptance is . More explicitly, summing over the index of the first accepted proposal givesThe probability of never accepting is zero, since , and the expected number of proposals is . The algorithm terminates almost surely and samples the target density exactly.
Substitute , with , when integrating the target density. Since , its cumulative distribution function isInverting gives the arcsine distribution samplerThe inverse transform sampling proof in the root solution shows that it has the required probability density function. Use successive independent uniforms for successive samples. A draw at the endpoint one can be discarded if values strictly inside the support are desired; this event has probability zero under the ideal continuous uniform distribution.
Group the two terms containing to obtain the mixture distributionThe first component is a Standard Cauchy distribution. The second is normalized becauseFor this symmetric component, let . Its density is , and hence its cumulative distribution function and quantile function areThe independent sign is positive or negative with equal probability. For one sample, use the next three independent uniforms in the given sequence and returnThe Cauchy branch follows from its quantile function, while the other branch follows from the magnitude law and fair sign just derived. Independence of the branch selection and component draws therefore gives exactly the displayed mixture distribution. Discard the zero-probability endpoint draw to keep the computation finite, and use a fresh block of three uniforms for the next sample. This is the symmetric rational mixture sampler.
One can alternatively use the root solution's rejection sampling with a Standard Cauchy distribution proposal. The density ratio is , bounded by because . Accept the Cauchy draw with probability using a fresh independent uniform.
Articles by others on the same topic
There are currently no matching articles.