1
$\begingroup$

Suppose we have the following PDF of X:

$f(x)=\frac{1}{4}(2-x)\;;-1\leq x\leq 1$

We want to use $g(x)\sim\mathrm{Unif}(-1,1)$ as a proposal density to generate samples from $f(x)$ using a rejection sampling.

Our usual approach will be, to find $M$ such that

$M=Sup_{x\in [-1,1]}\frac{f(x)}{g(x)}$

But we can not calculate it by differentiating $\Phi=\frac{f(x)}{g(x)}$ with respect to $x$ and equating it to 0.

Are there any other possible ways to find the upper bound?

$\endgroup$
1
  • 1
    $\begingroup$ I don't see why not. This derivative check is part of an examination of critical points. It will establish that the only critical points are $\pm 1,$ which both constitute the boundary of the domain of the ratio as well as being where the ratio is not differentiable. $\endgroup$
    – whuber
    Commented Dec 7, 2022 at 4:18

1 Answer 1

1
$\begingroup$

Hint: did you try to plot this density functions? Both are linear functions (on the range $[-1, 1]$) so there is no need for calculus.

enter image description here

So just calculate, with a view on the above plot, $$M = \sup_{x\in [-1,1]} \frac{f(x)}{g(x)} = 2\cdot \sup_{x\in [-1,1]} = 2\cdot \frac34 $$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.