Monte Carlo estimate of pi and its error
Question
How can you estimate with a Monte Carlo simulation, and how does the error shrink with the number of samples?
Short answer
Draw uniformly in the unit square and multiply the fraction with by . The quarter disc has area , so each point is a Bernoulli trial with that success probability. The estimator's standard deviation is , so error falls like .
Adapted from Zhou, A Practical Guide to Quantitative Finance Interviews, sec. 7.3 Numerical Methods, 'Monte Carlo simulation E', p.187; question and answer rewritten by SelfMadeQuant.com.
See the hint and the full worked solution in the question bank (free account).
Open the worked solutionLessons behind this question
- Root-Finding and Numerical Integration
- Applications — Monte Carlo Estimation, Error, and Confidence Intervals
- Algorithms, Growth Rates, and Asymptotic Notation
Start with a free lesson: Basic Statistics and Regression is part of a free topic. Create a free account, no card needed, to read it in full with worked solutions.
Read it free