To use all functions of this page, please activate cookies in your browser.
my.chemeurope.com
With an accout for my.chemeurope.com you can always see everything at a glance – and you can configure your own website and individual newsletter.
- My watch list
- My saved searches
- My saved topics
- My newsletter
Slice samplingIn 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. Additional recommended knowledge
ImplementationTo sample a random variable X with density f(x) we introduce an auxiliary variable Y and iterate as follows: Given a sample x we choose y uniformly at random from the interval [0,f(x)]; given y we choose x uniformly at random from the set f − 1[y,f(x)]. The sample of x is obtained by ignoring the y values. ExampleTo sample from the normal distribution N(0,1) 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 . An implementation in the Macsyma language is:
y:random( exp(-x^2/2.0)/sqrt(2.0*dfloat(%pi))), alpha:sqrt(-2.0*ln(y*sqrt(2.0*dfloat(%pi)))), x:signum(random())*random(alpha) ); See also
References
|
|
This article is licensed under the GNU Free Documentation License. It uses material from the Wikipedia article "Slice_sampling". A list of authors is available in Wikipedia. |