Proposition (Gibbs sampling)
To generate samples from a multivariate distribution $(X,Y)$ with joint density $f_{XY}$, let $f_{X\mid Y}$ and $f_{Y\mid X}$ be the conditional densities.
Given an initial state $(X_1, Y_1)$, form a Markov chain $(X_n, Y_n)_{n\geq 1}$ by
-
sampling $X_{n+1}\sim f_{X\mid Y}(Y_n)$; then
-
sampling $Y_{n+1} \sim f_{Y\mid X}(X_{n+1})$.
Therefore the Markov density is $$ \begin{align*} k((x, y), (x',y')) = f_{Y\mid X}(y'\mid x') f_{X\mid Y}(x'\mid y) \end{align*} $$
Then $f_{XY}$ is an invariant distribution of $(X_n, Y_n)_{n\geq 1}$.
This is efficient when $X$ and $Y$ are approximately independent.