If I define an arbitrary pdf p[x_] for a arbitrary-dimensional continuous variable x, how can I use Mathematica to create a function that will return a set of n random samples of x with distribution p?
An answer that assumes p[x_] and all of its derivatives are smooth and continuous would be helpful, but an answer that does not assume that would be even better.
RandomVariate[]
work with aProbabilityDistribution[]
built from your PDF? You can always do rejection sampling otherwise. $\endgroup$