- Consider simulating realisations of
X Geo ~ (0.3)
via Markov Chain
Monte Carlo (MCMC) methods and the Metropolis-Hastings algorithm.
Initially, use a discrete uniform random variable with domain
{0,1,2,…,19}
as the proposal distribution. (This gives
,
1
20
qi j
for all
i j , {0,1,2,…,19}
where
,
( ) q P X j X i i j p . Start at
x 1.
Run the Markov Chain for at least 10000 transitions. Discard the first
2000 as the burn in period. Regard the remaining ones as your samples
from the distribution of X. (For a rejected proposed
th n
transition, simply
record the
th n
sample as equal to the
( 1)th n .)
i) Use your simulated samples of X to calculate an estimate of
E X( ).
ii) Calculate your acceptance rate. That is, calculate the proportion of
proposed moves accepted by the algorithm.
iii) Even after applying the Metropolis-Hastings algorithm, why is this
proposal distribution not able to produce unbiased realisations
from the distribution of X?
iv) Suggest a possible proposal distribution (other than X itself) which
would be appropriate to generate realisations of
X Geo ~ (0.3).
Include any parameters needed to define the distribution exactly
(e.g. a Binomial distribution requires two parameters.)
v) Suggest a possible distribution (other than the proposal
distribution itself) for which a discrete uniform random variable
with domain
{0,1,2,…,19}
would be an appropriate proposal
distribution for MCMC methods. Include any parameters needed
to define the distribution exactly.
Note: The Metropolis-Hastings acceptance probabilities for a discrete
distribution are given by
,
,
( )
min 1,
( )
p j i
i j
P x q
P x q
. - Consider sampling realisations of Y from a probability density function
2
( ) 3 sin(5 ) sin(2 ) sin(7 ) y
f y Ke y y y
for some normalising constant
K (i.e. such that
2
2
3 sin(5 ) sin(2 ) sin(7 )
( )
3 sin(5 ) sin(2 ) sin(7 )
y
t
e y y y
f y
e t t t dt
Using a normal distribution
2
( ) ~ ( ,1.2 ) g y y N y p
as the proposal
distribution, run the Markov Chain for at least 10000 transitions. Discard
the first 2000 as the burn in period. Regard the remaining ones as your
samples from the distribution of Y. (For a rejected proposed
th n
transition,
simply record the
th n
sample as equal to the
( 1)th n .)
Sample Solution