calculate the mean for each minute