calculating mean, std deviations, totalMean,