easy   Probability

Acceptance-Rejection Sampling

A release-checked easy problem for training Beta, Geometric/Negative Binomial.

Question

Suppose that we want to sample from a random variable $X$ with bounded PDF $f(x)$ that is supported on $(0,1)$. One way to do this to sample uniformly at random a pair $(X,Y)$ in the plane from a rectangle $R_h = (0,1) \times (0,h)$ for some $h > 0$. The point $(X,Y)$ will be counted as a valid sample if $(X,Y)$ lies between the $x-$axis and the graph of $f(x)$ in the plane. Otherwise, the sample is considered invalid and is rejected. It can be shown that, for $h$ appropriately selected, $X$ in the pair $(X,Y)$ has marginal PDF $f(x)$. Find the value of $h$ that minimizes the expected number of draws that need to be performed to obtain a valid sample for $X \sim \bet{4}{2}$.

Practice focus

This Probability problem is tagged Beta, Geometric/Negative Binomial. State the random variables and conditioning information explicitly, then check the result against boundary cases before opening hints or a solution.

Reviewed questions in this area

easyBaby BoyReviewed

Probability · SIG, DE Shaw

easyBad BagelReviewed

Probability · SIG, Jane Street