Slice sampling
Appearance
In mathematics and physics, Slice sampling is a type of Markov chain Monte Carlo sampling algorithm based on the observation that to sample a random variable one can sample uniformly from the region under the graph of its density function.
Implementation
To sample a random variable X with density we introduce an auxiliary variable and iterate as follows: Given a sample x we choose y uniformly at random from the interval ; given y we choose x uniformly at random from the set . The sample of x is obtained by ignoring the y values.
Example
To sample from the normal distribution we first choose an initial x -- say 0. After each sample of x we choose y uniformly at random from ; after each y sample we choose x uniformly at random from where .
See also
References
- Radford M. Neal, "Slice Sampling". The Annals of Statistics, 31(3):705-767, 2003.