Helper program for bayesian statistics