  We provide a robust and general algorithm for computing distribution
functions associated to induced orthogonal polynomial measures. We leverage
several tools for orthogonal polynomials to provide a spectrally-accurate
method for a broad class of measures, which is stable for polynomial degrees up
to at least degree 1000. Paired with other standard tools such as a numerical
root-finding algorithm and inverse transform sampling, this provides a
methodology for generating random samples from an induced orthogonal polynomial
measure. Generating samples from this measure is one ingredient in optimal
numerical methods for certain types of multivariate polynomial approximation.
For example, sampling from induced distributions for weighted discrete
least-squares approximation has recently been shown to yield convergence
guarantees with a minimal number of samples. We also provide publicly-available
code that implements the algorithms in this paper for sampling from induced
distributions.
