betaHPD function

compute and optionally plot beta HDRs