Introduction
Many quantities in ML are expectations that are impossible to compute exactly: the expected loss over all possible data, an integral over a posterior, the gradient of an expectation in a VAE or in reinforcement learning. Monte Carlo estimation replaces the exact integral with an average over random samples. Every mini-batch gradient is a Monte Carlo estimate.