Approximates probabilities or expectations by averaging results across many random simulations.
Monte Carlo estimation is a computational technique that approximates the value of a quantity — such as a probability, expectation, or integral — by generating large numbers of random samples and averaging their outcomes. Rather than solving a problem analytically, which may be intractable or computationally prohibitive, Monte Carlo methods rely on the law of large numbers: as the number of random trials increases, the sample mean converges to the true expected value. The accuracy of the estimate improves with more samples, though at the cost of additional computation.
In machine learning and AI, Monte Carlo estimation appears across a wide range of applications. In reinforcement learning, it is used to estimate the value of states or actions by averaging returns observed across complete episodes, rather than relying on bootstrapped estimates as in temporal-difference methods. In Bayesian inference, Monte Carlo techniques — particularly Markov Chain Monte Carlo (MCMC) — allow practitioners to approximate complex posterior distributions that cannot be computed in closed form. In model evaluation, Monte Carlo cross-validation and simulation-based testing help assess generalization performance under uncertainty.
The technique is especially valuable when dealing with high-dimensional spaces where exhaustive enumeration is impossible. For example, estimating the expected reward of a policy in a stochastic environment, or computing the partition function of a probabilistic graphical model, are tasks where Monte Carlo sampling provides practical approximations. The trade-off is that variance in the estimates can be high with limited samples, motivating variance reduction techniques such as importance sampling, control variates, and quasi-Monte Carlo methods.
Monte Carlo estimation became foundational to modern probabilistic machine learning as models grew more complex and exact inference became infeasible. Its flexibility — requiring only the ability to sample from a distribution, not to evaluate it analytically — makes it broadly applicable across generative models, Bayesian deep learning, and stochastic optimization. It remains one of the most widely used approximation strategies in the field.