Here is a simulation of a one-dimensional "Metropolis algorithm" Markov chain, started in stationarity. The target (stationary) distribution is Exp(1), with density exp(-x). The proposal distribution is Q(x,.) = Unif[x-k,x+k], with density 1/2k. Each proposal value y>0 is accepted with probability = min(1, exp(-(y-x))).

Try restarting this page several times to see different simulation runs. Note that the mean sample value "should" be 1.0, but in fact it isn't very accurate! (Indeed, it's possible the entire graph will lie above the screen, so you won't see a thing!) To see why I care about these issues, check out my research papers (e.g. this one).

[Oops, your browser will not display java applets.]

See the chain run!

[contact me / Return to my Applets Page]