0
$\begingroup$

I am wondering how is it possible to not be able to sample from a function that is known. E.g. suppose the expression of $f(x)$ is known but we need to approximate it in order to sample from it, why can't we directly do this on $f$?

$\endgroup$
  • 2
    $\begingroup$ When you say function, are you talking about a probability distribution? Can you give an example where you couldn't sample from a known function and had to approximate it? $\endgroup$ – BatWannaBe Jan 31 at 22:47
  • $\begingroup$ Are methodologies such as rejection sampling acceptable means of sampling from a known function (for purposes of your question)? $\endgroup$ – jbowman Jan 31 at 22:54
  • 1
    $\begingroup$ I think you are asking why we need to use methods like rejection sampling if we already know the Probability Density Function (PDF). Simply because you have a PDF and know its exact formula doesn't mean you can generate independent random samples from it. The PDF simply tells you that, given a value $x$, what is the probability of $x$, $P(X=x)$ but it doesn't tell you how to actually generate a representative, independent sample of the $x's$ so that, together, they appear to have come from from the PDF. So using something like rejection sampling allows you to generate iid samples. $\endgroup$ – StatsStudent Jan 31 at 23:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.