MATH 565 — Fall 2026

Improving Efficiency
Owen, Chapters 8–10 and 15–17

Fred J. Hickernell

October 9, 2026

Course Map

Monte Carlo foundations, methods, and applications
Probability
Statistics
Analysis
Linear
Algebra
(Quasi-)Random
Number Generation
Low
Discrepancy
Discrepancy
Measures
Estimation
Error
Assessment
Variance
Reduction
Importance
Sampling
Density
Estimation
Data-Driven
Error Bounds
Quantitative
Finance

Reducing variance (or variation)
per unit of work

From Sampling to Efficient Estimation

Monte Carlo foundations, methods, and applications
Variance
Reduction

Recap: How we reached target samples \(\vX\) and \(Y = f(\vX)\)

\(\vU\sim\Unif([0,1]^d),\quad \vZ\sim\varrho_{\mathrm{prop}},\quad \vX\sim\varrho_{\mathrm{tar}}\)

Our plan here

Keep \(\mu=\Ex_{\mathrm{tar}}[f(\vX)]\) fixed, using two complementary levers:

  • First, change the contribution: replace \(Y=f(\vX)\) by an equal-mean alternative, such as a transformed or weighted \(Y_{g} = g(\vZ)\), a control variate, or a conditional expectation
  • Then, change how samples are chosen: arrange uniform inputs in antithetic pairs, strata, or low discrepancy patterns before mapping them to target-space samples

Transformations and Importance Sampling

Monte Carlo foundations, methods, and applications
Analysis
Importance
Sampling

Variance and variation reduction

Monte Carlo foundations, methods, and applications
Variance
Reduction

Keep the target quantity, but change its computational representation:

\[\begin{gather*} \vX\sim\varrho_{\mathrm{tar}},\quad Y=f(\vX),\qquad \vZ\sim\varrho_{\mathrm{prop}},\quad Y_g=g(\vZ) \\ \alerttext{And} \quad \mu=\Ex(Y) = \Ex(Y_g) \end{gather*}\]

Two sample means estimate the same \(\mu\):

\[\begin{align*} \hmu_{f,n}&=\frac1n\sum_{i=0}^{n-1}f(\vX_i),& \hmu_{g,n}&=\frac1n\sum_{i=0}^{n-1}g(\vZ_i) \end{align*}\]

  • Change the function, the sampling distribution, or both
  • Seek lower error for comparable computational work
  • Changing only the function gives the special case \(g(\vX)\)
  • Label contributions by method: \(Y_{\mathrm{IS}}\), \(Y_{\mathrm{CV}}\), \(Y_{\mathrm{CMC}}\)

Variance reduction

For IID samples and finite second moments, both sample means are unbiased:

\[\begin{align*} \var(\hmu_{f,n})&=\frac{\var_{\mathrm{tar}}\{f(\vX)\}}n,& \var(\hmu_{g,n})&=\frac{\var_{\mathrm{prop}}\{g(\vZ)\}}n \end{align*}\]

Their MSEs equal their variances; IID RMSE is \(\Order(n^{-1/2})\)

Equal means allow different output distributions and different variances

For randomized low discrepancy inputs, dependence changes the variance formula

Variation reduction for low discrepancy sampling

To compare designs on the unit cube, make the uniform inputs explicit:

\[\begin{align*} \vX&=\vT(\vU),& h_f(\vu)&=f\bigl(\vT(\vu)\bigr),\\ \vZ&=\vS(\vU),& h_g(\vu)&=g\bigl(\vS(\vu)\bigr) \end{align*}\]

Both cube integrands have integral \(\mu\); keep the nodes \(\vu_0,\ldots,\vu_{n-1}\) fixed

For \(h_g\in\mathcal H_K\) and uniform distribution \(F_{\mathrm{unif}}\),

\[ \left|\mu-\frac1n\sum_{i=0}^{n-1}h_g(\vu_i)\right| \le D\bigl(\{\vu_i\}_{i=0}^{n-1},F_{\mathrm{unif}};K\bigr)\norm{h_g}_{\mathcal H_K} \]

  • Nodes determine discrepancy; the composed cube integrand determines variation
  • Seek a smaller \(\norm{h_g}_{\mathcal H_K}\) for the same nodes and kernel

The Keister example

Write the original integral as a target expectation:

\[\begin{gather*} \mu=\int_{\reals^d}\cos(\norm{\vx})\me^{-\norm{\vx}^2}\,\dif\vx =\Ex_{\mathrm{tar}}[f(\vX)],\\ \vX\sim\Norm(\vzero,\mI_d/2),\qquad f(\vx)=\mpi^{d/2}\cos(\norm{\vx}) \end{gather*}\]

Choose \(\vZ_a\sim\Norm(\vzero,\mI_d/a^2)\) and apply a density correction:

\[ g_a(\vz)=\frac{(2\mpi)^{d/2}}{a^d} \cos(\norm{\vz})\exp\bigl[-(1-a^2/2)\norm{\vz}^2\bigr] \]

Every \(a>0\) gives \(\Ex[g_a(\vZ_a)]=\mu\); changing \(a\) changes the contribution

Keister on the unit cube

Set \(\vS_a(\vu)=\bigl(\Phi^{-1}(u_j)/a\bigr)_{j=1}^d\) and \(h_a(\vu)=g_a\bigl(\vS_a(\vu)\bigr)\)

With \(\vq(\vu)=\bigl(\Phi^{-1}(u_j)\bigr)_{j=1}^d\),

\[ h_a(\vu)=\frac{(2\mpi)^{d/2}}{a^d} \cos\bigl(\norm{\vq(\vu)}/a\bigr) \exp\bigl[-(2-a^2)\norm{\vq(\vu)}^2/(2a^2)\bigr] \]

