# Caution, this code assumes a symmetric prior distribution and will not work in the general case