Monte Carlo
Estimation
Harness the power of random sampling to estimate integrals, probabilities, and expectations—and learn how variance reduction makes it practical.
What Is Monte Carlo Estimation?
Monte Carlo estimation uses random sampling to approximate quantities that may be deterministic but difficult to compute analytically. The core idea: draw \( N \) independent samples \( X_1, X_2, \dots, X_N \) from a distribution, then use a sample average as your estimator.
A Brief History
The method was formalized during the Manhattan Project (1940s) by Stanislaw Ulam and John von Neumann. They needed to simulate neutron diffusion through shielding materials—a problem with too many dimensions for analytical solutions.
Today, Monte Carlo methods underpin Bayesian inference (MCMC), financial derivatives pricing (Black-Scholes simulations), particle physics, and machine learning (stochastic gradient descent, variational inference).
The Big Picture
The Fundamental Theorem
The convergence rate is \( O(N^{-1/2}) \) regardless of dimension. By the Central Limit Theorem:
General Expectation Form
More generally, for any distribution \( f(x) \), to estimate \( \theta = \mathbb{E}_f[g(X)] = \int g(x) f(x)\,dx \):
Monte Carlo vs Numerical Quadrature
| Monte Carlo | Quadrature | |
|---|---|---|
| Convergence rate | \( O(N^{-1/2}) \) | \( O(N^{-k/d}) \) |
| Dimension dependence | None | Exponential (curse) |
| Smoothness required | Only finite variance | High regularity (\( C^k \)) |
| Error estimate | Built-in (CLT) | Requires bounds on derivatives |
| Best for dimensions | \( d \ge 4 \) | \( d \le 3 \) |
Why Variance Reduction?
The Monte Carlo error is \( \text{SE} = \sigma_g / \sqrt{N} \). To halve the error, you need four times the samples. Variance reduction techniques achieve lower variance per sample, effectively multiplying your computational budget.
Key Variance Reduction Techniques
How to Apply Monte Carlo
Example 1: Estimating \( \pi \)
We want to estimate \( \pi \) using the quarter-circle method. The area of the quarter circle of radius 1 inside the unit square is \( \pi/4 \).
Example 2: Estimating \( \int_0^1 e^x \, dx \)
We know the answer analytically: \( e - 1 \approx 1.71828 \). Let's see how Monte Carlo performs.
Example 3: Antithetic Variates for \( \int_0^1 e^x \, dx \)
Instead of \( N \) independent draws, pair each \( U_i \) with \( 1 - U_i \). This creates negatively correlated pairs that cancel out variation.
Importance Sampling in Detail
Control Variates Method
Common Mistakes
Summary of VR Techniques
| Technique | Mechanism | Typical Reduction |
|---|---|---|
| Antithetic Variates | Negative correlation via \( U, 1-U \) | 50–99% |
| Control Variates | Subtract correlated known-mean | Up to \( \rho^2 \times 100\% \) |
| Importance Sampling | Re-weight under better \( q \) | Arbitrary (if \( q \) is good) |
| Stratified Sampling | Partition domain, sample each | Removes between-strata var |
| Rao-Blackwellization | Analytically integrate one variable | Always improves (by Rao-Blackwell thm) |
Question 1 of 5
The standard Monte Carlo estimator \( \hat{\theta}_N = \frac{1}{N}\sum g(X_i) \) has a convergence rate of:
Question 2 of 5
To halve the standard error of a Monte Carlo estimate, you need to multiply the sample size by:
Question 3 of 5
In the antithetic variates method, pairing \( U \) with \( 1 - U \) works because:
Question 4 of 5
In importance sampling, the optimal zero-variance proposal \( q^*(x) \) is proportional to:
Question 5 of 5
Which statement about Monte Carlo vs. deterministic quadrature is correct?