added calc_kappa_posterior