Introduction
Plain Monte Carlo needs samples from the distribution you care about. But sometimes is hard to sample from, or the events you care about are so rare that almost no samples hit them. Importance sampling draws from an easier proposal distribution instead and corrects with weights. It is used for rare-event estimation, off-policy reinforcement learning (learning from another policy's data), and evaluating likelihoods in latent-variable models.