Variance and variation reduction
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
The two methods need not be independent of one another for these individual variance formulas. Each method needs independent replicates internally. Compare computational costs as well as the variance of one contribution. Introduction showed that accepting some bias can reduce MSE; here we compare unbiased estimators. Degenerate zero-variance cases need no asymptotic rate.
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 equal-weight averages in a space containing constants use the sharper variation
\[
\operatorname{vtn}_K(h)=\min_{c\in\reals}\norm{h-c}_{\mathcal H_K}
\]
\[
\left|\mu-\frac1n\sum_{i=0}^{n-1}h_g(\vu_i)\right|
\le D\bigl(F_{\mathrm{unif}},\{\vu_i\}_{i=0}^{n-1};K\bigr)\operatorname{vtn}_K(h_g)
\]
Nodes determine discrepancy ; the composed cube integrand determines variation
Seek smaller \(\operatorname{vtn}_K(h_g)\) for the same nodes and kernel
The notation \(\vT\) identifies a transport from uniform inputs to the target; \(\vS\) generates proposal draws. Neither map must be displayed when uniform inputs are incidental. This common-cube comparison assumes compatible input dimensions; conditioning can reduce dimension. The bound is the Markov Chain Monte Carlo worst-case integration-error bound. For sufficiently smooth composed cube integrands, nested uniform scrambling gives variance nearly \(\Order(n^{-3})\) and RMSE nearly \(\Order(n^{-3/2})\) . This is not a guarantee for every randomization or integrand. Owen (1997) provides the variance result.
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
First identify a probability density in the original integral. Here \(\varrho_{\mathrm{tar}}(\vx)=\mpi^{-d/2}\me^{-\norm{\vx}^2}\) is the \(\Norm(\vzero,\mI_d/2)\) density, so \(\me^{-\norm{\vx}^2}=\mpi^{d/2}\varrho_{\mathrm{tar}}(\vx)\) . The factor \(\mpi^{d/2}\) belongs in \(f\) when the integral is written as \(\Ex_{\mathrm{tar}}[f(\vX)]\) .
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
Every positive \(a\) preserves the mean. The second moment is \[
\Ex[g_a(\vZ_a)^2]=\frac{(2\mpi)^{d/2}}{a^d}
\int_{\reals^d}\cos^2(\norm{\vz})
\exp\bigl[-(2-a^2/2)\norm{\vz}^2\bigr]\,\dif\vz.
\] It is finite precisely when \(a^2<4\) . For \(2<a^2<4\) , the cube-boundary singularity is mild enough for square integrability. At \(a^2=4\) , Gaussian decay disappears and the squared cosine cannot provide cancellation; for larger \(a^2\) , the envelope grows. The notebook uses \(a=1.6\) to explore an unbounded integrand that still has finite variance.
Explore \(a\) in the Keister notebook
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
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
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_{\mathrm{IS}}(\vz)&=f(\vz)w(\vz),\\
\mu&=\Ex_{\mathrm{tar}}[f(\vX)]
=\Ex_{\mathrm{prop}}[g_{\mathrm{IS}}(\vZ)]
\end{align*}\]
For \(\vZ_0,\ldots,\vZ_{n-1}\ \IIDsim\ \varrho_{\mathrm{prop}}\) ,
\[
Y_{\mathrm{IS}}=g_{\mathrm{IS}}(\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
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*}\]
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}\)
All three estimates are unbiased for the same target expectation when \(f\) is integrable. The acceptance–rejection column links to the matching triangular target example in Generating Samples. Its envelope constant is \(M=2\) , so the acceptance probability is \(1/2\) . Accepted points are indexed separately from the proposal stream; continue drawing fresh independent proposal/decision pairs until exactly \(n\) acceptances have been collected. The number of proposals is random, with mean \(2n\) . The other two columns use exactly \(n\) proposals. Thus equal numbers of averaged contributions do not mean equal proposal costs. Each rejection attempt also requires an independent decision uniform \(V\) . The acceptance–rejection estimator here averages a fixed number of accepted points, not a random number obtained from a fixed proposal budget.
Seeing the contribution variances
\(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
The dots are deterministic quantile illustrations, not a random Monte Carlo sample. For each curve, each marker represents the midpoint of a probability bin of mass 1/20. Both curves use the same uniform input points (i+1/2)/20. Vertical segments show deviations from the mean. Since both inputs are uniform, variance is the integral of the squared vertical deviations. The two curves in each plot share the same axes. For f(x)=x, importance sampling increases contribution variance by a factor 6.4. For f(x)=1-x, it reduces contribution variance by a factor 2.5. The exact-transport output f(sqrt(Z)) has the same distribution as f(X), so the blue curves also represent the target-output variance.
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
For f(x)=x, both means are 2/3; the transport variance is 1/18 and the IS variance is 16/45. For f(x)=1-x, both means are 1/3; the transport variance remains 1/18 and the IS variance is 1/45. Compute each variance as its second moment minus the squared mean. The contribution’s shape, not the target density alone, determines the variance. In the second case, the factor 2Z partly offsets the decrease in 1-Z. The next slide collects the results. These compare equal numbers of contributions, without claiming equal computational cost.
Variance depends on the function
Displayed variances: one estimator contribution
Sample-mean variances: divide by \(n\)
\(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 at \(0<t_1<\cdots<t_d\) , 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}}&=g_{\mathrm{IS}}(\vZ)=f(\vZ)w(\vZ),\qquad \Ex_{\mathrm{prop}}[Y_{\mathrm{IS}}]=\mu
\end{align*}\]
A suitable drift can make positive payoffs more common
Weights preserve the target expectation; a good drift can reduce variance
Asian option variance-reduction notebook
Self-normalized importance sampling
Importance Sampling
Suppose the target normalizer is unknown
\[\begin{align*}
C_{\mathrm{tar}}&=\int\widetilde\varrho_{\mathrm{tar}}(\vx)\,\dif\vx,&
\varrho_{\mathrm{tar}}(\vx)&=\frac{\widetilde\varrho_{\mathrm{tar}}(\vx)}{C_{\mathrm{tar}}}
\end{align*}\]
For \(\vZ_0,\ldots,\vZ_{n-1}\ \IIDsim\ \varrho_{\mathrm{prop}}\) , use
\[
\widetilde w(\vz)=\frac{\widetilde\varrho_{\mathrm{tar}}(\vz)}
{\varrho_{\mathrm{prop}}(\vz)}=C_{\mathrm{tar}}w(\vz)
\]
\[
\hmu_{\mathrm{SN},n}
=\frac{\sum_{i=0}^{n-1}f(\vZ_i)\widetilde w(\vZ_i)}
{\sum_{i=0}^{n-1}\widetilde w(\vZ_i)}
\]
Any common positive weight multiplier cancels
Require proposal coverage of the target support and a positive denominator
A ratio of sample averages handles the unknown normalization
Owen, Section 9.2, calls this self-normalized importance sampling; the same ratio appears in equation (11.27). Assume 0<C_tar<infinity, IID proposal draws, full target-support coverage up to null sets, and integrability of f under the target. Unlike ordinary IS for a single integrand, the denominator requires coverage even where f is zero but the target density is positive. The denominator can be zero at finite n when every proposed weight is zero; the estimator is defined only when it is positive.
The proposal is normalized in the visible formula. If only an unnormalized proposal is evaluable but sampling from its normalized law is available, use tilde_varrho_tar/tilde_varrho_prop instead. The resulting weights differ by a common positive constant, which also cancels. Self-normalization estimates a normalized expectation, not the unnormalized integral of f times the target.
When the normalized density ratio is computable, ordinary IS remains available and is unbiased for integrable f. Both individual normalizers need not be known: a known ratio suffices. Self-normalization is still an option, with different finite-sample properties; neither estimator universally dominates. This ratio method belongs to IS, independently of MCMC, and does not turn proposal draws into target draws.
Posterior means by likelihood weighting
Recall Bayes’ theorem with likelihood \(L(\theta;y_{\mathrm{obs}})\) and prior density \(\varrho_{\mathrm{prior}}\)
\[
\mu_{\mathrm{post}}=\Ex(\Theta\mid y_{\mathrm{obs}})
=\frac{\int\theta L(\theta;y_{\mathrm{obs}})\varrho_{\mathrm{prior}}(\theta)\,\dif\theta}
{\int L(\theta;y_{\mathrm{obs}})\varrho_{\mathrm{prior}}(\theta)\,\dif\theta}
\]
Draw \(Z_i\ \IIDsim\ \varrho_{\mathrm{prior}}\) and use likelihood weights
\[
\hmu_{\mathrm{post},n}
=\frac{\sum_{i=0}^{n-1}Z_iL(Z_i;y_{\mathrm{obs}})}
{\sum_{i=0}^{n-1}L(Z_i;y_{\mathrm{obs}})}
\]
The unknown evidence \(\varrho_D(y_{\mathrm{obs}})\) cancels
A posterior concentrated in a small part of the prior can make weights very uneven
Prior proposals with likelihood weighting give self-normalized IS
This uses the same likelihood, prior, posterior, and evidence notation as the Bayesian-inference slide in Markov Chain Monte Carlo. Here the proposal is the prior, so the unnormalized target is tilde_varrho_tar(theta)=L(theta;y_obs)varrho_prior(theta), the target normalizer C_tar is the evidence varrho_D(y_obs), and the unnormalized importance weight is just L(theta;y_obs). The proposal draws are named Z_i to preserve their role; their distribution is the prior, not the posterior. Require finite positive evidence, an integrable posterior first moment, and a positive sample denominator. The same construction estimates any integrable posterior expectation by replacing Z_i in the numerator by f(Z_i).
The exact posterior mean is a ratio of integrals. The displayed numerical estimator is self-normalized IS because it estimates those integrals using prior proposals. It is generally biased at finite n and consistent under the preceding assumptions. If IID posterior draws are available instead, their ordinary sample mean is unbiased for the posterior mean. An ordinary average of MCMC posterior states is a different estimator too; it does not become self-normalized IS merely because its target is a posterior.
For a two-point illustration, take prior probabilities 1/2,1/2 on theta=0,1 and likelihood values 1,3. The posterior probabilities are 1/4,3/4, giving posterior mean 3/4. With one prior proposal the likelihood cancels, so the displayed estimate has expectation 1/2. This makes the finite-sample bias concrete without requiring any MCMC construction. A better proposal can help when prior proposals rarely reach the concentrated posterior.
Bias and consistency
Two sample averages estimate two integrals
\[\begin{align*}
\frac1n\sum_{i=0}^{n-1}f(\vZ_i)\widetilde w(\vZ_i)
&\xrightarrow[n\to\infty]{\mathrm{a.s.}}C_{\mathrm{tar}}\mu\\
\frac1n\sum_{i=0}^{n-1}\widetilde w(\vZ_i)
&\xrightarrow[n\to\infty]{\mathrm{a.s.}}C_{\mathrm{tar}}>0
\end{align*}\]
Hence \(\hmu_{\mathrm{SN},n}\to\mu\) almost surely under the stated conditions
Generally biased at finite \(n\) : unbiased components do not imply an unbiased ratio
Exact for constants : \(f\equiv c\) gives \(\hmu_{\mathrm{SN},n}=c\)
A ratio estimator needs its own bias and variance analysis
\(\exstar\) Target density \(2x\) on \((0,1)\) , uniform proposal, and \(f(x)=x\) For \(n=1\) , simplify \(\hmu_{\mathrm{SN},1}\) and compare its expectation with \(\mu\)
The strong law applies separately to the numerator and denominator sample averages; their limits are C_tar times mu and C_tar. The ratio then converges almost surely. Positive C_tar makes the sample denominator eventually positive almost surely, though an initial finite sample can have zero denominator.
For the exercise, tilde_varrho_tar(x)=x is enough, so tilde_w(z)=z. A uniform proposal lies in (0,1) almost surely and its weight is positive. With n=1, the weight cancels and the estimate is Z_0. Its expectation is 1/2, whereas the target mean is 2/3; the bias is -1/6. More observations give consistency, not a claim of exact finite-sample unbiasedness or a universal variance gain.
The sample-normalized weights are nonnegative and sum to one, so the estimate is a weighted average of the observed f values and integrates constants exactly. Statements about finite-sample bias assume the estimator’s expectation exists. When the relevant moments exist, MSE = variance + bias squared. The earlier equal-mean IID contribution formulas and their variance-only cost comparison do not apply automatically to this ratio estimator. No confidence interval or stopping rule for the ratio is asserted here.
Acceptance–rejection with a fixed proposal budget
Use independent proposals and a fixed valid envelope Let \(I_i\) indicate acceptance and \(K_N=\sum_{i=0}^{N-1}I_i\)
\[
\hmu_{\mathrm{AR},N}
=\frac{\sum_{i=0}^{N-1}I_i f(\vZ_i)}{K_N},\qquad K_N>0
\]
This is normalization by a sample total, with zero–one weights
Fix \(n\) acceptances
Unbiased average of \(n\) IID target draws
Fix \(N\) proposals
Unbiased conditional on \(K_N>0\)
If \(K_N=0\) , the ratio is undefined
A random denominator does not by itself imply bias
Let tilde_w=tilde_varrho_tar/varrho_prop, and use a known fixed envelope M >= sup tilde_w with independent uniform decisions. Then Prob(I_i=1 | Z_i)=tilde_w(Z_i)/M and the unconditional acceptance probability is a=C_tar/M. Assume 0<a<=1 and integrable f under the target. Conditional on any specified acceptance pattern, the accepted proposals are independent and each has the normalized target law. Therefore, for every k>0, E(hatmu_AR,N | K_N=k)=mu, and E(hatmu_AR,N | K_N>0)=mu. This conditional unbiasedness is a special property of rejection sampling, so random sample count alone does not establish ratio-estimator bias.
Here K_N is binomial(N,a), so Prob(K_N=0)=(1-a)^N. The ratio itself is undefined on that event. If an implementation returns a fixed value b when no proposal is accepted, its unconditional bias is (b-mu)(1-a)^N. For zero fill this is -mu(1-a)^N. Discarding an empty batch and trying again gives the conditional unbiased average, but then the overall proposal count is random. Fixing the number n of accepted draws also gives an unbiased target average, with a random proposal count.
The connection to ordinary self-normalized IS is algebraic: replacing each acceptance indicator I_i by its conditional mean tilde_w(Z_i)/M in both sums gives the self-normalized importance ratio. The ratio of conditional expectations is not generally the conditional expectation of the ratio. Do not infer a Rao–Blackwell variance inequality or exact unbiasedness for SNIS from that replacement. In particular, the one-proposal bias example on the preceding slides remains valid.
Owen, Section 9.5, writes the fixed-proposal rejection-sampling average as a ratio with a random number of acceptances. Keep the zero-acceptance event explicit when comparing it with self-normalized IS. The fixed-envelope and independence assumptions matter; no adaptive rejection scheme is claimed here.
Exact transport with an unknown target normalizer
Target density \(\varrho_{\mathrm{tar}}=\widetilde\varrho_{\mathrm{tar}}/C_{\mathrm{tar}}\) with unknown \(C_{\mathrm{tar}}\)
Draw \(\vZ_i\overset{\mathrm{IID}}{\sim}\varrho_{\mathrm{prop}}\) from a normalized source An exact transport \(\vT\) gives \(\vT(\vZ_i)\sim\varrho_{\mathrm{tar}}\)
For an invertible differentiable \(\vT\) , the weights are constant
\[
\widetilde w_T(\vz)=
\frac{\widetilde\varrho_{\mathrm{tar}}\bigl(\vT(\vz)\bigr)
\left|\det\nabla\vT(\vz)\right|}{\varrho_{\mathrm{prop}}(\vz)}
=C_{\mathrm{tar}}
\]
The unknown constant cancels
\[\begin{align*}
\hmu_{\mathrm{SN},T,n}
&=\frac{\sum_{i=0}^{n-1}f\bigl(\vT(\vZ_i)\bigr)\widetilde w_T(\vZ_i)}
{\sum_{i=0}^{n-1}\widetilde w_T(\vZ_i)}\\
&=\frac1n\sum_{i=0}^{n-1}f\bigl(\vT(\vZ_i)\bigr)
\end{align*}\]
An exact map generates target samples without separately knowing \(C_{\mathrm{tar}}\)
The source/proposal density is normalized. Only the target normalizing constant is unknown. Throughout the visible slide, T is an exact transport from the source to the normalized target, not an approximate fitted map. The exact map encodes normalization; constructing it can be difficult.
This follows directly from the earlier change-of-variables formula: the normalized transport correction is w_T=1, so the unnormalized correction is C_tar. Both sums contain the same factor C_tar. Integrable f and IID source draws therefore give an ordinary unbiased target average in this constant-weight case. General nonconstant-weight self-normalization is generally biased at finite n.
The existing triangular example works without supplying the target normalizer as a separate input. With tilde_varrho_tar(x)=x on (0,1), a uniform source, and T(z)=sqrt(z), the unnormalized correction is sqrt(z)/(2 sqrt(z))=1/2, which equals C_tar. In contrast, the identity map has tilde_w(z)=z and gives the nonconstant-weight ratio from the preceding exercise. An arbitrary positive multiplier on the target shape changes only the common correction constant, not the normalized distribution or exact map.
For a general one-dimensional target, the quantile map uses the ratio of the cumulative integral of tilde_varrho to its total integral. That ratio is insensitive to an arbitrary density scale, but computing and inverting it can still require difficult global information. In higher dimensions, maps can be fitted against an unnormalized target without separately computing its normalizer. An approximate map need not produce exact target draws. A fitted flow generally approximates the target; exactness must not be inferred merely from calling the map a transport or normalizing flow. Importance weighting or Metropolis correction can address the mismatch, with the appropriate finite-sample qualifications.
Supporting reference: Marzouk, Moselhy, Parno, and Spantini, Sections 3.1–3.3 . The existence and the practical construction of an exact transport are different questions. Keep this clarification here in Improving Efficiency; it does not require reopening Generating Samples or Markov Chain Monte Carlo.
Weighted empirical distributions
Same IID proposal points, different masses: approximate the target by reweighting
\[\begin{align*}
\widehat F_n
&=\frac1n\sum_{i=0}^{n-1}\delta_{\vZ_i}
&&\text{equal masses: proposal approximation}\\
\widehat F_{n,w}
&=\frac{\sum_{i=0}^{n-1}\widetilde w(\vZ_i)\,\delta_{\vZ_i}}
{\sum_{i=0}^{n-1}\widetilde w(\vZ_i)}
&&\text{normalized weights: target approximation}
\end{align*}\]
Require \(\sum_i\widetilde w(\vZ_i)>0\) and define \[
g_n(\vz)=\frac{f(\vz)\widetilde w(\vz)}
{n^{-1}\sum_{j=0}^{n-1}\widetilde w(\vZ_j)}
\]
\[
\hmu_{\mathrm{SN},n}
=\int f(\vx)\,\dif\widehat F_{n,w}(\vx)
=\int g_n(\vz)\,\dif\widehat F_n(\vz)
\quad\text{(generally biased)}
\xrightarrow[n\to\infty]{\mathrm{a.s.}}\mu
\]
Weight the empirical distribution or weight the function : the same estimate
Motivation: an ordinary empirical distribution of the IID proposals approximates the proposal law, whereas we want target expectations and probabilities. Importance weighting changes the probability mass assigned to each observed point to account for the target/proposal density ratio. Normalizing those masses gives a discrete probability distribution that can be reused for different functions without changing the sampled points. For f equal to an indicator of a set A, the displayed integral estimates the target probability of A; other choices estimate target means or moments. This is not a construction specifically for repeated data: distinct points can receive unequal masses. For weights 1, 2, 7 the masses are 0.1, 0.2, 0.7. At finite n, the weighted empirical distribution generally differs from the target distribution.
Recall Markov Chain Monte Carlo: empirical distributions . Use the same \(\widehat F_n\) and point-mass \(\delta_{\vx_i}\) notation as the empirical-distribution development in Markov Chain Monte Carlo, with the subscript \(w\) recording the weights. The points still have the proposal law; weighting changes their empirical masses, not their locations or sampling law. The estimator converges almost surely to mu under the support and integrability assumptions stated on the self-normalization slides. The weights need only be proportional to the normalized density ratio. The denominator can be zero at finite \(n\) if every sampled weight is zero.
The displayed equality is exact for each sample with positive total weight. The function g_n depends on the whole sample through its denominator; it is not the fixed ordinary-IS contribution g=f w. Both Fhat_n and Fhat_n,w on this slide are probability distributions. Without self-normalization, ordinary IS assigns masses w(Z_i)/n, whose total generally differs from one. Ordinary importance sampling is unbiased for integrable \(f\) ; self-normalization produces a probability measure but generally loses finite-sample unbiasedness. The weighted-distribution view also connects integration error to discrepancy: the error is the integral of f against Fhat_n,w minus F_tar. Under the appropriate RKHS assumptions, its absolute value is bounded by the RKHS norm of f times the kernel discrepancy between these two distributions. This bound uses fixed f; applying a bound to the sample-dependent g_n requires care and is not a fixed-integrand argument. Full support coverage is needed to approximate the whole target distribution, which is stronger than covering only the support of \(f\varrho_{\mathrm{tar}}\) for one particular integral. A weighted empirical approximation to the target also does not imply that the scalar importance contribution \(f(\vZ)w(\vZ)\) has the same distribution as \(f(\vX)\) .
Weighted samples and discrepancy
The same discrepancy principle applies to normalized weighted samples
\[
\hmu_{\mathrm{SN},n}-\mu
=\int f(\vx)\,\dif\bigl(\widehat F_{n,w}-F_{\mathrm{tar}}\bigr)(\vx)
\]
For \(f\in\mathcal H_K\) with bounded target integration, define
\[
D\bigl(F_{\mathrm{tar}},\widehat F_{n,w};K\bigr)
=\sup_{\norm{h}_{\mathcal H_K}\le1}
\left|\int h\,\dif\bigl(\widehat F_{n,w}-F_{\mathrm{tar}}\bigr)\right|
\]
\[
\abs{\hmu_{\mathrm{SN},n}-\mu}
\le D\bigl(F_{\mathrm{tar}},\widehat F_{n,w};K\bigr)
\operatorname{vtn}_K(f)
\]
Generally \(\operatorname{vtn}_K(f)=\norm{f}_{\mathcal H_K}\)
If \(1\in\mathcal H_K\) , use \(\operatorname{vtn}_K(f)=\min_{c\in\reals}\norm{f-c}_{\mathcal H_K}\) since the masses sum to one
Compare weighted samples with the target ; separate discrepancy from function variation
This is a deterministic inequality for every realized sample with positive total weight. It does not require unbiasedness or independence of the normalized weights, and it is not by itself a confidence interval. The source draws remain IID under the preceding construction; the normalized weights depend on the whole sample.
Assume a measurable positive definite kernel with finite diagonal at every sample point and bounded integration against the normalized target on H_K. The earlier sufficient condition integral sqrt(K(x,x)) dF_tar(x) < infinity ensures bounded target integration. Cauchy-Schwarz applied to the RKHS representer of the error gives the displayed bound and the usual kernel discrepancy. The supremum uses h as a dummy function and is distinct from the sample-dependent g_n on the preceding slide.
Both distributions have total mass one, so integrating f-c gives the same error as integrating f. When constants belong to H_K, minimize the norm over c to obtain the sharper variation. The same weighted distribution can be assessed for many different fixed f in the RKHS.
This connection is an error characterization, not an automatic computable error certificate. Computing the discrepancy generally requires target kernel integrals, which may be unavailable when the target normalizer is unknown. No convergence rate for this discrepancy is asserted here.
One importance ratio, three methods
For ordinary IS , acceptance–rejection, and the independence sampler, use \(w=\varrho_{\mathrm{tar}}/\varrho_{\mathrm{prop}}\) with the same IID proposal law
Rule
Contribution \(f(\vZ_i)w(\vZ_i)\)
Accept with probability \(w(\vz)/M\)
Accept with probability \(\min\{1,w(\vz)/w(\vx)\}\)
Rejection
None; keep every proposal
Discard; try again
Repeat current state
Output
IID weighted contributions
IID target draws
Chain states; target invariant
Global envelope
None required
Known \(M\ge\sup_{\vx}w(\vx)\)
None required
Weight contributions · select observations · update a chain
The three columns target the same expectation but use the importance ratio differently. Ordinary importance sampling averages all f(Z_i)w(Z_i), with the normalized ratio available and f integrable under the target. The proposals retain their proposal distribution; weighting does not turn them into target draws. The independence-sampler column recalls the construction in Markov Chain Monte Carlo; its states are generally dependent.
Acceptance–rejection needs a known global envelope. The displayed w uses normalized target and proposal densities. As in Generating Samples, it is enough to know an unnormalized target and a matching envelope: neither the target normalizer nor a normalized importance ratio is required. Use fresh independent proposals and decision uniforms, and continue until the required number of acceptances; only accepted observations enter its target average.
Self-normalized IS uses all proposals too, but forms a ratio of averages instead of the ordinary IS contribution average shown in this table. Its finite-sample bias and consistency were developed separately above.
Metropolized independence requires ratios of importance weights, without a global envelope. Record a state at every iteration, including repeats after rejection. Longer residence in a high-weight state supplies representation through repetition, whereas importance sampling uses explicit contribution weights. The chain has the target as an invariant distribution; this does not give exact target marginals from an arbitrary start or finite-sample unbiasedness of its average. Bounded weights can help its mixing even though a known global bound is not needed to implement it.
All columns here use IID proposal draws and proposal coverage of the entire target support. For one importance-sampling integral, covering only the support of f times the target density suffices. For the ideal proposal equal to the target, w=1 and acceptance–rejection with M=1 and Metropolized independence both accept every proposal. All three then give ordinary target Monte Carlo.
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
Cost of an accurate IID estimate
Variance Reduction
Error Assessment
For an unbiased IID sample mean of \(Y_g=g(\vZ)\) , write \(\Ex(Y_g)=\mu\) and \(\sigma^2(g)=\var\{g(\vZ)\}\)
\(\$(g)\) : generate \(\vZ_i\) and evaluate \(g(\vZ_i)\) with all required transforms
\(S(g)\) : setup and independent-pilot cost
\[\begin{align*}
\text{Time cost for }n\text{ samples}\qquad T(n;g)&=S(g)+n\$(g)\\
\varepsilon&=\operatorname{RMSE}(\hmu_{g,n})=\frac{\sigma(g)}{\sqrt n}\\
\varepsilon^2&=\frac{\sigma^2(g)}n
\implies n=\frac{\sigma^2(g)}{\varepsilon^2}\\
\text{Time cost for }\alerttext{RMSE } \varepsilon\qquad C(\varepsilon;g)&=T\!\left(\frac{\sigma^2(g)}{\varepsilon^2};g\right)
=S(g)+\frac{\sigma^2(g)\$(g)}{\varepsilon^2}
\end{align*}\]
For simplicity, we may omit \(S(g)\)
Practical comparisons should compare \(C(\varepsilon;g)\) , not \(T(n;g)\)
This is a planning model for independent, identically distributed, unbiased contributions with finite variance and a fixed sample count. The sampling law is part of the notation sigma(g). Cost includes random-input generation, transforms, weights, controls, and the final evaluation, not just calling a payoff function. Use one consistent unit: seconds, operation counts, or money. T denotes time when those units are seconds; C denotes cost at a specified accuracy. Setup is charged once per final calculation. Retain S(g) in the complete model for completeness, but exercises and simple method comparisons may explicitly ignore setup and pilot cost. This is a modeling simplification, not a claim that those costs vanish or are always negligible. When actual runtimes are measured, charge the work performed.
For known variance and positive epsilon, the exact sample count in this model is max{1, ceil(sigma2(g)/epsilon 2)}; the displayed approximation ignores integer rounding. The one-contribution minimum also covers zero variance. Unknown variance requires estimation and an error-assessment procedure; this formula alone is not a certified adaptive stopping rule. An RMSE target is not a deterministic absolute-error guarantee. A nominal CLT confidence radius z sigma(g)/sqrt(n) instead introduces z^2 into the leading cost.
Compare work at the same accuracy
Ignoring setup and integer rounding, an equal-mean alternative \(g(\vZ)\) improves on \(f(\vX)\) when
\[
\sigma^2(g)\$(g)<\sigma^2(f)\$(f)
\]
Half the variance at twice the cost: the same leading work
Setup and pilot fitting can change the winner at a finite tolerance
More generally, compare
\[
S(g)+\frac{\sigma^2(g)\$(g)}{\varepsilon^2}
\quad\text{with}\quad
S(f)+\frac{\sigma^2(f)\$(f)}{\varepsilon^2}
\]
For IID means, compare variance \(\times\) cost per contribution
For fixed representations, setup costs, and sampling laws, the leading epsilon^{-2} rate is the same. Variance reduction changes the constant. If a_g=sigma^2(g) cost(g) is smaller than a_f but S(g)>S(f), the approximation favors g only when epsilon^2 < (a_f-a_g)/(S(g)-S(f)). This explains why an expensive pilot may pay off for a tight tolerance but not for a loose one. If a representation or pilot size is retuned as epsilon changes, retain that dependence rather than treating S(g) and a_g as constants. Exact transport preserves the output variance but can change sampling cost; importance sampling can change both factors. Later, apply this same comparison to a controlled or conditional contribution. These are costs for estimating a mean, not for producing a target-distributed sample.
Control Variates and Conditioning
Variance Reduction
Control variates
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_{\mathrm{CV}}(\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)\}\)
Assume finite second moments. A nonsingular covariance matrix is positive definite, so the final quadratic term is nonnegative and the minimizer is unique. With redundant controls, the covariance matrix can be singular; remove redundant controls or solve the normal equations with a pseudoinverse. The cross-covariance vector is in the covariance matrix’s range, and the optimal residual is unchanged by coefficient directions in its null space. At the optimum, cov(eta, Y_CV)=kappa-Sigma_eta beta_*=0: the residual is uncorrelated with every control. In practice, solve the covariance system rather than explicitly forming the inverse.
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?
Use \(\sigma^2(g_{\mathrm{CV}})\$(g_{\mathrm{CV}})\) versus \(\sigma^2(f)\$(f)\) ; ignore setup and pilot cost
The optimal coefficient is 3/4, and the minimum variance is 9-3^2/4=27/4=6.75. If a direct contribution costs c, compare 9c with (27/4)(2c)=13.5c. The direct method needs less work for the same IID RMSE, ignoring setup, pilot costs, and integer sample counts. An independent pilot makes the fitted coefficient independent of the main samples. Conditional on the pilot, the control still has mean zero, so the final mean remains unbiased, assuming integrability. Fitting on the main samples does not generally retain exact unbiasedness. Use the earlier cost model with g_CV(x)=f(x)-beta eta(x), so cost(g_CV) charges for the whole controlled contribution. For one optimal control with correlation rho, sigma2(g_CV)=sigma 2(f)(1-rho^2). Ignoring setup, CV saves work exactly when (1-rho^2) cost(g_CV)<cost(f). If cost(g_CV)=2 cost(f), this requires rho^2>1/2; here rho^2=1/4. For coefficients fitted on an independent pilot, the conditional IID formula uses the realized residual variance. Unconditionally, average that variance over the pilot, assuming the required finite moments, and charge the pilot.
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\)
Use an independent pilot to estimate beta if exact unbiasedness of the final IID estimator is required.
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
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_{\mathrm{CMC}}(\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 strictly 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
Assume the clipped conditional inverse is absolutely continuous in y for almost every conditioning input. Its derivative is a conditional-density version, and averaging these nonnegative densities gives a marginal-density version by Tonelli. The identity holds almost everywhere in y; pointwise claims require a consistently chosen version and any additional regularity. Strict monotonicity alone does not guarantee absolute continuity of the inverse. A continuously differentiable h with strictly positive derivative in u_1 is a useful sufficient condition on the interior of the conditional support. An output with a conditional atom needs a separate mass term, as in the later Asian-call payoff example.
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
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\) ?
The conditional CDF is min(1,max(0,y-v)); a conditional-density version is the indicator of v<y<v+1. Averaging over v in (0,1) gives y for 0<y<=1, 2-y for 1<y<2, and zero outside (0,2), with endpoint values chosen consistently. For independent uniform conditioning draws V_i, the sample average of the indicators has expectation equal to this density by the law of total expectation. This estimates a density value; it does not construct a new sample of Y. Avoid differentiating at the conditional CDF’s corners; density versions can differ on null sets.
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
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)_+\) with \(K>0\)
\[\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
This is a bridge from changing contributions to changing sampling designs. Students need not wait until the end of the deck for an answer to whether the methods can be combined. The Asian-option companion already combines importance sampling and control variates with IID or randomized low discrepancy inputs, and repeats the comparisons for the lookback payoff.
There is no general rule that the separate reductions in variance add, or that their reduction factors multiply. Each method acts on the contribution remaining after the previous changes. For example, importance sampling alters the covariance with a control, and conditioning can remove variation that a control was already explaining. Refit controls for the resulting contribution; under importance sampling, weight the control consistently and retain its correct known mean. Conditional expectations must use the appropriate law. Antithetic maps must preserve the sampling law to which they are applied.
For finite-variance contributions, exact conditioning cannot increase IID variance relative to the contribution being conditioned. Optimally chosen population control coefficients cannot increase IID variance because zero coefficients remain available. These guarantees do not make the separate gains additive or multiplicative, and do not guarantee lower computational cost. Estimated coefficients, an unsuitable importance proposal, or a sampling design that interacts poorly with the new integrand may give less benefit or worse performance. Low discrepancy performance depends on the resulting cube integrand and cannot be inferred from IID variance alone. Assess the final estimator, include pilot and transformation work, and use independent replications rather than within-design IID error formulas for dependent inputs.
Structured Random Sampling
Variance Reduction
Antithetic sampling
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
Deriving the antithetic variance
Write \(Y=f(\vX)\) and \(Y'=f(\vA(\vX))\) , with \(0<\var(Y)=\sigma^2<\infty\)
The pairing preserves the distribution , so \(\Ex(Y)=\Ex(Y')=\mu\) and \(\var(Y)=\var(Y')=\sigma^2\)
\[\begin{align*}
\Ex(Y_{\mathrm{Anti}})
&=\tfrac12\{\Ex(Y)+\Ex(Y')\}=\mu\\
\var(Y_{\mathrm{Anti}})
&=\tfrac14\{\var(Y)+\var(Y')+2\operatorname{cov}(Y,Y')\}\\
&=\tfrac14\{\sigma^2+\sigma^2+2\rho\sigma^2\}
=\tfrac{\sigma^2}{2}(1+\rho)
\end{align*}\]
Here \(\rho=\corr(Y,Y')\) , so \(\operatorname{cov}(Y,Y')=\rho\sigma^2\)
Averaging independent antithetic pairs
From the preceding calculation, \(\var(Y_{\mathrm{Anti}})=\sigma^2(1+\rho)/2\)
Take \(\vX_0,\ldots,\vX_{m-1}\) as independent copies of \(\vX\) Independent pairs make the cross-pair covariances zero:
\[\begin{align*}
\var(\hmu_{\mathrm{Anti},n})
&=\frac1{m^2}\sum_{i=0}^{m-1}\var(Y_{\mathrm{Anti},i})\\
&=\frac{\var(Y_{\mathrm{Anti}})}m
=\frac{\sigma^2}{2m}(1+\rho)
=\frac{\sigma^2}{n}(1+\rho)
\end{align*}\]
\(m\) independent pairs, \(n=2m\) function evaluations
The first variance expansion applies to the two dependent outputs inside one pair. Only the variance of the average uses independence across pairs. The division by four comes from the pair average’s factor of one half; the division by m comes from averaging m independent pair contributions. If Var(Y)=0, the estimator variance is zero without defining correlation.
Even and odd parts
For the distribution-preserving pairing \(\vA(\vX)\stackrel d=\vX\) , assume \(\vA(\vA(\vx))=\vx\) and \(\Ex[f(\vX)^2]<\infty\)
\[\begin{align*}
f_e(\vx)&=\tfrac12\{f(\vx)+f(\vA(\vx))\}\\
f_o(\vx)&=\tfrac12\{f(\vx)-f(\vA(\vx))\},\qquad f=f_e+f_o
\end{align*}\]
Even and odd relative to the pairing Applying \(\vA\) twice returns \(\vx\) , so the definitions give
\[\begin{align*}
f_e(\vA(\vx))
&=\tfrac12\{f(\vA(\vx))+f(\vx)\}=f_e(\vx)\\
f_o(\vA(\vx))
&=\tfrac12\{f(\vA(\vx))-f(\vx)\}=-f_o(\vx)
\end{align*}\]
Even and odd are relative to the distribution-preserving involution A, not necessarily the origin. Reflection about c is A(x)=2c-x; uniform-cube reflection is A(u)=1-u. Scalars and vectors are both allowed. For vectors, preservation of the joint distribution is required, not only symmetric marginals. The finite second moment ensures integrability of the parts and their product, so the next slide’s expectations are well defined.
Distribution preservation allows replacing \(\vX\) by \(\vA(\vX)\) inside expectations
The odd part changes sign :
\[
\Ex[f_o(\vX)]=\Ex[f_o(\vA(\vX))]
=-\Ex[f_o(\vX)]\implies\Ex[f_o(\vX)]=0
\]
The even part keeps its sign, so the product also changes sign:
\[\begin{align*}
\Ex[f_e(\vX)f_o(\vX)]
&=\Ex[f_e(\vA(\vX))f_o(\vA(\vX))]\\
&=-\Ex[f_e(\vX)f_o(\vX)]
\implies\Ex[f_e(\vX)f_o(\vX)]=0
\end{align*}\]
Now use the definition of covariance :
\[\begin{multline*}
\Ex[f_o(\vX)]=\Ex[f_e(\vX)f_o(\vX)]=0\\
\implies\operatorname{cov}\bigl(f_e(\vX),f_o(\vX)\bigr)
=\Ex[f_e(\vX)f_o(\vX)]-\Ex[f_e(\vX)]\Ex[f_o(\vX)]=0
\end{multline*}\]
Antithetic averaging keeps the even part
Antithetic averaging keeps only the even part and removes the odd part, uncorrelated with the even part
\[\begin{align*}
Y_{\mathrm{Anti}}
&=\tfrac12\{(f_e(\vX)+f_o(\vX))+(f_e(\vX)-f_o(\vX))\}
=f_e(\vX)\\
\mu&=\Ex[f(\vX)]=\Ex[f_e(\vX)]+\underbrace{\Ex[f_o(\vX)]}_{0}
=\Ex[f_e(\vX)]
\end{align*}\]
Independent pairs across \(i\) , as on the antithetic sampling slide:
\[\begin{align*}
\hmu_{\mathrm{Anti},n}&=\frac1m\sum_{i=0}^{m-1}f_e(\vX_i),
\qquad n=2m\text{ evaluations}\\
\var(\hmu_{\mathrm{Anti},n})
&=\frac1{m^2}\sum_{i=0}^{m-1}\var(f_e(\vX_i))
=\frac{\var(f_e(\vX))}{m}
=\frac{2\var(f_e(\vX))}{n}
\end{align*}\]
Variances and covariance of the paired outputs
Write \(V_e=\var(f_e(\vX))\) and \(V_o=\var(f_o(\vX))\)
The parts are uncorrelated , so the variance of their sum is
\[\begin{align*}
\var(f(\vX))
&=\var(f_e(\vX)+f_o(\vX))\\
&=V_e+2\underbrace{\operatorname{cov}(f_e(\vX),f_o(\vX))}_{0}+V_o
=V_e+V_o
\end{align*}\]
Write the paired outputs as a sum and a difference , then expand the covariance in both arguments:
\[\begin{align*}
\operatorname{cov}\bigl(f(\vX),f(\vA(\vX))\bigr)
&=\operatorname{cov}\bigl(f_e(\vX)+f_o(\vX),f_e(\vX)-f_o(\vX)\bigr)\\
&=\operatorname{cov}(f_e(\vX),f_e(\vX))
-\operatorname{cov}(f_e(\vX),f_o(\vX))\\
&\quad+\operatorname{cov}(f_o(\vX),f_e(\vX))
-\operatorname{cov}(f_o(\vX),f_o(\vX))\\
&=V_e-0+0-V_o=V_e-V_o
\end{align*}\]
Covariance is linear in each argument, which explains all four signs. The two mixed terms also cancel by symmetry of covariance even without uncorrelatedness. Uncorrelatedness is needed for the separate variance sum.
Correlation of the paired outputs
Recall \(V_e=\var(f_e(\vX))\) , \(V_o=\var(f_o(\vX))\) , with \(V_e+V_o>0\)
The pairing preserves the distribution, so both outputs have variance \(V_e+V_o\)
\[\begin{align*}
\rho&=\frac{\operatorname{cov}\bigl(f(\vX),f(\vA(\vX))\bigr)}
{\sqrt{\var(f(\vX))\var(f(\vA(\vX)))}}\\
&=\frac{V_e-V_o}{\sqrt{(V_e+V_o)(V_e+V_o)}}
=\frac{V_e-V_o}{V_e+V_o}
\end{align*}\]
The preceding calculation gives \(\rho=(V_e-V_o)/(V_e+V_o)\) and \(\var(f(\vX))=V_e+V_o\)
The correlation and even/odd formulas agree
\[\begin{align*}
\var(\hmu_{\mathrm{Anti},n})
&=\frac{\var(f(\vX))}{n}(1+\rho)\\
&=\frac{V_e+V_o}{n}\left(1+\frac{V_e-V_o}{V_e+V_o}\right)\\
&=\frac{(V_e+V_o)+(V_e-V_o)}n
=\frac{2V_e}{n}=\frac{V_e}{m}
\end{align*}\]
\(m\) independent pairs, \(n=2m\) function evaluations
If Var(f(X)) is zero, correlation is undefined but the estimator variance is zero. Negative correlation is equivalent to V_o > V_e, which is exactly the improvement condition at equal function-evaluation cost. The displayed algebra exposes cancellation of V_o in the numerator.
Constructing an antithetic variate
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)\) ?
For either nondecreasing or nonincreasing f with finite second moment, the covariance is nonpositive. Write X=F^{-1}(U): f(F^{-1}(U)) and f(F^{-1}(1-U)) are oppositely monotone functions of the same uniform U. If U’ is an independent copy, twice their covariance is the expectation of the product of their respective differences at U and U’. Every such product is nonpositive. If f(X) is nondegenerate, both tails have positive probability and some products are strictly negative, giving negative correlation. If f(X) is constant, the covariance and variance are zero and correlation is undefined. Use the generalized inverse; a continuous CDF need not be strictly increasing everywhere.
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
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))\}\)
All formulas assume finite second moments and independent contributions or independent antithetic pairs. The antithetic row uses n evaluations of f; the other rows use n contributions, whose evaluation costs can differ. Conditional Monte Carlo may reduce dimension and avoid evaluating the full original function. Compare variance times cost per contribution when choosing between methods. Exact transport preserves the distribution of f(X).
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
The IID formulas do not apply to within-design sample variance for LHS or randomized low discrepancy sampling. Exact transport can be better than weighted importance sampling for a particular f; it does not imply that every change of variables preserves variance. The Keister example changes the unit-cube integrand, including its Jacobian.
Latin hypercube sampling in one dimension
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},\\
\operatorname{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
Each design has \(n=64\) points in \([0,1]^2\)
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\)
The van der Corput sequence
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
The new values are \(1/8\) and \(5/8\) , respectively: reverse the three binary digits in \(4=100_2\) and \(5=101_2\) across the radix point. For the larger indices, \(9=1001_2\) , \(14=1110_2\) , and \(19=10011_2\) give \(\phi_2(9)=9/16\) , \(\phi_2(14)=7/16\) , and \(\phi_2(19)=25/32\) .
Four low discrepancy families
Low Discrepancy
For \(i=0,1,\ldots\) :
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\)
Suitable generators are essential; arbitrary choices need not give low discrepancy
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
\]
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\)
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
These rational generators illustrate only finite hand calculations. They eventually repeat and do not define a uniformly distributed infinite Kronecker sequence. For uniform distribution, 1 and the generator coordinates must be linearly independent over the rationals; stronger number-theoretic conditions control discrepancy rates. Likewise, the fixed integer lattice vectors in the small examples illustrate rank-one point sets at the displayed sizes, not an assertion of good asymptotic discrepancy for every extension. Practical extensible lattice constructions choose compatible generators for the admissible sizes.
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)\)
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)\)
Digital sequence: extend to eight points
Keep \(\vc_0=(1/2,1/2)\) and \(\vc_1=(1/4,3/4)\) Add \(\vc_2=(1/8,3/8)\) , as in our board example
For \(i=i_0+2i_1+4i_2\) ,
\[
\vu_i=i_0\vc_0\oplus i_1\vc_1\oplus i_2\vc_2
\]
4
100
\(\vc_2\)
\((1/8,3/8)\)
5
101
\(\vc_0\oplus\vc_2\)
\((5/8,7/8)\)
6
110
\(\vc_1\oplus\vc_2\)
\(?\)
7
111
\(\vc_0\oplus\vc_1\oplus\vc_2\)
\(?\)
\(\exstar\) Find \(\vu_6\) and \(\vu_7\) by adding binary digits without carrying
This continues the October 15 board example, retaining the first two generators from the preceding four-point slide. It differs from the next exercise, which changes the first two generators. In eighths, c0=(4,4)/8, c1=(2,6)/8, and c2=(1,3)/8. For i=6=110_2, u6=c1 XOR c2=(2 XOR 1,6 XOR 3)/8=(3/8,5/8). For i=7=111_2, u7=c0 XOR c1 XOR c2=(7/8,1/8). Equivalently, the second coordinates are 0.110 XOR 0.011=0.101 and 0.100 XOR 0.110 XOR 0.011=0.001, respectively.
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\)
Lattice: \(\vu_4=(1/8,5/8)\) and \(\vu_5=(5/8,1/8)\) . Kronecker: \(\vu_2=(0.46,0.48)\) and \(\vu_3=(0.19,0.72)\) . These rational decimal generators eventually repeat, unlike the irrational generators chosen for long Kronecker sequences; here they isolate the hand calculation of \(i\vzeta\bmod1\) . Digital, in order from \(i=0\) to \(7\) : \((0,0),(1/2,1/4),(1/4,1/2),(3/4,3/4),
(1/8,3/8),(5/8,1/8),(3/8,7/8),(7/8,5/8)\) . The family table does not privilege a particular discrepancy measure; construction quality depends on the function class and the chosen criterion.
Component-by-component construction
Generators for lattice rules and digital nets may be chosen by number theory or computer search
The component-by-component strategy:
Choose a one-dimensional generator that minimizes a discrepancy criterion over relevant sample sizes
Freeze the first \(\ell\) components
Search for component \(\ell+1\) that minimizes discrepancy
Increase \(\ell\) and repeat until \(\ell=d\)
A high-dimensional design is built by optimizing one coordinate at a time
Randomized low discrepancy sampling
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
Each randomized point is marginally uniform, so its sample mean is unbiased. Randomization almost surely avoids exact cube-boundary points, making Gaussian quantile transforms finite. The opening variance slide states the nearly \(\Order(n^{-3/2})\) RMSE rate for sufficiently smooth integrands under nested scrambling.
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\)
Lattice: \(\vu_4=(1/8,5/8)\) shifts to \((3/8,1/8)\) , and \(\vu_5=(5/8,1/8)\) shifts to \((7/8,5/8)\) . Digital: \(\vu_0=(0,0)\) shifts to \((3/8,1/4)\) , and \(\vu_7=(7/8,5/8)\) shifts by binary digitwise addition to \((1/2,7/8)\) . The displayed shifts are particular realizations used for hand calculation; the random shift is uniform on the unit square in the sampling method.
Variance of a randomized low discrepancy estimate
Recall \(h(\vu)=g\bigl(\vS(\vu)\bigr)\) , the complete calculation from uniform inputs
Each \(\vU_i\sim\Unif[0,1]^d\) but the points within a run are dependent
\[\begin{align*}
\hmu_n(h)&=\frac1n\sum_{i=0}^{n-1}h(\vU_i)
&\Ex_{\mathrm{rand}}\{\hmu_n(h)\}&=\mu\\
\operatorname{MSE}\{\hmu_n(h)\}
&=\var_{\mathrm{rand}}\{\hmu_n(h)\}\\
&=\frac1{n^2}\sum_{i,j=0}^{n-1}
\cov_{\mathrm{rand}}\{h(\vU_i),h(\vU_j)\}
\end{align*}\]
IID points: off-diagonal covariances vanish
Randomized LD: the whole design determines the estimator variance
Randomness here is in the points, with h fixed. It differs from the Gaussian-process average-case interpretation in Markov Chain Monte Carlo, where the points are fixed and the integrand is random. Marginal uniformity and integrability give unbiasedness. Finite second moments justify the covariance expansion. The diagonal terms sum to var{h(U)}/n, but RQMC also has off-diagonal terms. Do not discard them or substitute within-run sample variance divided by n as an RQMC variance estimate. Independent shifts or scrambles provide independent complete-run estimates. Their across-run sample variance estimates the variance of one whole run; divide by the number of runs only when reporting the variance of their mean. Source: Owen (2026), Randomized quasi-Monte Carlo integration .
Stopping criteria
Data-Driven Error Bounds
Error Assessment
For \(\mu=\Ex[h(\vU)]\) , assess integration error from computed values
Every error assessment rests on assumptions
Match the sampling design : how the \(\vu_i\) are generated and how they depend on one another
Specify what is assumed about the integrand \(h\) : moments, smoothness, coefficient decay, or a probabilistic model
The following routes use different combinations of these assumptions
The sampling design includes IID generation, dependence within a randomized low discrepancy design, independence across replications, or a fixed point set. Conditions on h are evaluated together with that design: for example, normality and moments concern the induced outputs h(U), while smoothness or coefficient decay concerns h itself. For Bayesian intervals, the probabilistic integrand model supplies the interpretation of uncertainty. A method name or returned error radius alone does not verify these assumptions.
IID recap
Estimate the SD by \(s_m\) from an independent pilot sample of \(m\) outputs; compute \(\hmu_n\) from \(n\) fresh IID outputs \(h(\vU_i)\)
\[
\hmu_n\ \pm\ t_{1-\alpha/2,m-1}\,\frac{\gamma s_m}{\sqrt n}
\]
Optional inflation : \(\gamma\ge1\) ; \(s_m^2\) is unbiased, but \(s_m\) can underestimate the true SD
Gaussian IID outputs, \(h(\vU_i)\) : exact \((1-\alpha)\) coverage for \(\gamma=1\) at fixed \(m,n\)
CLT approximation : \(n\) large enough for the sample mean to be nearly normal Also need \(s_m\) to approximate the true SD well
QMCPy: CubMCCLT uses a two-stage CLT procedure with an inflated pilot SD
Other IID stopping criteria exploit known bounds on \(h\) , using concentration inequalities
Compare the interval radius with \(\varepsilon\) ; justify adaptive stopping separately
Known bounds a <= h(U) <= b permit distribution-free concentration bounds such as Hoeffding’s inequality. Valid sequential stopping still needs an appropriate construction, such as a confidence sequence or allocated failure probabilities across checks; a fixed-n concentration bound alone does not automatically justify repeated checks. This aside does not claim that the listed QMCPy classes implement these bounded-output alternatives. The normality assumption concerns the scalar outputs h(U_i), not the uniform inputs U_i. The pilot and main samples are independent and have the same output distribution. For normal outputs with positive variance and fixed m,n, sqrt(n)(hmu_n-mu)/s_m has a Student-t distribution with m-1 degrees of freedom: the standardized main-sample mean is normal and independent of the pilot sample variance. Thus gamma=1 gives exact coverage; a fixed gamma>1 widens the interval and gives conservative coverage under these assumptions. The usual same-sample t interval instead uses s_n and n-1 degrees of freedom. The sample variance s_m^2 (ddof=1) is unbiased for sigma^2. Its square root s_m is generally biased downward by concavity and can underestimate sigma on a particular pilot sample. Optional inflation provides a cushion, but does not by itself guarantee coverage for general nonnormal outputs. For general IID outputs with finite positive variance, a studentized CLT justifies approximate coverage as both sample sizes grow. At practical finite m,n, the mean must be sufficiently close to normal and the sample SD sufficiently representative of the true SD. A large n alone does not diagnose rare tails. The normal critical value z_(1-alpha/2) is the CLT choice; the t critical value is also asymptotically valid but is not an exact finite-sample correction for nonnormal data. Neither fixed-n result automatically justifies repeatedly checking and stopping when the displayed radius first falls below epsilon. For RQMC, within-design values are dependent; replace the IID observations by independent whole-design estimates. The later replication slides give the formula and qualifications. CubMCCLT uses a normal quantile and an inflated pilot SD, not the exact fixed-n normal-data Student-t procedure. For the displayed independent-pilot interval, use scipy.stats.t.ppf(1-alpha/2, m-1) and the pilot sample SD (ddof=1); QMCPy has no separate IID Student-t stopping class in this pinned version. An RMSE target and confidence coverage are distinct error criteria. Budget exhausted does not mean tolerance met.
IID guarantees with a kurtosis bound
For \(Y=h(\vU)\) , assume a known bound on ordinary kurtosis
\[
\kappa=\frac{\Ex[(Y-\mu)^4]}{\sigma^4}\le\kappa_{\max}
\qquad \sigma^2=\var(Y)>0
\]
Berry–Esseen controls the normal-approximation error at finite sample size
The kurtosis bound also controls the risk of underestimating SD from the pilot
QMCPy: CubMCG combines a pilot with Berry–Esseen/Chebyshev sample sizing
Its admissible kurtmax comes from n_init, inflate, and alpha Choose these so the assumed \(\kappa_{\max}\) is within that admissible bound
A sample kurtosis estimate does not establish a known kurtosis bound
Kurtosis here is the standardized fourth central moment, not excess kurtosis; a normal output has kappa=3. A bounded fourth moment controls the standardized third absolute moment needed by Berry-Esseen and the variability of the pilot variance estimator. This is a conditional guarantee for a specified class of output distributions, not a universal guarantee from an apparently benign pilot. In the pinned CubMCG, alpha_sigma=alpha/2 and kurtmax=(n_init-3)/(n_init-1) + alpha_sigman_init/(1-alpha_sigma) (1-1/inflate2) 2. There is no kurtmax constructor keyword. Increase n_init or adjust inflate appropriately so this admissible cap covers the externally justified bound; inspect sc.kurtmax after construction. The code uses inflate on the pilot SD. An example call is sc=qmcpy.CubMCG(integrand, abs_tol=epsilon, rel_tol=0, n_init=1024, inflate=1.2, alpha=0.01); these illustrative defaults are not a claim that an arbitrary integrand satisfies the resulting kurtosis cap. Call solution,data=sc.integrate(). Check the returned error bounds and budget warnings; exhausting n_limit does not establish success. The same interface applies to the other stopping classes, with class-specific parameters. Source checked in the recorded qmcpy commit: stopping_criterion/cub_mc_g.py.
RQMC error assessment by independent replications
QMCPy: CubQMCRepStudentT
Independently randomize the whole \(n\) -point design \(R\ge2\) times
\[\begin{align*}
\hmu_n^{(r)}&=\frac1n\sum_{i=0}^{n-1}h(\vU_i^{(r)})
&&r=0,\ldots,R-1\\
\hmu_{R,n}&=\frac1R\sum_{r=0}^{R-1}\hmu_n^{(r)}
& \hat\sigma^2_{R,n}&=\frac1{R-1}\sum_{r=0}^{R-1}(\hmu_n^{(r)}-\hmu_{R,n})^2
\end{align*}\]
\(\hat\sigma^2_{R,n}\)
Estimates \(\sigma_n^2=\var_{\mathrm{rand}}\{\hmu_n(h)\}\) of one \(n\) -point run
\(\hat\sigma^2_{R,n}/R\)
Estimates the variance of the reported mean \(\hmu_{R,n}\)
Our \(R\) observations are independent sample averages , not individual function values
Fix h, n, the design, and its randomization law across replications. The \(\hmu_n^{(r)}\) are IID and unbiased, with variance \(\sigma_n^2\) when second moments exist. Here \(\hmu_{R,n}\) averages \(R\) whole-run estimates, each based on \(n\) points, so the total point count is \(Rn\) . The observations used in the sample-variance calculation are these R sample averages, not the individual outputs h(U_i) within them. The latter are dependent within a run. Then \(\Ex[\hat\sigma^2_{R,n}]=\sigma_n^2\) and \(\var(\hmu_{R,n})=\sigma_n^2/R\) exactly at fixed \(n\) and \(R\) . The sample variance of the n function values within one randomized design is not a substitute: it does not account for their covariances. Each run uses an independent shift or scramble. Any fitted control must be fixed in advance or have an appropriate independent-pilot analysis. Source: Owen (2026), Section 5.6 .
A stopping criterion from replications
For a fixed \(n\) and \(R\) , an approximate \((1-\alpha)\) confidence interval is
\[
\hmu_{R,n}\ \pm\ t_{1-\alpha/2,R-1}\,\frac{\hat\sigma_{R,n}}{\sqrt R}
\]
\(t_{1-\alpha/2,R-1}\) is a Student-\(t\) quantile; \(\alpha\) is the nominal failure probability
A candidate rule: increase \(n\) and recompute until \(t_{1-\alpha/2,R-1}\hat\sigma_{R,n}/\sqrt R\le\varepsilon\)
Small \(R\) in CubQMCRepStudentT: assume the \(\hmu_n^{(r)}\) are nearly normal This assumption is not always known to hold
Adaptive stopping : repeated checks do not automatically preserve \(1-\alpha\) coverage
Even exact fixed-\(n\) intervals need a separate justification for data-dependent stopping
This Student-t confidence interval is the interval counterpart of the two-sided t-test for the mean of the independent replicate estimates. Keeping R small relies on those whole-run estimates being close to normal; this assumption may not be established for the chosen integrand and randomization. At fixed n and R, this Student-t interval is exact for normal replicate means; otherwise it is an approximation whose adequacy depends on their distribution and R. Unbiasedness and finite variance alone do not make a small-R t interval exact. Larger n does not universally make an individual RQMC replicate asymptotically normal. For nested designs, grow each run’s n through admissible sizes, retaining its randomization. Recompute the independent run means and their across-run variance at the new n. A nominal fixed-sample interval does not automatically retain its coverage at a data-dependent stopping time. This is a separate issue from the normal/CLT approximation: even exact coverage at each fixed n does not imply the same coverage at a data-dependent n. Merely changing n on a predetermined schedule is not the problem; choosing when to report an interval using the observed estimates or widths is. Count all Rn function evaluations and the error-assessment work, including any discarded pilot work. Increasing R until an interval is narrow enough also requires a stopping-time coverage argument. A justified sequential procedure can address this, for example by allocating failure probabilities across a predetermined sequence of checks whose sum is at most alpha, provided each check has the claimed valid marginal coverage. Allocating alpha does not repair an unjustified t approximation. Time-uniform intervals are another possibility under suitable assumptions; ordinary fixed-sample t intervals do not automatically have that property. The next two slides explain why the IID pilot strategy does not transfer automatically and how points per design and replication count serve different roles in accuracy and error assessment. Sources: Owen (2026), Section 5.6 for replication intervals; Howard et al. (2021) for the distinction between fixed-sample and time-uniform coverage. The latter is general sequential-inference guidance, not a ready-made confidence sequence for arbitrary RQMC designs.
Why a small pilot does not determine RQMC error
\[\begin{align*}
\text{IID:}\quad\var\{\hmu_n(h)\}&=\frac{\sigma^2(h)}n
&\sigma^2(h)&=\var\{h(\vU)\}\\
\text{RQMC:}\quad\sigma_n^2&=\var_{\mathrm{rand}}\{\hmu_n(h)\}
\end{align*}\]
IID: a pilot estimates \(\sigma^2(h)\) , which is independent of \(n\)
RQMC: \(\hat\sigma^2_{R,n_0}\) estimates the variance of an \(n_0\) -point run
Changing \(n\) changes the design and the covariances within each run
A pilot at \(n_0\) estimates \(\sigma_{n_0}\) ; a large-\(n\) interval needs \(\sigma_n\)
Extrapolation needs an additional, justified scaling model
For IID contributions, an independent pilot estimates the same one-observation variance used in the final sample-mean formula for any n. Its uncertainty still matters, as in the earlier IID stopping discussion. For RQMC, the across-run sample variance at n0 targets sigma_n0 squared, not sigma_n squared for a larger design. There is no automatic IID scaling sigma_n = sigma_n0 sqrt(n0/n): the off-diagonal covariances also change. If an appropriate rate model and its validity range are known, extrapolation may be possible, but a single small design does not establish that model. To assess the new n directly, extend each independently randomized design and recompute its mean before estimating the across-run variance.
Replication, efficiency, and interval justification
Fix \(n\) , increase \(R\)
Independent-run CLT as \(R\to\infty\) ; RMSE decreases as \(R^{-1/2}\)
Use large \(n\) and modest \(R\)
Exploit RQMC error decay; Student-\(t\) intervals remain approximate
For a fixed evaluation budget \(N=Rn\) ,
\[
\operatorname{RMSE}\{\hmu_{R,n}\}
=\frac{\sigma_n}{\sqrt R}
\qquad
\sigma_n^2=\var_{\mathrm{rand}}\{\hmu_n(h)\}
\]
More replications leave fewer points per design , changing \(\sigma_n\)
Large \(n\) supports sample mean accuracy ; large \(R\) supports confidence in error assessment
Choosing \(n\) adaptively also needs a stopping-time coverage argument
At fixed n, the independent run means have a fixed distribution. With finite positive variance, increasing R supports the standard CLT and asymptotically valid studentized intervals. This is not exact finite-R coverage in general. For independent unbiased run estimates, RMSE equals sigma_n/sqrt(R) exactly when the variance exists. At fixed total point count N, changing R also changes n=N/R and therefore sigma_n. An accuracy comparison requires information about how sigma_n changes with n; the later cost section introduces a rate model for that purpose. No rate model is needed to explain the interval-justification issue here.
The practical tension is strong replication-based CLT justification with less efficient point allocation, versus efficient large RQMC designs with approximate intervals from modest replication counts. Large n alone does not provide a general normal limit for a fixed number of replications. This describes the usual Student-t replication approach, not an impossibility claim about all confidence procedures. Adaptive stopping needs the additional coverage qualifications already stated. Source: Owen (2026), Section 5.6 .
Error assessment for one fixed QMC design
For a deterministic design, assess the integration error of the fixed \(h\)
Unknown \(\operatorname{vtn}_K(h)\) prevents direct use of discrepancy \(\times\) variation
Fourier coefficient bound
CubQMCLatticeG
Walsh coefficient bound
CubQMCNetG
Bayesian interval, lattice
CubQMCBayesLatticeG
Bayesian interval, digital net
CubQMCBayesNetG
Coefficient bounds need decay assumptions; Bayesian intervals need an integrand model These classes exploit matching sequences for fast calculations
A fixed design has no replication variance Its error assessment needs function-class assumptions or an integrand model
For deterministic QMC, the discrepancy bound involves vtn_K(h), which is also generally unknown. Fourier/Walsh coefficient-decay methods can give computable bounds under stated function-class assumptions. A Bayesian credible interval instead uses an integrand model. The two groups distinguish available error-assessment routes, not mutually exclusive algorithm families. A coefficient bound can also be applied to a realized randomized design when its assumptions hold; independent replication is the additional route supplied by randomization. One fixed deterministic sequence has no randomization variance to estimate by replication. The sample variance of its individual function values does not certify integration error. Hickernell and collaborators’ data-driven Fourier/Walsh bounds exploit coefficient-decay assumptions rather than requiring the full variation as an input. Function-class assumptions justify the bounds; matching lattice or digital sequences also allow fast Fourier or Walsh coefficient calculations. Refer to the later stopping notebooks for concrete implementations. Bayesian credible intervals can use a fixed design by putting uncertainty on h; their coverage is under that model, not a randomization guarantee for an arbitrary fixed integrand. This matches the earlier average-case discussion. Generic kernel calculations can be expensive. Certain kernels paired with matching sequences give structured calculations and fast transforms, making Bayesian error assessment fast as well. Computational speed and the model assumptions supporting a credible interval are separate considerations. For IID sampling, the familiar sample variance of individual h(U_i) values divided by n estimates the variance of their mean; that calculation cannot be transferred to dependent points within an RQMC run. An RMSE target controls root mean squared error over randomizations; a confidence interval also specifies a coverage level. The target is the integral of the fixed cube integrand h. Use fixed points u_i for deterministic QMC and randomized points U_i for RQMC. The generic estimate notation is shared, but only the latter has randomization variance. A stopping procedure must supply a computable bound or interval and state the assumptions supporting it. A theoretical variation bound may be unavailable; coefficient-decay methods replace it with data-driven bounds for a specified function class. Confidence and credible intervals have different interpretations. Neither should be identified with an RMSE bound or an unconditional absolute-error guarantee. The preceding IID and RQMC slides explain sampling-based standard errors; the next slides compare concrete stopping implementations.
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
The Keister reference is checked only after stopping. The IID interval uses a pilot-sized final run; the replication interval uses independent scrambles, not the within-scramble sample variance. Nominal fixed-sample interval coverage does not automatically carry over to adaptive stopping. Walsh-decay guarantees assume cone membership, which passing necessary-condition checks cannot prove. For the Asian option, distinguish simulation error from model and discretization error, and include the pilot in the computational budget. The linked low discrepancy constructions notebook compares fixed sample sizes without duplicating these stopping demonstrations.
Read a stopping decision
Six-dimensional results from the Keister stopping comparison
IID CLT
\(0.0005\)
\(0.0405\)
\(0.0118\)
0.1266
Replicated Sobol’
\(0.0005\)
\(0.000392\)
\(4.81\times10^{-5}\)
0.1288
Walsh bound
\(0.0005\)
\(0.000423\)
\(3.39\times10^{-5}\)
0.1275
Sobol’, tight budget
\(10^{-7}\)
\(0.054\)
\(0.00131\)
0.0011
\(\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?
The replicated Sobol’ and Walsh-bound radii meet their requested tolerances. The IID CLT and tight-budget Sobol’ runs do not. Reaching the budget is not success. The reference is an independent diagnostic available for this benchmark, not information normally available to choose the sample count for an unknown integral. One observed actual error also cannot establish coverage or a general guarantee. The IID interval is approximate, based on a CLT, estimated variance, and the independent-pilot design. The Walsh bound assumes membership in its specified function cone; passing necessary-condition checks does not prove membership. Adaptive replication intervals need the additional coverage qualification already stated in the notebook. Numbers are rounded from the saved run; random seeds, tolerances, or code changes can produce different results. Times are elapsed seconds for integration and adaptive error assessment from that same saved notebook run; they exclude the independent reference and plot, and vary by machine and timing conditions. The saved stopping settings are d=6, tolerance=0.0005, replications=32, and alpha=0.01; all are editable parameters in the notebook.
Cost of deterministic low discrepancy sampling
Low Discrepancy
Discrepancy Measures
For fixed cube points write \(\hmu_n(h)=n^{-1}\sum_{i=0}^{n-1}h(\vu_i)\)
Recall \(D_n(K)=D\bigl(F_{\mathrm{unif}},\{\vu_i\}_{i=0}^{n-1};K\bigr)\)
For the chosen QMC design, assume a discrepancy bound \(D_n(K)\le a_{\mathrm{QMC}}n^{-p_{\mathrm{QMC}}}\)
\[\begin{align*}
\abs{\mu-\hmu_n(h)}
&\le D_n(K)\operatorname{vtn}_K(h)
\le a_{\mathrm{QMC}}\operatorname{vtn}_K(h)n^{-p_{\mathrm{QMC}}}\\
\text{Choose }n
&\ge
\left(\frac{a_{\mathrm{QMC}}\operatorname{vtn}_K(h)}{\varepsilon}\right)^{1/p_{\mathrm{QMC}}}\\
\text{Cost}\qquad C(\varepsilon;h,\mathrm{QMC})
&\lesssim S_{\mathrm{QMC}}(h)+\$_{\mathrm{QMC}}(h)
\left(\frac{a_{\mathrm{QMC}}\operatorname{vtn}_K(h)}{\varepsilon}\right)^{1/p_{\mathrm{QMC}}}
\end{align*}\]
Absolute-error target \(\varepsilon\) ; \(\lesssim\) allows rounding up to the next design size
\(S_{\mathrm{QMC}}\) is setup; \(\$_{\mathrm{QMC}}\) includes point generation and the full \(h\) evaluation
\(\operatorname{vtn}_K(h)\) is usually hard to know or estimate
The discrepancy-variation inequality and the assumed discrepancy-rate upper bound give a sufficient sample size. Choose the smallest allowed sample size at least as large as the displayed threshold. C denotes the work needed to meet the specified accuracy; this construction gives an upper bound on that work, not its unknown exact minimum. The symbol lesssim absorbs fixed factors from rounding or admissible sample sizes. It is not an equality or a claim that the realized error attains its bound. Assume a fixed kernel and domain, h in the associated space, positive finite variation, a_QMC>0, and p_QMC>0. The zero-variation case is a constant integrand and needs no asymptotic rate model. Use the full RKHS norm as variation in general. If constants belong to the space, these equal-weight averages allow the reduced min_c ||h-c|| variation.
Round up to an admissible sample size and retain logarithmic factors if they occur in the discrepancy bound. The displayed asymptotic cost assumes the sample-size threshold is at least one; otherwise retain the one-point minimum. Allowed sample sizes must have bounded successive ratios for the rounding factor to be absorbed by lesssim. Cost includes the cube-point generator and complete integrand evaluation; linear per-point cost is a model. Use the actual T(n;h) if generating n points has a different cost law. The chosen QMC construction and its implementation determine a_QMC, p_QMC, S_QMC(h), and cost_QMC(h); these are not universal QMC constants. Setup may be explicitly ignored for simple comparisons.
A deterministic estimate has no randomization variance, but that says nothing about its integration error. The bound requires justified values or bounds for both discrepancy and variation. Different kernels or scalings change both factors; compare their product rather than variation alone. In practice, variation is typically difficult to know or estimate. This is primarily a theoretical cost comparison, not a directly computable stopping rule. The preceding stopping section explains error assessments from computed values and their assumptions; those need not estimate the full variation explicitly.
Cost of randomized low discrepancy sampling
For one unbiased \(n\) -point run, model the estimator variance by
\[
\var_{\mathrm{rand}}\{\hmu_n(h)\}
\approx A_{\mathrm{RQMC}}^2(h)n^{-2p_{\mathrm{RQMC}}}
\]
\[\begin{align*}
\operatorname{RMSE}\{\hmu_n(h)\}
&\approx A_{\mathrm{RQMC}}(h)n^{-p_{\mathrm{RQMC}}}\\
\text{For target RMSE }\varepsilon:\quad n
&\approx
\left(\frac{A_{\mathrm{RQMC}}(h)}{\varepsilon}\right)^{1/p_{\mathrm{RQMC}}}\\
\text{Cost}\qquad C(\varepsilon;h,\mathrm{RQMC})
&\approx S_{\mathrm{RQMC}}(h)+\$_{\mathrm{RQMC}}(h)
\left(\frac{A_{\mathrm{RQMC}}(h)}{\varepsilon}\right)^{1/p_{\mathrm{RQMC}}}
\end{align*}\]
Predicts work for an RMSE target \(\varepsilon\) , averaged over randomizations
\(A_{\mathrm{RQMC}}(h)\) captures dependence on \(h\) and the chosen randomization
With modest smoothness , often \(p_{\mathrm{RQMC}}>p_{\mathrm{QMC}}\)
The earlier replication interval estimates uncertainty from data
The variance is over randomizations of a fixed integrand, and unbiasedness is assumed. The power law is an approximate model for the chosen integrand, RQMC construction, randomization, and range of allowed sample sizes. A_RQMC(h) is its nonnegative error amplitude. It may reflect design-specific spectral or ANOVA structure and need not factor as a universal method constant times deterministic RKHS variation. Do not identify it with vtn_K(h). The squared amplitude is written A_RQMC^2(h), with the square on A.
Unbiasedness makes RMSE squared equal to estimator variance exactly; the power-law expression for that variance, and the resulting RMSE, sample-size, and cost formulas, are approximate. They do not assert upper bounds. Keep p_RQMC distinct from p_QMC. With modest smoothness, randomized designs often have a larger RMSE decay exponent than the deterministic error-decay exponent for the corresponding setting. Some smooth integrands under suitable scrambling admit RMSE nearly n^{-3/2}, but not every integrand or randomization has that rate. Match the exponent and amplitude to the setting, retaining logarithmic terms when relevant.
Invert the approximate RMSE law to predict a sample size, then round up to an admissible size and charge the actual setup and sampling work. Linear sampling work after setup is a model. A_RQMC(h) is generally unknown, so this calculation alone does not supply a practical stopping rule. A target RMSE differs from a deterministic absolute-error guarantee and from a confidence interval.
Compare low discrepancy costs
Compare equal-integral \(h_f\) and \(h_g\) using the same design and rate exponent
Omit setup and rounding; for a common tolerance \(\varepsilon\) , compare
QMC: absolute-error bound
\(\displaystyle\$_{\mathrm{QMC}}(h)\bigl[a_{\mathrm{QMC}}\operatorname{vtn}_K(h)\bigr]^{1/p_{\mathrm{QMC}}}\)
RQMC: RMSE model
\(\displaystyle\$_{\mathrm{RQMC}}(h)A_{\mathrm{RQMC}}^{1/p_{\mathrm{RQMC}}}(h)\)
Within each comparison, the common \(\varepsilon^{-1/p}\) factor cancels
A smaller error constant must compensate for greater cost per point
Compare the two representations separately within one method and error criterion. The QMC row gives a leading work-bound factor; the RQMC row gives a leading work-model factor. Neither is measured runtime or an unknown minimum cost. Method, domain, input dimension, exponent, and assumptions must be compatible. For deterministic QMC, the kernel, variation definition, and discrepancy-rate constant must also be shared. Conditioning or a different transformation may change dimension or the valid rate; then compare the complete method-specific cost expressions instead.
The QMC error amplitude is a_QMC vtn_K(h). The RQMC error amplitude is A_RQMC(h), which captures the chosen design’s estimator-variance behavior. Do not substitute the deterministic variation for that RQMC quantity. With a shared exponent p, halving the relevant error amplitude while doubling per-point cost gives the predicted leading-work ratio 2^{1-1/p}. It is 1/2 at p=1/2, 1 at p=1, and 2^{1/3} at p=3/2. Setup and pilot costs may change these finite-tolerance comparisons.
For IID uniform sampling, the RMSE amplitude is sigma(h), p=1/2, and the factor reduces to cost(h) sigma^2(h). Under RQMC, controls fitted to minimize IID contribution variance do not automatically minimize A_RQMC(h) or the variance of a complete randomized estimate.
Comparing IID and RQMC at the same RMSE target
Ignore setup; choose \(n\) for each method, with \(R\) fixed for RQMC
Variance of one \(n\) -point estimate
\(\displaystyle\sigma_{\mathrm{IID},n}^2=\frac{\sigma^2(h)}n\) \(\sigma^2(h)=\var\{h(\vU)\}\)
\(\displaystyle\sigma_{\mathrm{RQMC},n}^2\approx A_{\mathrm{RQMC}}^2(h)n^{-2p_{\mathrm{RQMC}}}\)
Variance of the reported estimate
\(\displaystyle\frac{\sigma^2(h)}n\approx\frac{\hat\sigma_n^2(h)}n\)
\(\displaystyle\frac{\sigma_{\mathrm{RQMC},n}^2}R\approx\frac{\hat\sigma_{R,n}^2}R\)
Choose \(n\) for RMSE \(\varepsilon\)
\(\displaystyle n\approx\frac{\sigma^2(h)}{\varepsilon^2}\)
\(\displaystyle n\approx\left(\frac{A_{\mathrm{RQMC}}(h)}{\varepsilon\sqrt R}\right)^{1/p_{\mathrm{RQMC}}}\)
Work
\(\displaystyle\approx\frac{\$_{\mathrm{IID}}(h)\sigma^2(h)}{\varepsilon^2}\)
\(\displaystyle\approx\frac{\$_{\mathrm{RQMC}}(h)A_{\mathrm{RQMC}}^{1/p_{\mathrm{RQMC}}}(h)R^{1-1/(2p_{\mathrm{RQMC}})}}{\varepsilon^{1/p_{\mathrm{RQMC}}}}\)
Work: \(n\$_{\mathrm{IID}}(h)\) for IID; \(Rn\$_{\mathrm{RQMC}}(h)\) for RQMC
Work scales as \(\varepsilon^{-2}\) for IID; \(\varepsilon^{-1/p_{\mathrm{RQMC}}}\) for RQMC with fixed \(R\)
Compare unbiased estimates of the same target integral, using the same cube integrand h. For IID sampling, sigma^2(h)=var{h(U)} is the finite variance of one function value. Independence gives the variance of an n-point average as sigma_IID,n2=sigma 2(h)/n. This one-value variance is defined in the IID column because the RQMC model uses the variance of the complete design. For RQMC, sigma_RQMC,n^2 is the randomization variance of the entire n-point estimate, modeled approximately by A_RQMC2(h)n {-2p_RQMC}. The points within a run are dependent; independent randomizations give independent complete run estimates.
The reported-variance row pairs each population variance with its sample estimate. For IID, hat sigma_n^2(h) is the ordinary sample variance of the n individual function values, with denominator n-1: \(\hat\sigma_n^2(h)=(n-1)^{-1}\sum_{i=0}^{n-1}[h(\vU_i)-\hmu_n]^2\) . Divide by n to estimate the variance of their average. For RQMC, hat sigma_{R,n}^2 is the across-run sample variance of the R independent n-point averages, with denominator R-1, defined on the replication slide. Divide by R to estimate the variance of their reported average. These approximation signs indicate estimated variances, not error bounds or a claim of exact agreement with the population variances.
IID reports one average of n independent function values, with no replication count R. Its variance is sigma^2(h)/n, so choosing n approximately sigma2(h)/epsilon 2 targets RMSE epsilon. For RQMC, fix R in advance and average R independently randomized n-point run estimates. Their mean has variance equal to the complete-run variance divided by R. Equating this to epsilon^2 gives n approximately [A_RQMC(h)/(epsilon sqrt(R))]^{1/p_RQMC}. Choose n separately for each method.
Ignore setup and assume linear work: n times the IID per-point cost, and Rn times the RQMC per-point cost. Each cost includes point generation and the complete h evaluation. Substituting the chosen n gives the last row. IID work is approximately cost_IID(h) sigma^2(h) epsilon^{-2}. RQMC work is approximately cost_RQMC(h) A_RQMC^{1/p_RQMC}(h) R^{1-1/(2p_RQMC)} epsilon^{-1/p_RQMC}. Both costs are approximations: the model ignores rounding and setup, and the RQMC variance rate is itself approximate. For p_RQMC>1/2, more replications increase predicted work at a common RMSE because they require more total points. At p_RQMC=1/2 the R factor cancels, as for an IID rate.
Round n up to an admissible size and retain at least one point per run. The asymptotic work formulas apply when the predicted n is at least one and within the rate model’s valid range. Retain logarithmic factors or nonlinear generation costs when present. A_RQMC(h) and its valid rate may be unknown, so these formulas plan theoretical work; they are not a practical stopping rule or a confidence-coverage claim.
This comparison increases n as the requested RMSE decreases, keeping the RQMC replication count R fixed. The IID calculation uses one sample average throughout. Holding the RQMC design size n fixed and only increasing R would give an epsilon^{-2} replication work law; that is a different allocation.
The notebook timings charge actual work. Each controlled Asian-option run regenerates an independent pilot, so its measured runtime includes that pilot even though this simple table omits setup. If another design reuses one fitted control, analyze residual variance conditional on that pilot and charge its setup once; unconditional run estimates need not be independent. The comparison concerns the same discretely monitored contract; model or discretization bias is separate. Asian/lookback comparison .
Worked cost comparison: IID versus RQMC
Assume unbiased estimates, equal cost per point , and no setup cost Let \(\var\{h(\vU)\}=1\) and, for large \(n\) , model one RQMC run by \(\sigma_n^2\approx16/n^2\)
Fix \(R=16\) independent RQMC replications and target RMSE \(\varepsilon=0.01\)
\[
\operatorname{MSE}(\hmu_N^{\mathrm{IID}})=\frac1N
\qquad
\operatorname{MSE}(\hmu_{16,n})=\frac{\sigma_n^2}{16}\approx\frac1{n^2}
\]
Required size
\(N=10{,}000\)
\(n\ge100\) per run
Chosen size
\(N=10{,}000\)
\(n=128\) per run
Total point evaluations
\(10{,}000\)
\(16\times128=2{,}048\)
RMSE
\(0.01\)
\(\approx1/128=0.0078125\)
Round RQMC up to a power of two
\(\exstar\) For ten times smaller RMSE, how does each method’s work grow before rounding?
This is a hypothetical planning example, not a measured speed comparison. The two methods integrate the same fixed h with variance one under uniform inputs. Assume the RQMC variance model holds at the design sizes used here; it is not asserted for every n or every integrand. In particular, the law 16/n^2 need not apply at very small n. With the earlier notation, A_RQMC(h)=4 and p_RQMC=1. Sixteen independent randomizations give the reported mean variance sigma_n^2/16, approximately 1/n^2.
IID needs N >= epsilon^{-2}; choose the integer N=10,000. RQMC needs n approximately at least epsilon^{-1}=100, then rounds up to n=128 for the selected power-of-two design. Total RQMC work is Rn=2,048 evaluations, versus 10,000 for IID. Equal per-point costs and omitted overhead make evaluation counts proportional to runtime in this example. Actual sequence generation, setup, error assessment, and pilot costs can change the comparison.
For epsilon=0.001, IID needs 1,000,000 evaluations, a factor 100 more. Before rounding, RQMC needs n=1,000 per run and 16,000 evaluations, a factor 10 more than its unrounded 1,600-evaluation work at epsilon=0.01. After power-of-two rounding, use n=1,024 and 16,384 evaluations, eight times the rounded 2,048-evaluation work in the table. Distinguish the rate comparison before rounding from the realized design-size ratios.
The RQMC variance law is an assumed model; a small pilot does not establish it. Meeting the modeled RMSE target is not a confidence-coverage guarantee or a justified adaptive stopping rule. These are the separate qualifications developed under Stopping criteria.
At n=1, each randomized run is one uniform draw, so sigma_1^2=1 exactly. Sixteen independent replications are then exactly the same estimator as IID with N=16, with MSE 1/16. Extrapolating the large-n model would give sigma_1^2 approximately 16 and reported-mean MSE approximately 1, which is wrong. This is why the large-n qualification is explicit on the slide.