In this lecture, we finish covering tests of uniformity (Chi-squared and Kolmogorov–Smirnov) and independence (autocorrelation and runs (above and below) tests) for pseudo-random number generators (PRNGs). We then move on to discussing the details of inverse-transform sampling for random-variate generation. We cover how to derive a CDF from a piecewise PDF and how to invert a CDF to produce a quantile function fit for random-variate generation. We also discuss the discrete inverse-transform case.