\(\exstar\) Verify \(g_a=f\varrho_{\mathrm{tar}}/\varrho_{\mathrm{prop},a}\) and \(\int_{[0,1]^d}h_a(\vu)\,\dif\vu=\mu\)

  • \(0<a^2\le2\): \(h_a\) is bounded; \(a=\sqrt2\) gives \(g_a=f\)
  • \(2<a^2<4\): \(h_a\) is unbounded but has finite variance, including \(a=1.6\)
  • \(a^2\ge4\): infinite variance

Choose \(a\) by estimator variance or cube-integrand variation

Explore \(a\) in the Keister notebook

Transforming an integral

Monte Carlo foundations, methods, and applications
Analysis
Importance
Sampling

Start with \(\displaystyle \mu=\Ex_{\mathrm{tar}}[f(\vX)]=\int_{\mathcal X}f(\vx)\varrho_{\mathrm{tar}}(\vx)\,\dif\vx\)

Choose an invertible differentiable map \(\vT:\mathcal Z\to\mathcal X\) and \(\vZ\sim\varrho_{\mathrm{prop}}\) covering the required support

\[\begin{align*} g(\vz)&=f\bigl(\vT(\vz)\bigr)w_T(\vz),\\ w_T(\vz)&= \frac{\varrho_{\mathrm{tar}}\bigl(\vT(\vz)\bigr) \left|\det\nabla\vT(\vz)\right|} {\varrho_{\mathrm{prop}}(\vz)} \end{align*}\]

Then \(\mu=\Ex_{\mathrm{prop}}[g(\vZ)]\), where \(\nabla\vT(\vz)\) is the Jacobian matrix of \(\vT\) and \(\left|\det\nabla\vT(\vz)\right|\) is its volume-scaling factor

A general change of variables preserves the integral through a correction weight

Transforming a random variable

An exact transport \(\vT:\mathcal Z\to\mathcal X\) satisfies

\[ \varrho_{\mathrm{tar}}\bigl(\vT(\vz)\bigr) \left|\det\nabla\vT(\vz)\right| =\varrho_{\mathrm{prop}}(\vz) \]

Then \(w_T(\vz)=1\) wherever \(\varrho_{\mathrm{prop}}(\vz)>0\), and so \(\vX=\vT(\vZ)\sim\varrho_{\mathrm{tar}}\), and

\[ g(\vz)=f\bigl(\vT(\vz)\bigr),\qquad g(\vZ)\stackrel d=f(\vX) \]

Exact transport preserves the whole output distribution, including IID variance

  • Provides access to target samples; construction and evaluation costs can differ
  • Different transports can change low discrepancy performance through the cube integrand

Exact transport makes importance weights constant

Choice of map Correction Alternative contribution
Exact transport \(\vT\) \(w_T(\vz)=1\) \(f\bigl(\vT(\vZ)\bigr)\)
Identity map \(\vT(\vz)=\vz\)
(importance sampling)
\(w(\vz)=\varrho_{\mathrm{tar}}(\vz)/\varrho_{\mathrm{prop}}(\vz)\) \(f(\vZ)w(\vZ)\)

Exact transport changes samples; importance sampling changes contributions

Same expectation \(\Ex_{\mathrm{tar}}[f(\vX)]=\Ex_{\mathrm{prop}}[g(\vZ)]=\mu\)

but output distributions and variances may differ (want them to)

Importance sampling

Monte Carlo foundations, methods, and applications
Importance
Sampling

Choose \(\varrho_{\mathrm{prop}}>0\) wherever \(f\varrho_{\mathrm{tar}}\ne0\)

\[\begin{align*} w(\vz)&=\frac{\varrho_{\mathrm{tar}}(\vz)}{\varrho_{\mathrm{prop}}(\vz)},& g(\vz)&=f(\vz)w(\vz),\\ \mu&=\Ex_{\mathrm{tar}}[f(\vX)] =\Ex_{\mathrm{prop}}[g(\vZ)] \end{align*}\]

For \(\vZ_0,\ldots,\vZ_{n-1}\ \IIDsim\ \varrho_{\mathrm{prop}}\),

\[ Y_{\mathrm{IS}}=g(\vZ)=f(\vZ)w(\vZ),\qquad \Ex(Y_{\mathrm{IS}})=\mu \]

\[ \hmu_{\mathrm{IS},n}=\frac1n\sum_{i=0}^{n-1}Y_{\mathrm{IS},i} =\frac1n\sum_{i=0}^{n-1}f(\vZ_i)w(\vZ_i) \]

\(w\) is the weight function; \(W=w(\vZ)\) is its random value

Weighted empirical distributions

As in Markov Chain Monte Carlo: empirical distributions, put mass at each sample point

For \(\vZ_i\ \IIDsim\ F_{\mathrm{prop}}\), require \(\varrho_{\mathrm{prop}}>0\) wherever \(\varrho_{\mathrm{tar}}>0\)

\[\begin{align*} \widehat F_{n,w} &=\frac{\sum_{i=0}^{n-1}w(\vZ_i)\,\delta_{\vZ_i}} {\sum_{i=0}^{n-1}w(\vZ_i)}, & w(\vz)&=\frac{\varrho_{\mathrm{tar}}(\vz)}{\varrho_{\mathrm{prop}}(\vz)},\\ \int f(\vx)\,\dif\widehat F_{n,w}(\vx) &=\frac{\sum_{i=0}^{n-1}w(\vZ_i)f(\vZ_i)} {\sum_{i=0}^{n-1}w(\vZ_i)} & &\xrightarrow[n\to\infty]{\mathrm{a.s.}}\mu \end{align*}\]

  • Normalized weights sum to one; require a positive denominator
  • \(\widehat F_{n,w} \approx F_{\mathrm{tar}}\); generally different at finite \(n\)
  • Self-normalized estimates: consistent, generally biased at finite \(n\)

One proposal, three unbiased estimators

