Series of posts on implementing Hamiltonian Monte Carlo

I think this is right. Our model is

\begin{align} \mu \sim& \mathcal{N}(0, 1) \\ y \sim& \mathcal{N}(\mu x, 1) \end{align}

We’d expect that after sampling this model, conditioned on the given data, the posterior distribution of \mu is centered around 2.

1 Like