# slice sampling correctness

Theoretically, the slice sampling has equilibrium distribution as the target distribution. If we can sample exactly as follows,

$$y' = U(0, p^*(x))$$

$$x' = U\{x: p^*(x) > y' \}$$

However, in the implementation of sampling $$x'$$, people usually use a sequence of intervals, such as the description here. I think this will violate the uniform description of course, because $$x'$$ stays close to $$x$$. I want to know

1. What's the transition probability in this case.

2. Is this valid? why?

• Thanks Xi'an. It seems the algorithm has no guarantee to include all pieces of $\{x: p^*(x') > y' \}$. For example, if the distribution has two modes, and they are very far from each other. In this case, I guess the algorithm does not converge to the target distribution, right? Even the slice covers all pieces, but when you sample a point in between two segments, like the two blue lines in the picture, the slice will shrink to the sample point, which will drop out a piece. Again, in this case, you can't evenly sample over the whole area. Jan 19, 2019 at 23:31