Gaussian sampling—that is, generating samples from a Gaussian distribution—appears in many cutting-edge fields of data science, such as Gaussian process, variational autoencoders, or generative adversarial networks. As a result, you often see functions like tf.random.normal in their tutorials.
But, deep down, how does a computer know how to generate Gaussian samples? This project will show 3 different ways that we can program our computer (via Python) to do so. You will also see how R and Python generate Gaussian samples using modified versions of some of these methods.
- Part 1: Generate Gaussian samples using inverse transform sampling: code, write-up
- Part 2: Generate Gaussian samples using Box-Muller transform: code, write-up
- Part 3: Generate Gaussian samples using central limit theorem and transform Gaussian samples to have any means, variances and covariance: code, write-up