I'll assume that you have run the
Metropolis-Hastings applet for a while. The aim now is to see
directly the effect on the transitions of "metropolizing" a proposal density. If you press
the button below, a
window separate from your browser should open. The window is resizable, and you may need
to adjust its dimensions depending on your system configuration.
The metropolizing effect
Some of the controls of this applet should be familiar to you by now. The blue panel in the left
middle of the screen is new however. It represents a graph of the metropolized transition
function for the currently selected Markov chain. The diagonal line with a kink in it is a plot of the
new location (y-axis) versus the old location (x-axis) after one single iteration of the Gaussian
random walk Metropolis algorithm. Since each and every iteration is different, so is the
corresponding graph.
The update formula can be written down explicitly as follows: at each iteration, let be the
current position of the Markov chain. A Gaussian random variable is selected, which results
in the proposal . When the target distribution is a Gaussian with mean
and variance
, this proposal is accepted only with probability
,
which gives rise to the kink. The graph therefore is given by the formula
where is a uniform random variable on [0,1].
The colored picture at the bottom of the window is an average of all the graphs produced. With
enough iterations, this gives a representation of the transition kernel of the selected
Markov chain. The red diagonal line represents a series of point masses which account for the
probability of rejecting the proposal. The picture can be reset by pressing the button labeled
"Reset hist.". To see a representation of the (unmodified) proposal only, select the option "view
proposal". Finally, the option "no transition graph" stops the drawing of the graph with the blue
background, resulting in a faster update of the bottom picture.
|