\[\begin{gather*} \varrho_{\mathrm{prop}}(z)=1,\qquad \varrho_{\mathrm{tar}}(x)=2x,\qquad 0<x,z<1,\\ Z_0,\ldots,Z_{n-1}\ \IIDsim\ \Unif(0,1),\qquad \mu=\Ex_{\mathrm{tar}}[f(X)] \end{gather*}\]

Exact transport Importance sampling Acceptance–rejection
Construction \(T(z)=\sqrt z\) \(w(z)=2z\) Accept \(X=Z\) if \(V\le Z\)
Contribution \(f(\sqrt Z)\) \(2Zf(Z)\) \(f(X)\) for accepted \(X\)
Estimator \(\displaystyle\frac1n\sum_{i=0}^{n-1}f(\sqrt{Z_i})\) \(\displaystyle\frac1n\sum_{i=0}^{n-1}2Z_if(Z_i)\) \(\displaystyle\frac1n\sum_{i=0}^{n-1}f(X_i)\)
Output distribution Same as \(Y=f(X)\) Generally different from \(Y\) Same as \(Y=f(X)\)
Proposal cost \(n\) \(n\) Average \(2n\) for \(n\) accepted

Acceptance–rejection: independent \(V\sim\Unif(0,1)\) for each proposal; continue until \(n\) accepted points \(X_0,\ldots,X_{n-1}\)

Seeing the contribution variances

Two plots overlay exact-transport contributions g_ET(Z)=f(sqrt(Z)) in blue and importance contributions g_IS(Z)=2Zf(Z) in orange, using the same uniform input Z, one plot for each function. For f(x)=x, importance sampling spreads outputs more widely; for f(x)=1-x, it concentrates them more tightly around their common mean. Markers indicate equally spaced uniform input quantiles.

\(g_{\mathrm{ET}}(z)=f(\sqrt z)\); \(g_{\mathrm{IS}}(z)=2zf(z)\); both use \(Z\sim\Unif(0,1)\)

Markers: equally probable input quantiles; dashed line: common mean

Compare transport and importance sampling

\(Z\sim\Unif(0,1)\); target density \(\varrho_{\mathrm{tar}}(x)=2x\) on \((0,1)\)

\[\begin{align*} Y_T&=f(\sqrt Z),&Y_{\mathrm{IS}}&=2Zf(Z) \end{align*}\]

\(\exstar\) Compare the two contributions For \(f(x)=x\), compute their means and variances Repeat for \(f(x)=1-x\) Explain why the variance ranking reverses

Variance depends on the function

  • Displayed variances: one estimator contribution
  • Sample-mean variances: divide by \(n\)
\(f(x)\) \(\mu\) Transport: \(\var[f(\sqrt Z)]\) Importance sampling: \(\var[2Zf(Z)]\) Smaller
\(x\) \(2/3\) \(1/18\) \(16/45\) transport
\(1-x\) \(1/3\) \(1/18\) \(1/45\) importance sampling

No universal variance winner

Target samples support ordinary averages for every \(f\)

Weighted proposals can be better or worse for a particular \(f\)

Brownian motion with drift

Let \(\vX\sim\Norm(\vzero,\mSigma)\) be the target Brownian path, with \(\Sigma_{jk}=\min(t_j,t_k)\) and discounted payoff \(Y=f(\vX)\)

Choose \(\vZ\sim\Norm(\va,\mSigma)\), where \(\va=\theta(t_1,\ldots,t_d)^\mathsf T\)

\[\begin{align*} w(\vz)&=\frac{\varrho_{\mathrm{tar}}(\vz)}{\varrho_{\mathrm{prop}}(\vz)} =\exp\!\left(-\theta z_d+\frac{\theta^2t_d}{2}\right),\\ Y_{\mathrm{IS}}&=f(\vZ)w(\vZ),\qquad \Ex_{\mathrm{prop}}[Y_{\mathrm{IS}}]=\mu \end{align*}\]

  • Drift makes positive payoffs more common
  • Weights preserve the target expectation; a good drift can reduce variance

Asian option variance-reduction notebook

Choosing a transformation

Monte Carlo foundations, methods, and applications
Analysis
Importance
Sampling
  • Variable transformation and importance sampling are intertwined
  • The sampling density changes the variance of the sample mean
  • Require
    • a finite Jacobian determinant
    • a proposal density that does not vanish where the integrand is nonzero
  • Pilot samples can guide the choice of transformation or proposal

Place more samples where the magnitude of the integrand times the target density is large, without creating extreme weights

Control Variates and Conditioning

Monte Carlo foundations, methods, and applications
Variance
Reduction

Control variates

Monte Carlo foundations, methods, and applications
Variance
Reduction

Let \(\boldsymbol{\eta}(\vX)=(\eta_1(\vX),\ldots,\eta_m(\vX))^\mathsf T\) have known zero mean

For fixed coefficients \(\vbeta\), define

\[ Y_{\mathrm{CV}}=g(\vX)=f(\vX)-\vbeta^\mathsf T\boldsymbol{\eta}(\vX) \]

Then \(\Ex(Y_{\mathrm{CV}})=\Ex[f(\vX)]=\mu\), so

\[ \hmu_{\mathrm{CV},n} =\frac1n\sum_{i=0}^{n-1}Y_{\mathrm{CV},i} \]

is unbiased

Choose \(\vbeta\) to make \(\var(Y_{\mathrm{CV}})\) as small as possible

Optimal coefficients from covariances

\(Y=f(\vX)\), \(\boldsymbol{\eta}=\boldsymbol{\eta}(\vX)\), \(\Ex(\boldsymbol{\eta})=\vzero\)

Define the control covariance matrix and response–control covariances:

\[\begin{align*} \mSigma_\eta&=\cov(\boldsymbol{\eta},\boldsymbol{\eta}),& (\mSigma_\eta)_{jk}&=\cov(\eta_j,\eta_k),\\ \boldsymbol{\kappa}&=\cov(\boldsymbol{\eta},Y),& \kappa_j&=\cov\{\eta_j(\vX),f(\vX)\} \end{align*}\]

