fixed issues with final estimate stats

fixed a bugs with mean, median, mode and standard deviation.