Monte Carlo Simulation

Importance Sampling

The main event

Estimating Posterior Moments

Direct Sampling

Decision Making

Importance Sampling

\begin{equation} \pi(\theta) = \frac{f(\theta)}{Z} = \frac{p(Y|\theta)p(\theta)}{p(Y)} \end{equation}

\(f(\cdot)\) is the function we can evaluate numerically.
References: Hammersley_1964, KloekVanDijk, and Geweke_1989.
Let \textcolor{blue}{$g$} be an arbitrary, easy-to-sample pdf over \(\theta\) (think normal distribution).
Importance sampling (IS) is based on the following identity:

\begin{equation} \label{eq_isidentity} \mathbb{E}_{\pi}[h(\theta)] = \int h(\theta) \pi(\theta) d\theta = \frac{1}{Z} \int_{\Theta}h(\theta)\frac{f(\theta)}{g(\theta)}g(\theta)d\theta. \end{equation}

Since \(\mathbb{E}_\pi[1]=1\), \[ Z = \int_{\Theta}\frac{f(\theta)}{g(\theta)}g(\theta)d\theta. \]

Importance Sampling

(Unnormalized) Importance weight: \[ w(\theta) = \frac{f(\theta)}{g(\theta)} \] Normalized Importance Weight:

\begin{eqnarray} v(\theta) = \frac{ w(\theta)}{\int w(\theta) g(\theta) d\theta} = \frac{ w(\theta) }{ \int Z \pi(\theta) d\theta} = \frac{w(\theta)}{Z}. \label{eq_defvtheta} \end{eqnarray}


Can show:

\begin{equation} \mathbb{E}_\pi[h(\theta)] = \int v(\theta) h(\theta) g(\theta) d\theta. \end{equation}

The Details

The Details

Effectiveness of IS depends on similarity of \(f\) and \(g\)

\(f = \mathcal N(0,1),\quad g_1 = t(0,1,5),\quad g_2 = \mathcal N(2,1)\) \includegraphics[width=4in]{static/is.pdf}

Only a few draws from \(N(2,1)\) have meaningful weight.
\(\implies\) estimate is based on small sample.
\(\implies\) estimate will be noisy.

Convergence

Central Limit Theorem

Define the population analogue of the normalized importance weights as \(v(\theta) = w(\theta)/Z\) and write

\begin{equation} \bar{h}_N = \frac{ \frac{1}{N} \sum_{i=1}^N (w^i/Z) h(\theta^i)}{ \frac{1}{N} \sum_{i=1}^N (w^i/Z) } = \frac{ \frac{1}{N} \sum_{i=1}^N v(\theta^i) h(\theta^i)}{ \frac{1}{N} \sum_{i=1}^N v(\theta^i) }. \end{equation}

Now consider a first-order Taylor series expansion in terms of deviations of the numerator from \(\mathbb{E}_\pi[h]\) and deviations of the denominator around 1:

\begin{eqnarray} \lefteqn{\sqrt{N}(\bar{h}_N - \mathbb{E}_\pi[h]) } \\\ &=& \sqrt{N} \left( \frac{1}{N} \sum_{i=1}^N v(\theta^i) h(\theta^i) - \mathbb{E}_\pi[h] \right) \nonumber \\\ && - \mathbb{E}_\pi[h] \sqrt{N} \left( \frac{1}{N} \sum_{i=1}^N v(\theta^i) - 1 \right) + o_p(1) \nonumber \\\ &=& (I) - \mathbb{E}_\pi[h] \cdot (II) + o_p(1). \nonumber \end{eqnarray}

Central Limit Theorem

Under some regularity conditions, we can apply a multivariate extension of the Lindeberg-Levy CLT to the terms \((I)\) and \((II)\).
The variances and covariance of \((I)\) and \((II)\) are given by

\begin{eqnarray*} \mathbb{V}_g[hv] &=& \mathbb{E}_\pi [ (\pi/g) h^2 ] - \mathbb{E}^2_\pi[h],\\\ \mathbb{V}_g[v] &=& \mathbb{E}_\pi [ (\pi/g) ] - 1, \\\ COV_g(hv,v) &=& \big( \mathbb{E}_\pi [ (\pi/g) h ] - \mathbb{E}_\pi[h] \big). \end{eqnarray*}

In turn we can deduce that

\begin{equation} \sqrt{N}(\bar{h}_N - \mathbb{E}_\pi[h]) \Longrightarrow N \big( 0, \Omega(h) \big), \label{eq_isomegah} \end{equation}

where \[ \Omega(h) = \mathbb{V}_g[(\pi/g)(h-\mathbb{E}_\pi[h])]. \]

Accuracy

Numerical Illustration

\begin{center} \includegraphics[width=4.3in]{static/IS_proposal} \end{center}

Experiment

Concentrated IS Density

\begin{center} \includegraphics[width=4.3in]{static/IS_ineff0125} \end{center}

Diffuse IS Density

\begin{center} \includegraphics[width=4.3in]{static/IS_ineff05} \end{center}

Take aways

References

Bibliography

[Hammersley_1964] Hammersley & Handscomb, Monte Carlo Methods, , (1964). link. doi.

[KloekVanDijk] Kloek & van Dijk, Bayesian Estimates of Equation System Parameters: An Application of Integration by Monte Carlo, Econometrica, 46(1), 1-19 (1978). link.

[Geweke_1989] Geweke, Bayesian Inference in Econometric Models Using Monte Carlo Integration, Econometrica, 57(6), 1317 (1989). link. doi.