To me, the two are similar in the sense that slice sampling is just Gibbs sampling for the uniform distribution over the area under the plot of the density function. Is that right?

I was wondering if someone can compare between slice sampling and Gibbs sampling.

For example, in terms of rate of convergence, which one is better?

If you can think about other aspects, please feel free to reply.

Thanks and regards!

  • $\begingroup$ The slice sampler is one special case of Gibbs sampler. There is no general result about optimal Gibbs samplers, it all depends on the specific target and the choice of the full conditionals and of the auxiliary variables if any. $\endgroup$
    – Xi'an
    Jan 12, 2017 at 14:21

1 Answer 1


I am not sure if the question is well posed.

If you can use both the gibbs sampler and slice sampling to sample from a posterior I would use the gibbs sampler as the slice sampler seems unnecessary to me. Use of a slice sampler introduces additional variables which at the very least increases run time for the sampler. So, I am not sure why one would use the slice sampler if we can use the gibbs sampler. If you cannot use the gibbs but you can use the slice then your question seems irrelevant.

Thus, I am not sure why one would consider handicapping the sampler by using the slice when a gibbs sampler can be used.

  • $\begingroup$ Thanks! What kinds of problem can be solved by Gibbs but not or not easily by slice sampling? What by slice but not (easily) by Gibbs sampling? $\endgroup$
    – Tim
    Nov 22, 2010 at 16:05
  • $\begingroup$ If you can use gibbs you can use the slice as well. See the wikipedia link for an example of a slice sampler for the normal(0,1) density. An example where the gibbs is not possible is when you cannot identify the distribution of interest but the density function can be inverted. $\endgroup$
    – user28
    Nov 22, 2010 at 16:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.