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}$.