Monte Carlo estimation
A Monte Carlo estimate averages the requested function over IID draws from the target distribution.
On this page 8 sections
01Understand the idea#
Monte Carlo estimation uses random samples to approximate a quantity that is hard to calculate directly. If the target is an expectation, evaluate the target function on each draw and average the resulting numbers. The samples must come from the distribution that defines the expectation.
Monte Carlo estimates by drawing independently from the target distribution and averaging the transformed draws:
For a transformed quantity, apply its function to each draw first. Draws −2,1,3 give squared payoffs 4,1,9, whose average is 14/3.
To estimate a probability, turn each draw into an indicator: 1 if the event occurs and 0 otherwise. For outcomes , the estimate is . To estimate a transformed expectation instead, average the transformed outputs; applying a nonlinear function only after averaging estimates a different quantity.
IID target draws: . Estimate by Monte Carlo.
Show answer and explanation
Sum divided by gives .
02Repeated simulated values count each time they appear#
Repeated simulated values count each time they appear. Do not average only the distinct values or multiply each simulated payoff by its model probability again.
For a nonlinear payoff, transforming the sample average can give a different answer. Transform first, then average all simulated payoffs.
IID target draws: . Payoff . Estimate by Monte Carlo.
Show answer and explanation
Squared payoffs: 9, 1, 1, 9. Sum divided by gives .
03A closer look#
For IID draws with finite variance of , the law of large numbers supports convergence to its expectation under the simulated distribution.
More draws reduce simulation variability. They do not fix sampling from the wrong distribution.
Target mean 1; IID Q draws, finite variance, . Limit of their average?
Show answer and explanation
Averages tend to 4.
04A closer look#
Simulated model outcomes can estimate expected cost or failure probability under the chosen model. Simulation error can shrink with more independent draws, but a wrong model can still give a precise estimate of the wrong real-world quantity.
Simulate the target, transform each draw, then average; extra draws do not fix the wrong target.
- Estimate an expectation with a supplied set of independent simulated draws.
Sources & further reading
- [1]Niels Richard Hansen: Computational Statistics with R, Monte Carlo integration ↗Niels Richard Hansen · Article