Rejection Method
Study guide: Exam MAS-I
The Rejection Method (acceptance–rejection method) simulates a draw from a density f that is hard to invert by drawing candidates Y from an easier density g and accepting each candidate with probability f(Y)/\bigl(c\,g(Y)\bigr), where the constant c bounds the ratio f/g.
c \geq \max_x \frac{f(x)}{g(x)}
\text{accept } X = Y \text{ if } U \leq \frac{f(Y)}{c\,g(Y)}
- The algorithm: (1) generate
Yfromg; (2) generateUfrom a Uniform(0,1)distribution, independent ofY; (3) ifU \leq f(Y)/\bigl(c\,g(Y)\bigr), accept and setX = Y, otherwise return to step 1. An accepted value has density exactlyf. - Efficiency: each pass accepts with probability
1/c, so the number of passesNneeded for oneXis geometric with success probability1/c, andE[N] = c. The smallest valid constant,c = \max_x f(x)/g(x), is therefore the best one; it is always at least 1, and the closergis tof, the closercis to 1. - With
guniform on(0, 1):g(x) = 1, socis the maximum of the density,c = \max_x f(x), found by settingf'(x) = 0. The acceptance test isU \leq f(Y)/c. - When to use it: when
F^{-1}has no closed form, so the Inversion Method is unavailable forfitself; the candidatesYare usually generated fromgby inversion. - Discrete case: identical, with probability mass functions in place of densities: accept
YifU \leq p(Y)/\bigl(c\,q(Y)\bigr), wherec \geq \max_k p(k)/q(k).
Rejection Sampling a Beta Loss Ratio The proportion
Xof a policy's premium paid out in losses has densityf(x) = 20x(1 - x)^3for0 < x < 1. It is simulated by the rejection method withg(x) = 1on(0, 1).(a) Find the smallest valid
c, the probability that a pass is accepted, and the expected number of passes per simulated value.(b) Two passes produce the pairs
(Y, U) = (0.30,\ 0.80)and(0.70,\ 0.20). Which candidates are accepted?Answer (a) Maximise
f:f'(x) = 20(1-x)^2(1 - 4x) = 0givesx = \frac{1}{4}, so\begin{align*} c &= f\!\left(\tfrac{1}{4}\right) \\ &= 20\left(\tfrac{1}{4}\right)\left(\tfrac{3}{4}\right)^3 \\ &= \tfrac{135}{64} \\ &\approx 2.109 \end{align*}Each pass is accepted with probability
1/c = 64/135 \approx 0.474, and on averagec \approx 2.11passes are needed per value.(b) The acceptance test is
U \leq f(Y)/c = \frac{256}{27}\,Y(1 - Y)^3.
Y = 0.30:\frac{256}{27}(0.30)(0.70)^3 = 0.9756, and0.80 \leq 0.9756, so it is accepted:X = 0.30.Y = 0.70:\frac{256}{27}(0.70)(0.30)^3 = 0.1792, and0.20 > 0.1792, so it is rejected.
Simulating a Gamma Severity from an Exponential Claim sizes (in thousands) have the gamma density
f(x) = x e^{-x},x > 0. Candidates are drawn from the exponential density with mean 2,g(x) = \frac{1}{2}e^{-x/2}, by inversion.(a) Find the smallest valid
cand the expected number of passes per simulated claim.(b) A pass draws
u_1 = 0.60for the candidate andu_2 = 0.95for the test. What is the result?Answer (a) The ratio is
f(x)/g(x) = 2x e^{-x/2}. Its derivative(2 - x)e^{-x/2}is zero atx = 2, so\begin{align*} c &= 2(2)e^{-1} \\ &= 4/e \\ &\approx 1.4715 \end{align*}On average
1.47passes are needed per claim (acceptance probabilitye/4 \approx 0.680).(b) By inversion,
Y = -2\ln(1 - 0.60) = 1.8326. The acceptance threshold is\begin{align*} \frac{f(Y)}{c\,g(Y)} &= \frac{Y}{2}\,e^{1 - Y/2} \\ &= 0.9163\,e^{0.0837} \\ &= 0.9963 \end{align*}Since
0.95 \leq 0.9963, the candidate is accepted: the simulated claim is1.8326, or about $1,833.