Since \(Y_{\mathrm{CV}}-\mu=(Y-\mu)-\vbeta^\mathsf T\boldsymbol{\eta}\),

\[\begin{align*} \var(Y_{\mathrm{CV}}) &=\Ex\bigl[((Y-\mu)-\vbeta^\mathsf T\boldsymbol{\eta})^2\bigr]\\ &=\var(Y)-2\vbeta^\mathsf T\boldsymbol{\kappa} +\vbeta^\mathsf T\mSigma_\eta\vbeta \end{align*}\]

The variance is a quadratic function of the coefficients

Minimize the control-variate variance

For nonsingular \(\mSigma_\eta\), differentiate and set the gradient to zero:

\[\begin{align*} \nabla_{\vbeta}\var(Y_{\mathrm{CV}}) &=-2\boldsymbol{\kappa}+2\mSigma_\eta\vbeta=\vzero,\\ \mSigma_\eta\vbeta_*&=\boldsymbol{\kappa},\qquad \vbeta_*=\mSigma_\eta^{-1}\boldsymbol{\kappa} \end{align*}\]

Completing the square confirms the minimum:

\[\begin{align*} \var(Y_{\mathrm{CV}}) &=\var(Y)-\boldsymbol{\kappa}^\mathsf T\mSigma_\eta^{-1}\boldsymbol{\kappa}\\ &\quad +(\vbeta-\vbeta_*)^\mathsf T\mSigma_\eta(\vbeta-\vbeta_*) \end{align*}\]

  • Minimum variance: \(\var(Y)-\boldsymbol{\kappa}^\mathsf T\mSigma_\eta^{-1}\boldsymbol{\kappa}\)
  • One control: \(\beta_*=\cov\{f(\vX),\eta_1(\vX)\}/\var\{\eta_1(\vX)\}\)

One control: variance and cost

Suppose \(\Ex(\eta)=0\) and

\[ \var(Y)=9,\qquad \var(\eta)=4,\qquad \cov(Y,\eta)=3 \]

\(\exstar\) Use \(Y_{\mathrm{CV}}=Y-\beta\eta\) Find \(\beta_*\) and the minimum contribution variance If a controlled contribution costs twice as much, which method needs less work for the same IID RMSE? Why fit \(\beta\) on an independent pilot?

Ignore setup and pilot cost for the work comparison; assume independent contributions

Choosing coefficients by least squares

Center the response and control values:

\[\begin{align*} y_i&=f(\vx_i),& c_i&=y_i-\overline y,\\ H_{ij}&=\eta_j(\vx_i)-\overline{\eta}_j \end{align*}\]

Then

\[ \hvbeta=\argmin_{\vb}\norm{\vc-\mH\vb}^2 \]

When \(\mH^\mathsf T\mH\) is nonsingular,

\[ \hvbeta=(\mH^\mathsf T\mH)^{-1}\mH^\mathsf T\vc \]

Sample covariances: \(\widehat{\mSigma}_\eta=\mH^\mathsf T\mH/(n-1)\), \(\widehat{\boldsymbol{\kappa}}=\mH^\mathsf T\vc/(n-1)\)

The residual is orthogonal to the column space of \(\mH\)

Practical control-variate choices

  • Good controls are inexpensive, have known means, and are strongly related to \(f\)
  • More controls can reduce the sample size needed for a target accuracy
  • Poor controls may increase computation without reducing variance
  • For IID sampling, least squares targets variance reduction
  • For low discrepancy sampling, choose coefficients to reduce variation, not sampling variance

A control variate turns known expectations into information about an unknown expectation

Conditional Monte Carlo

Monte Carlo foundations, methods, and applications
Variance
Reduction
Probability

Let \(V\) be a conditioning variable
Recall the laws of total expectation and variance

\[\begin{align*} \Ex(Y)&=\Ex_V\{\Ex(Y\mid V)\},\\ \var(Y)&=\Ex_V\{\var(Y\mid V)\}+\var_V\{\Ex(Y\mid V)\} \end{align*}\]

Therefore

\[ \var_V\{\Ex(Y\mid V)\}\le\var(Y) \]

If \(Y=f(X_1,\ldots,X_d)\) and

\[ Y_{\mathrm{CMC}}=g(\vX_{2:d})=\Ex(Y\mid \vX_{2:d}) \]

is analytic, estimate \(\mu\) by averaging \(Y_{\mathrm{CMC},i}\) instead of \(Y_i\)

Analytically averaging over part of the randomness reduces variance

Conditional density estimation

Write the simulator on uniform inputs as \(Y=h(\vU)\) with \(\vU\sim\Unif[0,1]^d\)

Suppose \(h\) is increasing in \(u_1\) and

\[ y=h(u_1,\vu_{2:d})\iff u_1=g(y;\vu_{2:d}) \]

Extend the inverse by clipping to \([0,1]\) outside the conditional support
Then

\[\begin{align*} F_{Y\mid \vU_{2:d}}(y\mid \vu_{2:d}) &=\Prob\{U_1\le g(y;\vu_{2:d})\}\\ &=g(y;\vu_{2:d}),\\ \varrho_Y(y) &=\int_{[0,1]^{d-1}}\frac{\partial g}{\partial y}(y;\vu_{2:d})\,\dif\vu_{2:d} \end{align*}\]

Thus a density value becomes an expectation of a conditional density

Density of a sum of uniforms

Let

\[ Y=\gamma_1U_1+\cdots+\gamma_dU_d, \qquad \vU\sim\Unif[0,1]^d, \qquad \gamma_j>0 \]

Solving for \(u_1\) gives

\[ g(y;\vu_{2:d})=\frac{y-\sum_{j=2}^d\gamma_ju_j}{\gamma_1} \]

