Monte Carlo Simulation with Statistics Follow-Ups
You are asked to estimate the expected value of a complex payoff using Monte Carlo simulation.
- Describe how you would set up a Monte Carlo simulation to estimate $E[f(X)]$ where $X$ follows a known distribution. What determines the accuracy of your estimate?
- After running $N = 10{,}000$ simulations and obtaining a sample mean of $\hat{\mu} = 0.035$ with sample standard deviation $s = 0.12$, construct a 95% confidence interval for the true mean. Is $N$ large enough to distinguish the mean from zero?
- Define Value at Risk ($\text{VaR}$) at level $\alpha$. How would you estimate $\text{VaR}_{0.01}$ from your Monte Carlo sample?
- Name two variance reduction techniques and explain briefly how each one works.
Hints
- Monte Carlo convergence is $O(1/\sqrt{N})$ -- this means to halve the standard error, you need 4x the samples. Use this to compute the standard error from the given sample statistics.
- For the hypothesis test, compute $z = \hat{\mu} / SE$ and compare to 1.96. For VaR, think about order statistics -- sort the simulated losses and pick the right quantile.
- For variance reduction: antithetic variates use the negative correlation between $U$ and - U$; control variates adjust using a correlated quantity with a known expectation.
Worked Solution
How to Think About It: Monte Carlo is the Swiss army knife of quantitative finance -- whenever you cannot evaluate an expectation analytically, you simulate it. The core idea is embarrassingly simple: generate random samples, evaluate the function, and average. The subtlety is all in the error analysis and in making the simulation efficient. An interviewer asking this is testing whether you understand convergence rates, can construct a confidence interval on the fly, and know the standard variance reduction tricks.
Part 1: Setting Up Monte Carlo
To estimate $E[f(X)]$: 1. Draw $N$ independent samples $X_1, X_2, \ldots, X_N$ from the distribution of $X$. 2. Compute $Y_i = f(X_i)$ for each sample. 3. The Monte Carlo estimate is the sample mean: $\hat{\mu}_N = \frac{1}{N} \sum_{i=1}^{N} Y_i$
By the law of large numbers, $\hat{\mu}_N \to E[f(X)]$ as $N \to \infty$. The accuracy is governed by the Central Limit Theorem: $\hat{\mu}_N \approx N\left(E[f(X)],\; \frac{\text{Var}(f(X))}{N}\right)$
The standard error is $\sigma / \sqrt{N}$, so the convergence rate is $O(1/\sqrt{N})$. To halve the error, you need 4x the samples. This $O(1/\sqrt{N})$ rate is dimension-independent, which is why Monte Carlo beats grid methods in high dimensions.
Part 2: Confidence Interval and Hypothesis Test
Given $N = 10{,}000$, $\hat{\mu} = 0.035$, and $s = 0.12$:
The standard error is: $SE = \frac{s}{\sqrt{N}} = \frac{0.12}{\sqrt{10{,}000}} = \frac{0.12}{100} = 0.0012$
The 95% confidence interval is: $\hat{\mu} \pm 1.96 \cdot SE = 0.035 \pm 1.96 \times 0.0012 = 0.035 \pm 0.00235$ $\text{CI} = [0.0326,\; 0.0374]$
To test $H_0: \mu = 0$ vs. $H_1: \mu \neq 0$: $z = \frac{\hat{\mu}}{SE} = \frac{0.035}{0.0012} \approx 29.2$
This is overwhelmingly significant (far beyond the $z_{0.025} = 1.96$ threshold). With 10,000 samples, we can clearly distinguish the mean from zero. The confidence interval does not contain 0, confirming this.
Part 3: Value at Risk
$\text{VaR}_{\alpha}$ is the loss threshold such that the probability of exceeding it is $\alpha$. Formally, if $L$ is the loss distribution: $P(L > \text{VaR}_{\alpha}) = \alpha$
Equivalently, $\text{VaR}_{\alpha}$ is the $(1 - \alpha)$-quantile of the loss distribution.
For a normal distribution with mean $\mu$ and standard deviation $\sigma$: $\text{VaR}_{\alpha} = \mu + z_{1-\alpha} \cdot \sigma$
where $z_{1-\alpha}$ is the corresponding standard normal quantile (e.g., $z_{0.99} \approx 2.326$).
Monte Carlo estimation of $\text{VaR}_{0.01}$: Sort the $N$ simulated losses in ascending order. The $\text{VaR}_{0.01}$ estimate is the $(0.99 \times N)$-th value, i.e., the 9,900th largest loss. With $N = 10{,}000$, this means the 100th worst loss, which has moderate sampling error. For more precise tail estimates, you would want more samples or use importance sampling.
Part 4: Variance Reduction Techniques
- Antithetic variates: For each uniform draw $U$, also evaluate the payoff at - U$. Since $U$ and- U$ are negatively correlated, their payoff values tend to cancel each other's fluctuations, reducing variance. Works well when $f$ is monotone in the underlying random input.
2. Control variates: Suppose you can compute $E[g(X)]$ analytically for some function $g$ correlated with $f$. Then use: $\hat{\mu}_{\text{CV}} = \hat{\mu}_f - c\,(\hat{\mu}_g - E[g(X)])$ where $c$ is chosen to minimize variance (optimally $c = \text{Cov}(f, g)/\text{Var}(g)$). This adjusts your estimate using the known bias in $g$. The higher the correlation between $f$ and $g$, the bigger the variance reduction.
Other techniques worth mentioning: importance sampling (reweight samples toward the region of interest -- crucial for tail estimation), stratified sampling (partition the sample space and sample proportionally from each stratum).
Answer: Monte Carlo estimates $E[f(X)]$ by averaging $N$ function evaluations at random samples, with standard error $\sigma/\sqrt{N}$. The 95% CI for the given data is approximately $[0.033, 0.037]$, clearly excluding zero. VaR is estimated by the appropriate order statistic of the sorted losses. Antithetic variates and control variates are the two most common variance reduction techniques.
Intuition
Monte Carlo simulation is the backbone of derivatives pricing, risk management, and any situation where closed-form solutions do not exist. The $O(1/\sqrt{N})$ convergence rate looks slow, but it is dimension-independent -- this is why Monte Carlo dominates for high-dimensional problems like path-dependent options or portfolio risk. In lower dimensions, quadrature or PDE methods can be faster.
The practical takeaway for interviews: always pair your Monte Carlo estimate with a confidence interval. A point estimate without error bars is useless. And know that the "last mile" of precision is expensive -- going from 1% error to 0.1% error requires 100x more samples. This is why variance reduction is not just a theoretical nicety; in production, the difference between naive Monte Carlo and well-chosen control variates can be the difference between a simulation that takes minutes and one that takes days.
- Antithetic variates: For each uniform draw $U$, also evaluate the payoff at