Skip to content
Glacius
ProbabilityConcept reference

Monte Carlo estimation

A Monte Carlo estimate averages the requested function over IID draws from the target distribution.

On this page 8 sections
  1. Overview
  2. Understand the idea
  3. Repeated simulated values count each time they appear
  4. A closer look
  5. A closer look
  6. Key takeaway
  7. Sources & further reading
  8. Concept connections

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 E[g(X)]E[g(X)] by drawing independently from the target distribution and averaging the transformed draws:

m^=1ni=1ng(Xi)\hat m=\frac1n\sum_{i=1}^n g(X_i)

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.

IID target draws −2,1,3 give squared payoffs 4,1,9. The mean 14/3≈4.6667 is the Monte Carlo estimate of E[X²], not a known exact expectation.IID target draws −2,1,3 give squared payoffs 4,1,9. The mean 14/3≈4.6667 is the Monte Carlo estimate of E[X²], not a known exact expectation.
Figure 1IID target draws −2,1,3 give squared payoffs 4,1,9. The mean 14/3≈4.6667 is the Monte Carlo estimate of E[X²], not a known exact expectation.
Link to this figure ↗Download SVGDownload PNG

To estimate a probability, turn each draw into an indicator: 1 if the event occurs and 0 otherwise. For outcomes (1,0,1,1,0)(1,0,1,1,0), the estimate is 3/5=0.63/5=0.6. To estimate a transformed expectation instead, average the transformed outputs; applying a nonlinear function only after averaging estimates a different quantity.

Check your reasoning

IID target draws: 2,2,4,82, 2, 4, 8. Estimate E[X]E[X] by Monte Carlo.

Show answer and explanation
4

Sum 1616 divided by 44 gives 44.

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.

Check your reasoning

IID target draws: 3,1,1,3-3, 1, 1, 3. Payoff g(x)=x2g(x)=x^2. Estimate E[g(X)]E[g(X)] by Monte Carlo.

Show answer and explanation
5

Squared payoffs: 9, 1, 1, 9. Sum 2020 divided by 44 gives 55.

03A closer look#

For IID draws with finite variance of g(X)g(X), 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.

Check your reasoning

Target mean 1; IID Q draws, finite variance, EQ[X]=4E_Q[X]=4. Limit of their average?

  1. A11
  2. B44
  3. C2.52.5
Show answer and explanation
44

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.

Key takeaway

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. [1]

Reference this concept

Link to this page, a section, or an individual figure.

Glacius. “Monte Carlo estimation.” Math behind ML. /learn/p-monte-carlo