when \(\sum_{j=2}^d\gamma_ju_j\le y\le\gamma_1+\sum_{j=2}^d\gamma_ju_j\)

Hence

\[ \varrho_Y(y)=\Ex\!\left[ \frac1{\gamma_1}\indic\!\left\{ \sum_{j=2}^d\gamma_jU_j\le y\le \gamma_1+\sum_{j=2}^d\gamma_jU_j \right\}\right] \]

Conditional Monte Carlo notebook

Condition a sum of two uniforms

Let \(U_1,U_2\ \IIDsim\Unif(0,1)\) and \(Y=U_1+U_2\)

\(\exstar\) Condition on \(U_2=v\) Find \(F_{Y\mid U_2}(y\mid v)\) and \(\varrho_{Y\mid U_2}(y\mid v)\) Average over \(v\) to obtain the triangular density of \(Y\) Why is the sample average of these conditional densities unbiased at each fixed \(y\)?

Histograms, KDE, and conditional density

Output samples \(Y_i\), equal-width bins \(I_k\) of width \(b\), kernel \(\kappa\) with \(\int\kappa=1\)

\[\begin{align*} \widehat\varrho_{\mathrm{Hist}}(y) &=\frac1{nb}\sum_{i=0}^{n-1}\indic\{Y_i\in I_k\},\quad y\in I_k\\ \widehat\varrho_{\mathrm{KDE}}(y) &=\frac1{nb}\sum_{i=0}^{n-1}\kappa\!\left(\frac{y-Y_i}{b}\right)\\ \widehat\varrho_{\mathrm{CMC}}(y) &=\frac1n\sum_{i=0}^{n-1}\varrho_{Y\mid V}(y\mid V_i) \end{align*}\]

  • Histogram and KDE: choose bin width or bandwidth; finite-width smoothing generally introduces bias
  • CMC: average the analytic conditional density; no smoothing bandwidth
  • Density error still depends on conditioning, sample design, and work

Notebook: curves and repeated-run errors

Conditioning an Asian average

Monte Carlo foundations, methods, and applications
Quantitative
Finance

Equally spaced dates \(t_j=j\Delta t\), \(\Delta t=T/d\), arithmetic average \(A\)

\[\begin{align*} S(t_j)&=S_0\exp\{(r-\sigma^2/2)t_j+\sigma B(t_j)\}\\ A&=\frac1d\sum_{j=1}^d S(t_j) \end{align*}\]

Integrate out the first Brownian increment

\[ B(t_j)=\sqrt{\Delta t}\,Z_1+R_j,\qquad Z_1\sim\Norm(0,1),\qquad R_1=0 \]

\(Z_1\) independent of \(\vR=(R_2,\ldots,R_d)\), formed from the remaining increments

\[\begin{align*} C(\vR)&=\frac{S_0}{d}\sum_{j=1}^d \exp\{(r-\sigma^2/2)t_j+\sigma R_j\}\\ A&=C(\vR)\exp(sZ_1),\qquad s=\sigma\sqrt{\Delta t}>0 \end{align*}\]

Conditional density of an Asian average

Given \(C\), the average \(A=C\exp(sZ_1)\) is lognormal
\(\phi\) and \(\Phi\): standard normal density and CDF

For \(a>0\),

\[\begin{align*} F_{A\mid C}(a\mid C)&=\Phi\!\left(\frac{\log(a/C)}s\right)\\ \varrho_{A\mid C}(a\mid C)&=\frac1{as}\phi\!\left(\frac{\log(a/C)}s\right)\\ \varrho_A(a)&=\Ex\!\left[\frac1{as}\phi\!\left(\frac{\log(a/C)}s\right)\right] \end{align*}\]

  • Sample the \(d-1\) residual increments with IID or randomized low discrepancy points
  • Average conditional densities; no exact arithmetic-Asian density needed
  • Notebook: weekly \(d=52\); compare CMC, histogram, and KDE at the selected \(n\)

Asian-call payoff distribution

Discounted call payoff \(P=e^{-rT}(A-K)_+\)

\[\begin{align*} \Prob(P=0)&=F_A(K) =\Ex\!\left[\Phi\!\left(\frac{\log(K/C)}s\right)\right]\\ \varrho_P(p)&=e^{rT}\varrho_A(K+e^{rT}p),\qquad p>0\\ \int_0^\infty\varrho_P(p)\,\dif p&=1-F_A(K) \end{align*}\]

The atom at zero and the density on positive payoffs are separate parts of the distribution

Ordinary KDE on all payoffs blurs the zero-payoff atom into a smooth bump

Notebook: average density, payoff density, and CMC option price

Combining efficiency methods

Usually yes: combine compatible methods
Their gains need neither add nor multiply

  • One method changes the contribution seen by the next; benefits may overlap
  • Refit controls and reconsider the proposal after changing the contribution
  • Apply antithetic, stratified, or low discrepancy inputs to the resulting cube integrand
  • Compare the combined method at equal computational work using independent replications

Asian-option notebook: plain, drift, control, and both
Repeat the comparison with IID and randomized low discrepancy inputs

Structured Random Sampling

Monte Carlo foundations, methods, and applications
Variance
Reduction

Antithetic sampling

Monte Carlo foundations, methods, and applications
Variance
Reduction
Probability

If \(\vA(\vX)\) has the same distribution as \(\vX\), pair \(f(\vX_i)\) with \(f\bigl(\vA(\vX_i)\bigr)\):

\[ Y_{\mathrm{Anti}}=\{f(\vX)+f(\vA(\vX))\}/2 \]

\[ \hmu_{\mathrm{Anti},n}=\frac1m\sum_{i=0}^{m-1}Y_{\mathrm{Anti},i},\qquad n=2m\text{ evaluations} \]

Examples (uniform-input pairing uses the composed integrand \(h\)):

