01 / 21

Simulation for
Validation

Learn how Monte Carlo simulation can verify whether asymptotic approximations actually hold at finite sample sizes.

Statistics

What Is an Asymptotic Approximation?

In statistics, many results describe the behavior of estimators as the sample size \( n \to \infty \). For example, the Central Limit Theorem tells us that: $$ \sqrt{n}\,(\bar{X}_n - \mu) \xrightarrow{d} N(0,\,\sigma^2) $$ This is an asymptotic result: it is exactly true only in the limit. For any finite \( n \), it is an approximation whose accuracy we must verify.

Why Simulate to Validate?

★ Exact Is Hard
Exact finite-sample distributions are often intractable, with no closed-form expression.
★ Asymptotics Can Fail
Convergence may be slow for skewed, heavy-tailed, or discrete populations: the CLT "kicks in" late.
★ Simulation Is General
Monte Carlo works for any estimator, any data-generating process, without new theory.

The Simulation Pipeline

Choose DGP Known parameters Draw B Samples Each of size n Compute Statistic
\( T_n \) for each sample
Compare Empirical vs. Limit Empirical histogram vs. asymptotic density Simulated Asymptotic

The Central Limit Theorem Revisited

Let \( X_1, X_2, \ldots, X_n \) be i.i.d. with mean \( \mu \) and variance \( \sigma^2 < \infty \). The CLT states:

For finite \( n \), we want to know: how close is the distribution of \( T_n \) to \( N(0,1) \)? The answer depends on the underlying distribution of \( X_i \): normal data converge instantly, while skewed or heavy-tailed data need much larger \( n \).

Another Key Result: the Delta Method

