= Solution
{c}
Use the prior itself as an <independence> proposal: draw $J\geq1$ with $\mathbb P(J=j)=2^{-j}$ and propose $s=2^{-J}$. This indeed samples $p(s)=s$, since the geometric series sums to one. Starting from any allowed current value $r$, accept the proposal with probability
$$
\boxed{\min\left\{1,\left(\frac sr\right)^x
\left(\frac{1-s}{1-r}\right)^{n-x}\right\}.}
$$
The Hastings proposal ratio cancels the prior ratio in the posterior, leaving exactly the binomial <likelihood> ratio; its binomial coefficient also cancels. All allowed states communicate, and proposing the current state gives a self-loop. Detailed balance therefore gives the specified posterior as the stationary law, and the chain converges to it. Its normalizing constant is finite and positive because it is a prior average of a nonnegative, nonzero <likelihood>.
Back to article page