Mean, median, standard deviation, and other statistical routines