\[\begin{align*} \vA(\vU)&=\vone-\vU,& \vU&\sim\Unif[0,1]^d,\\ \vA(\vX)&=-\vX,& \vX&\sim\Norm(\vzero,\mSigma) \end{align*}\]

Dependent values within each pair; independent pairs across \(i\)

The variance is

\[ \var(\hmu_{\mathrm{Anti},n}) =\frac{\var\{f(\vX)\}}{n} \left[1+\corr\{f(\vX),f(\vA(\vX))\}\right] \]

Antithetic sampling helps with negatively correlated pairs · Notebook comparison

Constructing an antithetic variate

Monte Carlo foundations, methods, and applications
(Quasi-)Random
Number Generation

If \(X\) has continuous CDF \(F\), then

\[\begin{gather*} U=F(X)\sim\Unif[0,1],\\ 1-U\sim\Unif[0,1],\\ A(X)=F^{-1}\bigl(1-F(X)\bigr)\sim F \end{gather*}\]

For a symmetric distribution, this often reduces to reflection about the center

\(\exstar\) For which monotone functions \(f\) does \(f(X)\) become negatively correlated with \(f\bigl(A(X)\bigr)\)?

IID variance comparison

\(Y=f(\vX)\), \(\vX\sim\varrho_{\mathrm{tar}}\), \(\vZ\sim\varrho_{\mathrm{prop}}\); \(w=\varrho_{\mathrm{tar}}/\varrho_{\mathrm{prop}}\)

Use \(n\) independent contributions, or \(n/2\) independent antithetic pairs

Method Contribution Estimator variance
Direct IID \(Y=f(\vX)\) \(\var(Y)/n\)
Exact transport \(Y_T=f(\vT(\vZ))\) \(\var(Y)/n\)
Importance sampling \(Y_{\mathrm{IS}}=w(\vZ)f(\vZ)\) \(\var(Y_{\mathrm{IS}})/n\)
Control variate \(Y_{\mathrm{CV}}=Y-\vbeta^\mathsf T\boldsymbol{\eta}(\vX)\) \(\var(Y_{\mathrm{CV}})/n\)
Conditional Monte Carlo \(Y_{\mathrm{CMC}}=\Ex(Y\mid V)\) \(\var(Y_{\mathrm{CMC}})/n\le\var(Y)/n\)
Antithetic pairs \(Y_{\mathrm{Anti}}=\{Y+f(\vA(\vX))\}/2\) \(\var(Y)(1+\rho)/n\)

Equal sample counts need not mean equal computational work

Conditions behind the comparison

  • Exact transport: \(\vT(\vZ)\stackrel d=\vX\)
  • Importance sampling: proposal covers the required support
  • Control: \(\Ex[\boldsymbol{\eta}(\vX)]=\vzero\); \(\vbeta\) fixed or from an independent pilot
  • Conditioning: compute \(\Ex(Y\mid V)\) analytically, then sample \(V\)
  • Antithetic: even \(n\), \(\vA(\vX)\stackrel d=\vX\); \(\rho=\corr\{Y,f(\vA(\vX))\}\)

Beyond the IID variance formulas

  • Maps, weights, controls, and conditional expectations have different costs
  • Latin hypercubes and randomized low discrepancy points use dependent inputs
  • For low discrepancy sampling, error depends on integrand variation and point structure
  • Use independent replications to assess randomized designs

Latin hypercube sampling in one dimension

Monte Carlo foundations, methods, and applications
Variance
Reduction

For the cube integrand \(h\), place one independent uniform point in each of \(n\) equal strata:

\[ U_i=\frac{i+V_i}{n}, \qquad V_i\ \IIDsim\ \Unif[0,1], \qquad i=0,\ldots,n-1 \]

Define \(\hmu_{\mathrm{LHS},n}=n^{-1}\sum_i h(U_i)\)
Then \(U_i\sim\Unif[i/n,(i+1)/n]\) and

\[\begin{align*} \Ex(\hmu_{\mathrm{LHS},n}) &=\frac1n\sum_{i=0}^{n-1}\Ex\{h(U_i)\}\\ &=\sum_{i=0}^{n-1}\int_{i/n}^{(i+1)/n}h(u)\,\dif u\\ &=\int_0^1h(u)\,\dif u \end{align*}\]

The \(U_i\) are independent but not identically distributed

One-dimensional LHS variance

Because the strata are independent,

\[ \var(\hmu_{\mathrm{LHS},n}) =\frac1{n^2}\sum_{i=0}^{n-1}\var\{h(U_i)\} \]

For differentiable \(h\), the mean value and Taylor theorems imply

\[\begin{align*} \var(\hmu_{\mathrm{LHS},n}) &\le\frac{\norm{h'}_\infty^2}{n^3},\\ \rmse(\hmu_{\mathrm{LHS},n}) &\le\frac{\norm{h'}_\infty}{n^{3/2}} \end{align*}\]

In one dimension, stratification can improve the IID \(n^{-1/2}\) RMSE rate to \(n^{-3/2}\) for smooth \(h\)

Latin hypercube sampling in \(d\) dimensions

Let \(\pi_1,\ldots,\pi_d\) be independent random permutations of \(0,\ldots,n-1\):

\[ U_{i\ell}=\frac{\pi_\ell(i)+V_{i\ell}}n, \qquad V_{i\ell}\ \IIDsim\ \Unif[0,1] \]

Each point is \(\vU_i=(U_{i1},\ldots,U_{id})\); each coordinate uses every stratum exactly once

Random permutations make every \(\vU_i\) marginally uniform; the points are dependent

For \(R\) independent Latin hypercubes,

\[\begin{align*} \hmu_{\mathrm{LHS},n}^{(r)} &=\frac1n\sum_{i=0}^{n-1}h(\vU_i^{(r)}),\\ \hmu_{\mathrm{LHS},n,R} &=\frac1R\sum_{r=1}^R\hmu_{\mathrm{LHS},n}^{(r)},\\ \widehat{\var}(\hmu_{\mathrm{LHS},n,R}) &=\frac1{R(R-1)}\sum_{r=1}^R \left(\hmu_{\mathrm{LHS},n}^{(r)}-\hmu_{\mathrm{LHS},n,R}\right)^2 \end{align*}\]

