Solution (source code)

= Solution

Compute the <Bayesian model evidence> for each model by integrating its sampling density against its parameter prior:
$$
m_i(y)=\int p_Y(y\mid\psi_i,M_i)p(\psi_i\mid M_i)\,d\psi_i.
$$
The <posterior odds> are the <prior odds> multiplied by the <Bayes factor>:
$$
\boxed{\frac{\Pr(M_1\mid y)}{\Pr(M_2\mid y)}
=\frac{\Pr(M_1)}{\Pr(M_2)}\frac{m_1(y)}{m_2(y)}.}
$$
The parameter priors used for evidence must be normalized; arbitrary normalization constants in model-specific improper priors would make this comparison undefined.