If \( \sqrt{n}\,(\hat{\theta}_n - \theta) \xrightarrow{d} N(0,\,\sigma^2) \), and \( g \) is differentiable with \( g'(\theta) \neq 0 \), then:

The delta method is a first-order asymptotic approximation: it inherits the CLT error plus linearization error from the Taylor expansion. For nonlinear \( g \), the approximation can be poor unless \( n \) is large. Simulation is the natural tool to check.

CLT vs. Delta Method

CLT Delta Method
Applies to Sample mean \( \bar{X}_n \) \( g(\hat{\theta}_n) \) for smooth \( g \)
Conditions i.i.d., finite variance CLT holds + \( g'(\theta) \neq 0 \)
Error sources Finite-sample skew, kurtosis CLT error + linearization error
Convergence rate \( O(n^{-1/2}) \) (Berry-Esseen) Often slower for curved \( g \)
Validation Monte Carlo simulation

How to Run a Validation Study

1
Fix the DGP. Choose a specific distribution (e.g., \( \text{Exp}(\lambda) \)) with known parameters so the true \( \theta \) and \( \sigma^2 \) are known.
2
Choose \( n \) and \( B \). Select sample sizes to study (e.g., \( n \in \{10, 30, 100, 500\} \)) and a large replication count \( B \ge 10{,}000 \).
3
Simulate. For each replication \( b = 1, \ldots, B \): draw \( X_1^{(b)}, \ldots, X_n^{(b)} \) and compute the pivotal statistic \( T_n^{(b)} \).
4
Compare. Overlay the empirical distribution of \( \{T_n^{(b)}\} \) against the asymptotic \( N(0,1) \). Use QQ-plots, histograms, and coverage probabilities.
5
Quantify. Report the empirical rejection rate of a nominal \( \alpha = 0.05 \) test; it should be close to 0.05 if the approximation is adequate.

Example 1: CLT for Exponential Data

Let \( X_i \sim \text{Exp}(1) \), so \( \mu = 1 \), \( \sigma^2 = 1 \). We form

import numpy as np B = 10000; n = 10 T = np.zeros(B) for b in range(B): X = np.random.exponential(1, n) T[b] = np.sqrt(n) * (X.mean() - 1) # Compare T to N(0,1) with a QQ-plot or histogram

Example 1: Results for \( n = 10 \)

QQ-Plot: Simulated Quantiles vs. N(0,1) Theoretical Quantiles Sample Quantiles -3 -2 -1 0 1 2 -3 -2 -1 0 1 2 Positive skew in upper tail

Example 2: Delta Method for \( g(\mu) = e^{\mu} \)

Let \( X_i \sim N(0, 1) \), so \( \mu = 0 \), \( \sigma^2 = 1 \). Set \( g(\mu) = e^{\mu} \). The delta method gives:

But \( g(x) = e^x \) is convex, so by Jensen's inequality \( E[e^{\bar{X}_n}] > e^{E[\bar{X}_n]} = 1 \). The delta method ignores this bias, which can be large for moderate \( n \). We simulate to see how large.

for b in range(B): X = np.random.normal(0, 1, n) T[b] = np.sqrt(n) * (np.exp(X.mean()) - 1) # T should be ~ N(0,1) if delta method is accurate

Checking Coverage Probability

A key diagnostic is the empirical coverage of a nominal \( (1-\alpha) \) confidence interval. If the asymptotic approximation is accurate, the coverage should be close to \( 1 - \alpha \).

Empirical Coverage at Nominal 95% 95% 88% n=10 92% n=30 94.3% n=100 94.9% n=500

Example 3: Likelihood Ratio Test

Under regularity conditions, Wilks' theorem states that under \( H_0 \):

A simulation study draws \( B \) datasets under \( H_0 \), computes the LR statistic each time, and checks whether the empirical rejection rate at level \( \alpha \) matches the nominal \( \alpha \). If the type I error rate is far from 0.05, the \( \chi^2 \) approximation is inadequate.

Controlling Monte Carlo Error

The simulation itself introduces randomness. With \( B \) replications, the Monte Carlo standard error of an estimated probability \( \hat{p} \) is:

\( B = 1{,}000 \)
SE \( \approx 0.007 \): can detect gross failures but not subtle ones.
\( B = 10{,}000 \)
SE \( \approx 0.002 \): standard choice; sufficient for most validation tasks.
\( B = 100{,}000 \)
SE \( \approx 0.0007 \): needed for precise tail probability estimates.

Common Mistakes

✕ Too Few Replications
Using \( B = 100 \) gives huge Monte Carlo error. Always use \( B \ge 5{,}000 \) for rejection rate estimates.
✕ Wrong Pivot
Plugging in \( \hat{\sigma} \) instead of \( \sigma \) changes the limiting distribution: you should match the CI formula you actually use.
✕ Single \( n \) Only
Testing at one sample size tells you nothing about convergence rate. Always sweep across multiple \( n \) values.

Summary of Validation Tools

Diagnostic What It Shows When to Use
Histogram overlay Shape comparison: skew, multimodality First visual check
QQ-plot Tail behavior, systematic deviations Detecting tail discrepancies
Coverage probability CI accuracy at nominal level Validating confidence intervals
Empirical size Type I error rate vs. nominal \( \alpha \) Validating hypothesis tests
KS / CvM test Formal goodness-of-fit statistic Quantitative confirmation

Question 1 of 5

In a simulation study validating the CLT, you generate \( B = 10{,}000 \) replications and estimate the rejection rate of a nominal \( \alpha = 0.05 \) test as \( \hat{p} = 0.048 \). What is the approximate Monte Carlo standard error?

Question 2 of 5

A QQ-plot of simulated \( T_n \) values against \( N(0,1) \) quantiles shows a systematic curve above the reference line in the right tail. What does this indicate?

Question 3 of 5

Which of the following is the primary reason for using multiple sample sizes (e.g., \( n \in \{10, 50, 200, 1000\} \)) in a simulation study?

Question 4 of 5

You are validating the delta method approximation \( \sqrt{n}(e^{\bar{X}_n} - e^{\mu}) \xrightarrow{d} N(0, e^{2\mu}\sigma^2) \). Your simulated confidence intervals have empirical coverage of 89% at the nominal 95% level with \( n = 20 \). The most likely explanation is:

Question 5 of 5

Under Wilks' theorem, \( -2\ln(\Lambda) \xrightarrow{d} \chi^2_k \) under \( H_0 \). In a simulation with \( n = 15 \), the empirical rejection rate at \( \alpha = 0.05 \) is 0.082. With \( B = 10{,}000 \), the MC standard error is about 0.003. Which conclusion is best?