Comparing random designs

Monte Carlo foundations, methods, and applications
Variance
Reduction
Low
Discrepancy

Each design has \(n=64\) points in \([0,1]^2\)

IID, Latin hypercube, and scrambled Sobol' point sets with 64 points in the unit square

Strengths and limitations of LHS

Strengths

  • No importance density, control variate, or conditional expectation required
  • Can converge faster than IID sampling
  • Guarantees one point in every one-dimensional stratum

Limitations

  • The sample size is fixed when the design is constructed
  • Accuracy assessment requires independent replications
  • Too many replications can erase the efficiency gain
  • The one-dimensional \(n^{-3/2}\) RMSE guarantee does not extend automatically to \(d>1\)

Low Discrepancy Sampling

Monte Carlo foundations, methods, and applications
Low
Discrepancy
Discrepancy
Measures

Generating Samples introduced even coverage and coordinate order

Markov Chain Monte Carlo linked discrepancy to integration error

Now we construct the point sets, randomize them, and assess error

The Discrepancy notebook compares IID and Metropolis samples using a kernel measure

The van der Corput sequence

Monte Carlo foundations, methods, and applications
Low
Discrepancy

Write a nonnegative integer in base \(b\):

\[ i=(\cdots i_2i_1i_0)_b \]

Reverse the digits across the radix point:

\[ \phi_b(i)=(0.i_0i_1i_2\cdots)_b =\frac{i_0}b+\frac{i_1}{b^2}+\frac{i_2}{b^3}+\cdots \]

  • Usually \(b\) is prime; \(b=2\) is common
  • \(\{\phi_b(i)\}_{i=0}^{b^m-1}\) contains the same points as \(\{i/b^m\}_{i=0}^{b^m-1}\) in a different order
  • Earlier points keep their order as the sample grows

The van der Corput construction turns a fixed-size grid into an extensible sequence

First points in base two

For \(i=0,1,2,3\), reversing the binary digits gives

\[ \bigl(\phi_2(0),\phi_2(1),\phi_2(2),\phi_2(3)\bigr) =\bigl(0,\frac12,\frac14,\frac34\bigr) \]

The first four points form the grid \(\{0,1/4,1/2,3/4\}\) in a different order

\(\exstar\) Compute \(\phi_2(4)\) and \(\phi_2(5)\) and identify the two new eighths

\(\exstar\) Compute \(\phi_2(9)\), \(\phi_2(14)\), and \(\phi_2(19)\) by reversing their binary digits

Four low discrepancy families

Monte Carlo foundations, methods, and applications
Low
Discrepancy

For \(i=0,1,\ldots\):

Family Construction Typical preferred size
Kronecker \(\vu_i=i\vzeta\bmod1\) none
Lattice \(\vu_i=\phi_b(i)\vzeta\bmod1\) \(n=b^m\)
Halton \(\vu_i=(\phi_2(i),\phi_3(i),\phi_5(i),\ldots)\) none
Digital \(\vu_i=i_0\vc_0\oplus i_1\vc_1\oplus\cdots\) \(n=b^m\)

Here \(\oplus\) denotes digitwise addition modulo \(b\)

For basic Halton, choosing the coordinate bases fixes the sequence

Different families balance extensibility, projection quality, and fast construction

Low Discrepancy Constructions notebook: recover generators from the first points

Lattice sequence: eight points

For the lattice sequence with \(b=2\), generator \(\vzeta=(1,3)\), and \(n=8\),

\[ \vu_i=\phi_2(i)\vzeta\bmod1 \]

\(i\) \((i)_2\) \(\phi_2(i)\) \(\zeta_1\phi_2(i)\bmod1=u_{i,1}\) \(\zeta_2\phi_2(i)\bmod1=u_{i,2}\)
0 000 \(0\) \(0\) \(0\)
1 001 \(1/2\) \(1/2\) \(1/2\)
2 010 \(1/4\) \(1/4\) \(3/4\)
3 011 \(3/4\) \(3/4\) \(1/4\)
4 100 \(1/8\) \(1/8\) \(3/8\)
5 101 \(5/8\) \(5/8\) \(7/8\)
6 110 \(3/8\) \(3/8\) \(1/8\)
7 111 \(7/8\) \(7/8\) \(5/8\)

For example, \(i=5\) gives \(\phi_2(5)=5/8\) and \(3(5/8)=15/8\equiv7/8\pmod1\)

Kronecker sequence: four points

For hand arithmetic, take \(\vzeta=(0.41,0.73)\) and \(\vu_i=i\vzeta\bmod1\)

\(i\) \(i\zeta_1\bmod1\) \(i\zeta_2\bmod1\) \(\vu_i\)
0 \(0\) \(0\) \((0,0)\)
1 \(0.41\) \(0.73\) \((0.41,0.73)\)
2 \(0.82\) \(1.46\bmod1=0.46\) \((0.82,0.46)\)
3 \(1.23\bmod1=0.23\) \(2.19\bmod1=0.19\) \((0.23,0.19)\)

The decimal generator keeps this finite example easy to calculate by hand

Digital sequence: four points

In base two, let \(i=i_0+2i_1\) and choose \(\vc_0=(1/2,1/2)\), \(\vc_1=(1/4,3/4)\)

\(i\) \((i)_2\) Generators used \(\vu_i=i_0\vc_0\oplus i_1\vc_1\)
0 00 none \((0,0)\)
1 01 \(\vc_0\) \((1/2,1/2)\)
2 10 \(\vc_1\) \((1/4,3/4)\)
3 11 \(\vc_0\oplus\vc_1\) \((3/4,1/4)\)

