Updated Tally class to compute batch statistics