In an image processing class, I dont really get behind the idea how to 'sample from a posterior' with Gibbs sampling. We have a posterior distribution:
$f(z_1, .. ,z_n \mid x_1,.. ,x_n) := f(z \mid x)$
From Bayes theorem we express this as:
$f(z \mid x)$ ∝ $f(x \mid z)f(z)$ ,
where $f(x \mid z)$ is the likelihood and $f(z)$ the prior, which we are modeling in different fashions.
In a first task, we are asked to 'sample from the prior' with Gibbs sampling. To that end, we sample from $f(z)$ by sampling from its conditional distribution by updating the random variables elementwise from $f(z_1 \mid z_2 , .. z_n)$.
Now, we have to 'sample from the complete posterior' and this is where my intuition fails. Iam confused as this is already a conditional distribution. Could anyone explain the general approach of using Gibbs sampling to sample from a posterior distribution?