refactor evaluation of posterior and predictive distributions