Simulating distribution

Often times it’s much easier to just simulate/ sample from a distribution rather than try to find an analytical solution. Sometimes the integrations needed to marginalize a distribution are impossible. Instead, just generate n realizations from the distribution, and fit a smooth(ish) curve to the histogram. This can ensure an arbitrary level of accuracy since you can decide the number of draws that you want to generate from the distribution.


References