# Sampling from an arbitrary distribution with unknown CDF

I have a continuous distribution whose PDF I know the expression for but whose CDF is difficult to compute analytically. I understand that if I know the CDF value, then I can use inverse transform sampling to sample from the distribution. This would involve drawing from a uniform(0, 1) distribution, finding the corresponding point on the CDF, and inverting the CDF to get the value of the random variable with the corresponding CDF value. Moreover, the PDF is a complicated function whose shape is not always easy to visualize. If I knew the shape, I could easily set up a proposal distribution and employ rejection sampling.

In this scenario, is there any way to generate samples from the distribution given only the expression for the PDF? For example, is evaluating the PDF at thousands of points along its domain, normalizing these probability values, and drawing from a multinomial distribution to get the index of the draw a valid way to draw from this distribution?

• What is the expression for the probability density? – Henry Mar 18 '14 at 6:43
• Is it log-concave? Is it unimodal? Is it everywhere-continuous? Is its first derivative continuous? What do you know about it that we currently don't? If it's unimodal, do you know where the mode is? Is the pdf expensive to compute? – Glen_b Mar 18 '14 at 7:05
• MCMC algorithms are designed to handle this situation. – Xi'an Feb 27 '18 at 19:59