For \(i=3\), add binary digits without carrying: \((0.10_2,0.10_2)\oplus(0.01_2,0.11_2)=(0.11_2,0.01_2)\)

Construct with new generators

\(\exstar\) Lattice: Keep \(b=2\) and \(n=8\), but use \(\vzeta=(1,5)\); find \(\vu_4\) and \(\vu_5\) using the \(\phi_2(i)\) values in the table

\(\exstar\) Kronecker: Use \(\vzeta=(0.73,0.24)\); find \(\vu_2\) and \(\vu_3\) to two decimal places

\(\exstar\) Digital, \(b=2\): Use \(\vc_0=(1/2,1/4)\), \(\vc_1=(1/4,1/2)\), and \(\vc_2=(1/8,3/8)\); find \(\vu_i\) for \(i=0,\ldots,7\)

Randomized low discrepancy sampling

Monte Carlo foundations, methods, and applications
Low
Discrepancy

Randomization aims for

\[ \vU_{\mathrm{rand},i}\sim\Unif[0,1]^d \]

for every \(i\), while preserving low discrepancy jointly

  • Random shift: \(\vU_{\mathrm{rand},i}=\vu_i+\vDelta\bmod1\), especially for lattices and Kronecker sequences
  • Random digital shift: \(\vU_{\mathrm{rand},i}=\vu_i\oplus\vDelta\), especially for digital sequences
  • Linear matrix or nested uniform scrambling, especially for digital sequences

Independent randomizations support error assessment without reverting to IID point placement; recall the earlier variance and RMSE comparison

Shift the points you constructed

\(\exstar\) Lattice: For your \(\vzeta=(1,5)\) points, suppose the random shift is \(\vDelta=(1/4,1/2)\); find \((\vu_4+\vDelta)\bmod1\) and \((\vu_5+\vDelta)\bmod1\)

\(\exstar\) Digital, \(b=2\): For your points from \(\vc_0,\vc_1,\vc_2\), suppose the digital shift is \(\vDelta=(3/8,1/4)\); find \(\vu_0\oplus\vDelta\) and \(\vu_7\oplus\vDelta\)

Component-by-component construction

Monte Carlo foundations, methods, and applications
Low
Discrepancy
Discrepancy
Measures

Generators for lattice rules and digital nets may be chosen by number theory or computer search

The component-by-component strategy:

  1. Choose a one-dimensional generator that minimizes a discrepancy criterion over relevant sample sizes
  2. Freeze the first \(\ell\) components
  3. Search for component \(\ell+1\) that minimizes discrepancy
  4. Increase \(\ell\) and repeat until \(\ell=d\)

A high-dimensional design is built by optimizing one coordinate at a time

Stopping criteria

Monte Carlo foundations, methods, and applications
Data-Driven
Error Bounds
Error
Assessment

Two practical questions are

\[\begin{align*} \abs{\mu-\hmu_n}&\le\text{what?}\\ \abs{\mu-\hmu_n}&\le\varepsilon \quad\text{for what $n$?} \end{align*}\]

Use the computed contributions: \(Y_i\), \(Y_{\mathrm{IS},i}\), \(Y_{\mathrm{CV},i}\), or \(Y_{\mathrm{CMC},i}\)

  • IID sampling: use a Central Limit Theorem interval when justified
  • Randomized low discrepancy sampling: use independent replications
  • Coefficient-decay bounds: Fourier for lattices, Walsh for digital nets
  • Further approach: Bayesian credible intervals based on a kernel model

An efficient method needs both fast error decay and a reliable stopping rule

Stopping rules in action

Read each run’s tolerance, estimate, reported interval or bound, sample count, and decision

Budget exhausted \(\ne\) tolerance met

Approximate intervals and conditional bounds need their stated assumptions

Read a stopping decision

Results from the Keister stopping comparison

Rule Tolerance Reported radius Actual error
IID CLT \(0.005\) \(0.00472\) \(0.00117\)
Walsh bound \(0.005\) \(0.00284\) \(0.000118\)
Sobol’, tight budget \(10^{-7}\) \(0.00184\) \(0.00094\)

\(\exstar\) Interpret the reported uncertainty Which runs meet the reported tolerance? Why must the reference stay out of the stopping decision? What assumptions qualify the IID interval and Walsh bound?

Big Ideas

Monte Carlo foundations, methods, and applications
Variance
Reduction
Low
Discrepancy
  • Equivalent expectations can have dramatically different computational variance
  • Exact transport chooses a map that makes the target-to-proposal correction constant
    Importance sampling retains the correction as unequal weights
  • Importance proposals may be tailored to a particular integrand
    Transported target samples can be reused for many integrands
  • Control variates and conditioning remove variability using known structure
  • Antithetic sampling and Latin hypercubes introduce useful dependence deliberately
  • Low discrepancy sequences replace random clustering with balanced space filling
  • Randomization restores unbiasedness and supports error estimation while retaining QMC efficiency

How Far We Have Come

A complete path from model to efficient estimate

  • Formulate — express the target quantity as an expectation
  • Sample — use direct transforms or Markov chains to represent the target
  • Assess — connect uncertainty and discrepancy to integration error
  • Improve — choose weights, controls, dependence, or low discrepancy points to reduce error

Method choice depends on error, cost, and a credible stopping rule

Choose the Method for the Task

  • Task: generate samples \(\vX_i\), evaluate contributions \(Y_i\), assess error
  • Cost–benefit: compare total work for the required accuracy
    • Setup
    • Pilots
    • Generation
    • Transforms
    • Weights
    • Evaluation
  • Use
    • Mean requires the correct expectation
    • Density, probability, or quantile requires the appropriate distributional calculation

Additional machinery must earn its cost
Choose the complete method by accuracy per unit of work, for the intended output

What Comes Next

Efficiency also depends on how the computation is organized

Selected Topics develops:

«
»