Quiz Study Guide — Chapter 9
This deck is a checklist, not a summary. Every slide is phrased as something you should be able to state, derive, or compute without looking it up.
Four themes
Bootstrapping; variance reduction techniques; generating dependent random variables; and Markov chain Monte Carlo.
Resampling and variance reduction
Dependence and MCMC
You should be able to:
You should be able to:
MVNormalRV generates a sample and what decomposition it usesBootstrapping is a (generally non-parametric) Monte Carlo procedure that resamples WITH REPLACEMENT from an original sample, treating that sample as essentially the population.
| Interval | Construction |
|---|---|
| SNBCI (standard normal) | \(\hat\theta \pm z_{1-\alpha/2}\,\widehat{se}(\hat\theta)\) |
| BBCI (basic) | \(\bigl(2\hat\theta - \hat\theta^*_{1-\alpha/2},\ 2\hat\theta - \hat\theta^*_{\alpha/2}\bigr)\) |
| BPCI (percentile) | \(\bigl(\hat\theta^*_{\alpha/2},\ \hat\theta^*_{1-\alpha/2}\bigr)\) — the quantiles directly |
| BCa | Percentile interval adjusted by a bias-correction \(\hat z_0\) and an acceleration \(\hat a\) from leave-one-out jackknife replicates |
| BTCI (bootstrap-\(t\)) | Reference distribution of \(t^*_b = (\hat\theta^*_b - \hat\theta)/\widehat{se}(\hat\theta^*_b)\); often needs an inner bootstrap |
| Class or interface | Role |
|---|---|
Bootstrap |
Univariate: replicates, bias, std error, and all five intervals |
BSEstimatorIfc |
estimate(data: DoubleArray): Double; built-ins Average, Variance, Median, Minimum, Maximum |
BootstrapSampler |
Multiple quantities per sample via MVBSEstimatorIfc |
MVBSEstimatorIfc |
Returns several named estimates from one sample |
CaseBootstrapSampler |
Resamples rows of a data matrix — case-based |
MatrixBootEstimator + OLSBootEstimator |
Re-estimate OLS coefficients per sample |
The trivial technique, preceding all the others, is simply to use a larger sample size, since
\[\mathrm{Var}(\bar Y) = \frac{\sigma^2_Y}{n}\]
Everything else in the chapter is about getting a smaller variance without paying for more samples.
Common Random Numbers — comparing two systems via \(\bar D = \bar X - \bar Y\):
\[V_{CRN} = V_{IND} - 2\rho_{XY}\,\sigma_X\,\sigma_Y\]
so a positive \(\rho_{XY}\) gives \(V_{CRN} \leq V_{IND}\).
Effective when responses are monotone in the stream, and when you: use inverse-transform generation, dedicate a different stream to each source of randomness, and reset each replication to the same place in each stream.
One system, inducing negative correlation within consecutive pairs \((Y_{2j-1}, Y_{2j})\) by using \(u_k\) on the odd run and \(1 - u_k\) on the even run. For a pair with correlation \(\rho\):
\[\mathrm{Var}(\hat Y_j) = \frac{\sigma^2_Y (1+\rho)}{2}\]
antitheticOption.handleAntitheticReplications() turns the antithetic option off and advances each stream to the next sub-stream.MC1DIntegration treats one replication as a pair: one run with the supplied sampler and one with sampler.antitheticInstance(), returning \((y_1 + y_2)/2\).Indirect estimation uses Little’s formula and \(W_s = W_q + E[ST]\) to estimate \(L_q\), \(L_s\), and \(W_s\) from \(\hat W_q\) together with the known \(\lambda\) and \(E[ST]\) — replacing variability with certainty wherever a quantity is known.
With \(Z_j = Y_j + C(X_j - \mu)\) and \(\mu = E[X]\):
\[C^* = -\frac{\mathrm{cov}(Y_j, X_j)}{\mathrm{Var}(X_j)}, \qquad \mathrm{Var}(Z_j) = \mathrm{Var}(Y_j)\bigl(1 - \rho^2_{XY}\bigr)\]
Note the minus sign in \(C^*\).
With several controls, fit \(Y_i = \beta_0 + \beta_1(X_1 - \mu_1) + \cdots + \beta_q(X_q - \mu_q) + \epsilon_i\); the point estimator for \(\theta = E[Y]\) is the intercept \(\hat\beta_0\).
Under bivariate normality, a reduction is expected when \(\rho^2 \geq 1/(n-2)\) — even a small correlation helps. The KSL class is ControlVariateDataCollector.
Stratified sampling. With known strata probabilities \(p_j = P(X \in L_j)\):
\[\hat\theta = \sum_{j=1}^{k} \hat\theta_j\,p_j, \qquad n_j = \frac{n\,p_j\,\sigma_j}{\sum_i p_i\,\sigma_i} \ \ \text{(Neyman optimal allocation)}\]
Conditional expectation. \(\hat\theta = \frac1n \sum E[Y \mid X_i]\) works because \(\mathrm{Var}\bigl[E[Y|X]\bigr] \leq \mathrm{Var}[\bar Y]\) — replacing \(Y\) by its conditional expectation removes variability while preserving the mean. In the SAN example, conditioning is on the common arcs \(X_1\) and \(X_5\) that appear in every path, so \(P(Y \leq t \mid X_1, X_5)\) factors into a product of the remaining marginals.
Importance sampling. \(\theta = \int_a^b \frac{g(x)}{w(x)} w(x)\,dx\) with \(X \sim w\). The theoretically optimal \(w\) is the \(f\) in the factorization \(g = h f\) — but finding it needs \(\theta\), so heuristically choose \(w\) shaped like \(g\). For \(g(x) = x^2\) on \([0,1]\), using \(w_2(x) = 2x\) gives a variance ratio of about \(4/3240\). Support comes from MC1DIntegration and MCMultiVariateIntegration.
| Class | Method |
|---|---|
BivariateNormalRV |
\(X_1 = \mu_1 + \sigma_1 Z_0\), \(X_2 = \mu_2 + \sigma_2(\rho Z_0 + \sqrt{1-\rho^2}\,Z_1)\) |
BivariateLogNormalRV |
Sample a BVN, then exponentiate componentwise |
MVNormalRV |
Cholesky decomposition \(\Sigma = C C^{T}\), then \(X_i = \mu_i + \sum_{j \leq i} c_{ij} Z_j\) |
MVGaussianCopulaRV |
Sample \(\vec U\) from the Gaussian copula, then \(Y_i = F_i^{-1}(U_i)\) from InverseCDFIfc marginals |
AR1CorrelatedRNStream |
\(Z_i = \phi Z_{i-1} + \varepsilon_i\), \(\varepsilon_i \sim N(0, 1-\phi^2)\); randU01() returns \(\Phi(Z_i)\) |
A \(d\)-dimensional copula \(C(u_1,\dots,u_d)\) is a joint CDF whose marginals are \(U(0,1)\).
Sklar’s theorem. For any random vector with joint CDF \(F\) and continuous marginals \(F_j\), there exists a unique copula \(C\) with
\[F(x_1,\dots,x_d) = C\bigl(F_1(x_1),\dots,F_d(x_d)\bigr)\]
NORTA (Normal-to-Anything). Generate correlated \(Z_i \sim N(0,1)\), apply \(\Phi(Z_i)\) to get correlated uniforms, then set
\[X_i = F^{-1}\bigl(\Phi(Z_i)\bigr)\]
\[\rho(\vec x, \vec y) = \frac{q(\vec x \mid \vec y)\,f(\vec y)}{q(\vec y \mid \vec x)\,f(\vec x)}, \qquad \alpha(\vec x, \vec y) = \min(\rho,\,1)\]
| Class or interface | Role |
|---|---|
MetropolisHastingsMV |
Multivariate MH runner with warm-up, observers, batch statistics |
FunctionMVIfc |
Target density: f(x: DoubleArray) plus a dimension |
ProposalFunctionMVIfc |
generateProposedGivenCurrent(...), proposalRatio(...) |
DMarkovChain |
Discrete-state chain from a transition matrix |
Trap
MetropolisHastingsMV reports across-state summaries using batch statistics, because the generated states are not independent.
This chapter’s question bank has no numeric items — these are practice problems built from the formulas and rules it tests in other formats. Expect the quiz to test the same relationships, not these exact numbers.
MetropolisHastingsMV uses batch statistics — the states are dependent.