reorganised mean and sd code
add comment

because I struggled
fix burnin for cumulative frequency calculations