4 Feb, 2016

Sampling Algorithms


Rejection Sampling

We want to obtain samples from $p(\theta)$. We first choose an envelop function $q$, and $M\gt 1$ such that $p(\theta)\lt M q(\theta)$, $\forall \theta$.

  • For $i=1:N$
    • set continue $:=$ TRUE
    • while continue
      • $\theta^{(i)} \sim q(\theta)$
      • $u \sim \text{Unif}(0,1)$
      • if $u \lt \frac{p(\theta^{(i)})}{M q(\theta^{(i)})}$
        • accept $\theta^{(i)}$
        • $i = i+1$
        • set continue $:=$ FALSE
      • else:
        • reject $\theta^{(i)}$
    • End while

Issues with rejection sampling include (1) choosing $M$ and (2) choosing $q(\theta)$. We can choose $M^* = \underset{\theta}{max} \frac{p(\theta)}{q(\theta)}$.

Importance Sampling

Resampling Importance Sampling

MCMC

Irreducible
definition
Positive Recurrence
definition
State Aperiodic
definition

Metropolis-Hastings

Gibbs