Professional Documents
Culture Documents
Y 2020 P 6 Q 7
Y 2020 P 6 Q 7
Y 2020 P 6 Q 7
X0 → X1 → X2 → X3 → · · ·
↓ ↓ ↓
Y1 Y2 Y3
(a) Write out the transition matrix for the Markov chain (X0 , X1 , . . . ). Calculate
its stationary distribution. [4 marks]
(b) Writing X ~ for (X0 , X1 , . . . , Xn ), and writing Y~ for (Y1 , . . . , Yn ), and similarly ~x
and ~y , find expressions for
~ = ~x) and for P(Y~ = ~y | X
P(X ~ = ~x).
[4 marks]
(c) Give pseudocode for a function rx(n) that generates a random X. ~ Give
pseudocode to generate a weighted sample from the posterior distribution of
~ conditional on the observed data Y~ = ~y .
X [8 marks]
(d ) Let Z = n−1 ni=1 Xi . Give pseudocode to find a 95% confidence interval for Z,
P