chapter fifteen
15 Sampling continuous distributions
This chapter covers
- Special-purpose algorithms for uniform and normal distributions
- The inverse transform algorithm
- The rejection-sampling algorithm
So far in this part of the book, you’ve seen how to do two important things with categorical distributions: generate random samples that conform to a desired distribution and apply Bayesian reasoning to correctly interpret how observed evidence should change our prior beliefs. In the last two chapters of the book, you’ll look at the harder problem of doing the same two things for one-dimensional continuous distributions, which are random distributions of real numbers. This chapter discusses special-purpose techniques for sampling from particular continuous distributions. Chapter 16 shows how to apply Bayes’ theorem to continuous distributions.